Immediate issues Micro-controllers and Choice.
By: Tate McGeary
One of the immediate issues with the Micro BiPed showed itself in the code and micro-controller. When researching the micro-controller, it became evident that the smaller micro-controllers do not have enough memory.
The program at minimum required 14kb of flash memory and 5kb+ of dynamic memory (SRAM). In order to compensate for this, it was planned on using an ATmega 2560 micro-controller set on a custom board designed by chip45, the crumbiuno Mega. But when testing the device it immediately became evident it would not work. The primary reason was due to the inability to connect to the Arduino IDE, two different Crumbiunos™ were tested and neither worked. To eliminate hardware issues, a continuity test was done on all the components, all of which passed. The crystal itself was also tested, for if it was bad. Using the GwInstek GDS-2062 the crystal was measured; the output (pictured below) was appropriate.
The noise in the picture above is due to the flux that coated the prongs of the crystal, however despite the noise 16MHz can be seen. This means that issues with components has been ruled out, as all parts pass scrutiny.
Due to the inability to use the Crumbriuno™, it was decided to use one of the Arduino standard boards. The micro was decided on.
While the micro has a 28kb of flash memory and 2.5kb of dynamic memory (SRAM) the code could still fit if the variable declarations are moved from SRAM to flash. This can be done through the use of an Arduino function called PROGMEM when declaring variables. There were some issues using PROGMEM, see the post detailing reduction of memory.
Due note that all values for resource usage was given by Arduino IDE 1.6.1. Arduino IDE 1.6.0+ all give the SRAM usage as a dynamic memory output when a program is compiled along with flash resource usage.
Micro Processor chosen:
As explained , the initial option was the Crumbuino Mega™ however it was not possible to get the Mega to communicate with the computers at hand. So the other option was the Arduino Micro™. The primary issue with this microcontroller was lack of resources; SRAM exclusively. To compensate the project went through and reduced the variable allocation used in the program by taking out the calibration() explained in another blog. The other issue that was determined was the lack of PWM pins. PWM pins are important because the microBiPed uses 12 servos all of which need PWM impulses to move to the correct location. Yet, the Arduino Micro ™ does not have enough PWM pins, rather it has 7. To compensate for this the project is looking into using TLC5940™ ICs produced by Texas Instruments. The TLC5940 will take the necessary information from Arduino Micro™ using the appropriate library and the correct commands the TLC5940 can turn 4 PWM pins into 16.