A droid malfunctions and sits unused for 12 years. Can our basement robotics crew bring him back to life?
The original droid was “autonomous,” ie included no remote control. For the rebuild, we decided to allow remote control from a cellphone using bluetooth.
Hardware for this project included:
Adafruit Feather M0 Bluefruit LE microcontroller
Feather Wing Motorshield
Feather Wing VS1053 sound board
PAM 8302 Mono 2.5W Class D Audio Amplifier
Sharp GP2Y0D810Z0F Distance Sensor with Pololu Carrier
We were able to reuse original motors, speaker, and battery stack.
Getting the bluetooth link up and running was actually the easiest part of this project. We downloaded an app from Adafruit app that links a cell phone to the M0 board.
Next we connected the motors to the motorshield and the motorshield to the microcontroller. also fairly straightfoward (tho it took a while to get the motors going in the “right” direction.)
Wiring up the sound was definitely the hardest part. The sound board is kinda fussy about voltage spikes and needed some capacitors. I also had to build a little amplifier circuit and a special voltage regulator for the amp. It was a challenge to make this all fit inside R2’s chest cavity.
We also added some basic obstacle detection in the form of a distance sensor. This prevents an overenthusiastic operator from smashing R2 straight into an obstacle.
The coding was also a challenge for me. The soundboard requires frequent updates (like every 20 ms) so you have to be very careful using delay() or making calls that might timeout. In the end the code was 500 lines, tho to be fair many of these were comments.
SPECIAL THANKS to the folks at Adafruit (hi, Mike!) for all their help on this project.
Adafruit Feather M0 Bluefruit LE; Feather is the new development board from Adafruit, and like its namesake it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.
This is the Adafruit Feather M0 Bluefruit LE – our take on an ‘all-in-one’ Arduino-compatible + Bluetooth Low Energy with built in USB and battery charging. It’s an Adafruit Feather M0 with a BTLE module, ready to rock! Read more!
Eink, E-paper, Think Ink – Collin shares six segments pondering the unusual low-power display technology that somehow still seems a bit sci-fi – http://adafruit.com/thinkink
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.