The Lets Make Robotics web site has an option for members to volunteer to review products. I was fortunate enough to be selected to evaluate the Cytron EduBot2 product. Cytron sent an email with basic info and shipped the product from Malaysia to Maine via DHL. Product arrived in about 12 days. Due to other commitments it was a week before I could start.
The package included the assemble robot, PICKIT2 compatible ICSP programmer, dual 18650 batteries with holder, and a 18650 charger with European style AC plug. The robot consists of an aluminum deck, 2 micro motors, line follower board, and main circuit board. The main board contains a PIC16F887 CPU, L293 motor driver, 2x8 LCD display, and assorted LEDS, switches and connectors.
Note: I would have preferred the kit.
No manual, no development media. I did a Google search for Cytron EduBot2 and got a number of hits. Selected the entry that looked like the corporate site and went searching for documentation. It took a while. A printed document with getting started info would have been very beneficial. EduBot2 comes pre-programmed with a series of hardware validation routines and a demo line follower module. The self-test ran successfully for the first 8 or so test and then hung, I was not familiar with the abbreviations for the hung condition.
Note: After examining the source code I found that the validation suite includes tests
for hardware that is not installed on my unit. I should have skipped the those selections.
I then located the source code for the validation suite. It is written in very understandable generic C with macros specific to the PIC16F887 processor. The code had been compiled using Microchip MPLAB and the HiTech C compiler. I had neither installed. I routinely use MPLABX and the Microchip XC compilers for the PIC24 processors so I downloaded the Microchip XC8 tool set. It took a while to get the proper configuration pragmas but 99.9% of the supplied code compiled without any effort on my part.
Note: MPLABX IDE and the XC series of compilers are the current Microchip development offering.
The older MPLAB and HiTech tools are still available for download.
Prior to trying to program the device myself I decided to set up a small line follower circuit. Pushed the buttons till the loop demo was active and let it run. Robot followed the course very nicely. Having 5 active line sensing devices really helps and the micro gear motors are very smooth. The directions for calibrating the line sensor are sparse but there must have been sufficient contrast between the table top surface and the tape.
I am really confused about who the EduBot2's marketed towards. It seems to be a dedicated line follower robot. If so, then it might be targeted towards the 12 year old and their parents or schools. However, it requires using MPLAB and associated tools which are geared towards college or professional users. But what professional or college student would need a pre-programmed line follower?
I invited my 11 year old neighbor to take a look. He has no robotics experience and was entirely lost. Thought it was neat. The EduBot2 would be a great fit for him if he had the proper support environment. I used to teach CS at college and currently teach in the local school systems adult education program. IMO, this machine is to single use focused to be of interest in this venue.
One of the things I really do like about the EduBot2 is the simple non-Arduino approach. I am sick of “Just include a XXX library” and by magic everything works. This is a close to the hardware machine. If you want to do your own programming you will need to read and comprehend the Microchip pic16f887 MCU manual, understand the Cytron user guide and schematics, and study the supplied example code.
I spent about 3 days part time (9 hours) testing and reworking the Cytron validation suite and line following demo. The validation suite uses the two push button to select and execute tests. At the top level, SW1 typically is “Advance to next Test” while Sw2 is “Execute this test”. Once inside the tests they tend to use SW1 to proceed. Because they have a “Run All” option they do not want to hang on user input in the individual tests, they use a lot of timeout and wait till switches are set/released loops. This creates a genuine example of spaghetti code that is difficult (for me) to comprehend.
I must empathize that rework was just my own compulsive view of what the code “should” look like, not to correct or improve upon the work done by Cytron. They obviously know their product.
My revisions included:
1. Created individual source and include files for each hardware module.
2. Created a top level include file for system wide definitions.
3. Added #defines and #if/#endif directives to remove code for not installed hardware.
4. Wrote a separate line follower demo program.
5. Created both command line Makefile and Microchip MPLABX project files.
I did run into one really poor coding practice that cost me multiple hours of debug. The I/O port direction registers are setup in the main program while the analog/digital mode is setup in the adc module. I removed the adc module from my line follower program and the switches stopped working. Simple fix was to set all I/O as digital in main and set the specific analog I/O mode as needed in the adc module.
There are a couple features that Cytron could implement to improve to raise my interest level:
1. Install a real battery compartment or middle deck with guides.
2. Add Quadrature encoders for wheel speed feedback.
3. Simpler and sturdier base plate.
4. Better skid plate. Perhaps 3D printed plastic.
5. If possible, implement a wireless flash update procedure.