Prototyping, Making A Board For, And Coding An ARM Neural Net Robot

[Sean Hodgins]’s calls his three-part video series an Arduino Neural Network Robot but we’d rather call it an enjoyable series on prototyping, designing a board with surface mount parts, assembling it, and oh yeah, putting a neural network on it, all the while offering plenty of useful tips.

In part one, prototype and design, he starts us out with a prototype using a breadboard. The final robot isn’t on an Arduino, but instead is on a custom-made board built around an ARM Cortex-M0+ processor. However, for the prototype, he uses a SparkFun SAM21 Arduino-sized board, a Pololu DRV8835 dual motor driver board, four photoresistors, two motors, a battery, and sundry other parts.

Once he’s proven the prototype works, he creates the schematic for his custom board. Rather than start from scratch, he goes to SparkFun’s and Pololu’s websites for the schematics of their boards and incorporates those into his design. From there he talks about how and why he starts out in a CAD program, then moves on to KiCad where he talks about his approach to layout.

Part two is about soldering and assembly, from how he sorts the components while still in their shipping packages, to tips on doing the reflow in a toaster oven, and fixing bridges and parts that aren’t on all their pads, including the microprocessor.

In Part three he writes the code. The robot’s objective is simple, run away from the light. He first tests the photoresistors without the motors and then writes a procedural program to make the robot afraid of the light, this time with the motors. Finally, he writes the neural network code, but not before first giving a decent explanation of how the neural network works. He admits that you don’t really need a neural network to make the robot run away from the light. But from his comparisons of the robot running using the procedural approach and then the neural network approach, we think the neural network one responds better to what would be the in-between cases for the procedural approach. Admittedly, it could be that a better procedural version could be written, but having the neural network saved him the trouble and he’s shown us a lot that can be reused from the effort.

In case you want to replicate this, [Sean]’s provided a GitHub page with BOM, code and so on. Check out all three parts below, or watch just the parts that interest you.

Continue reading “Prototyping, Making A Board For, And Coding An ARM Neural Net Robot”

Hackaday Prize Entry: MiniSam-Zero

Thanks to the Arduino, Atmel’s SAM line of ARM microcontrollers are seeing a lot of use as 32-bit learning tools. For his Hackaday Prize project, [Jeremey] is using one of these chips without all the Arduino drama. He’s built a tiny Atmel SAM dev board that’s cheap, simple, and interestingly for a 32-bit ARM board, easy to program.

For this board, [Jeremy] is using Atmel’s SAM D09, the smallest member of the family that also includes the chip on the new Arduino Zero and the Arduino M0 (built by the other Arduino). The MiniSam-Zero uses a slightly smaller chip with 8 kB of on-chip Flash. Eagle-eyed complainers will notice the SAM D09 does not have internal EEPROM, so an EEPROM is added on-board. Also on board is a temperature sensor and a Silicon Labs CP2102 for serial communications.

That last chip – the Serial USART – allows for a rather interesting build if the firmware is done right. Instead of futzing about with ARM SWD while programming the device, a serial bootloader would allow anyone to plug a USB cable into this board and upload code straight from an IDE. This is perhaps the coolest feature of the MiniSam-Zero, and something [Jeremy] has worked tirelessly to get right. He can upload directly from Atmel Studio, and after a bit more work, [Jeremy] will be able to program this board directly from the Arduino IDE. That’s great work, and although this board isn’t as capable as other ARM microcontroller offerings, it’s still a fantastically useful device.

The HackadayPrize2016 is Sponsored by: