The Project

A general-purpose robotics controller for the LEAP Mechatronics stream of high-school students. A single board implemented a PIC18F2620 microcontroller, a 2-channel motor driver based on the SN754410 H-bridge, and a serial port for programming the microcontroller via a bootloader. Programming was simplified somewhat by an API that abstracted away lower-level functions (eg. timer setup, PWM registers, H-bridge control) with more simple functions (SetDirection, SetSpeed, etc.).

In addition, an infrared proximity sensor was developed to allow non-contact wall sensing.

Design Constraints

  • Cost – A very limited budget was available per kit was available so a strategy of low parts count and donated parts was pursued.
  • Size – As the kits were to be mounted on a small robot, they had to be as small as possible, while still being large enough to be assembled easily by inexperienced students.
  • Ease of Programming – That kids would be taking the kit home to use meant that a development environment had to be easy to use and free. Little or no programming hardware would be required by the home user.

My Role

  • Parts selection. Particular emphasis was on the microcontroller selection (PIC18F2620) and H-bridge (SN754410), as these parts were either less expensive or could be sponsored. The H-Bridge in particular required design considerations, as that chip did not include back-EMF protection diodes on-die. The IS471FE IR sensor was selected to reduce board complexity, as it included its own modulator for IR transmission.
  • Circuit Board Design. The board had to be laid out taking into consideration the ease of assembly and size issues. In addition, a clear and descriptive silkscreen was required to ensure proper assembly.
  • Programming. A simple API with example code had to be developed to ensure that the students could concentrate on their robot’s logic rather than the details of the PIC18 architecture.
  • Documentation and Training. As MPLAB and C18 are somewhat difficult for new users to operate, a manual and sample project had to be developed to guide the students through setting up the development environment. Further, the concept of the serial bootloader had to be explained, as well as its proper use.

Lessons Learned

  • Development Environment – The computer labs presented a challenge to using the development environment properly, which was difficult as the environment was already somewhat complex to begin with. In future, a simplified IDE, such as the Arduino environment, may be more appropriate.
  • Time Budgeting – Assembly and introduction to MPLAB took so long that there was little time at the end of the camp for students to fully program their robots. In future, either a simplified design or a faster-paced construction session, combined with an easier-to-use development environment, would ensure more time for programming.
  • Working with Adolescents – The older kids proved to be much more difficult to work with, even more so than initially anticipated. Several students moved ahead quickly, skipping indicated steps despite instructions not to. This often resulted in their kits not working properly at the end of the camp.

    This was not the case with all of the students, of course – some of them gladly accepted advice and showed a keen interest in learning, advancing rapidly.