Blog

Robot controlled with EyesBot App

John Keogh | September 10, 2015

This post discusses how to make a robot based on the EyesBot app and a RedBear Labs Blend Micro. The app runs on an iOS device and communicates with the Blend Micro using Bluetooth LE. I gave a talk related to this at the January 22, 2105, XCoders Meetup in Redmond, Washington

Note: electronics may pose hazards including damage to the electronics, your possessions, fire, injury, or death. You use the information contained in the post at your own risk.

The following video shows the app in action

The parts list is:

Item NameNumber neededUnit PriceSource
Blend Micro1$27.00Red Bear Labs
GM-9 Motor2$8.50Solarbotics
Schottky Diode1$0.43Mouser
SPR-39MVWF Dual State LED1$0.65Mouser
Motor Driver L293D1$4.13Mouser
3.5MM terminals3$0.65Mouser
47 Ohm resistors2$0.65Mouser
150 Ohm resistors4$0.10Mouser
82 Ohm resistor1$0.12Mouser
100K Ohm1$0.21Mouser
1M Ohm resistor1$0.10Mouser
20K Ohm resistor2$0.10Mouser
KSP13TA NPN Transistor2$0.25Mouser
0.1 uF capacitors2$0.31Mouser

You will also need a power source and some headers, unless you want to solder the Blend Micro and Motor controller directly to the board

Blend Micro Code

The Arduino sketch is fairly simple and you can download it here. The communications between the iOS device and Blend Micro take place on a pair of Bluetooth mutable characteristics used for TX/RX, creating a virtual UART over BLE. The most difficult thing is getting the Arduino IDE set up to work with RedBear Labs Blend Micro, which as of this writing doesn't work with Arduino IDE 1.6 (you'll need 1.0.x). The instructions are http://redbearlab.com/getting-started-blendmicro/

Board

You can setup the components on a breadboard, or you can purchase a board we have designed and made available on OSH Park. We do not warranty that the board is safe to use or will be useful for any specific use. If you make boards at home, you can use the PDF stencils, otherwise you can order the boards from OSH Park. The following image show a PNG of the board from Fritzing. The values of the components are:

SD1: This is where the Schottky Diode goes
R1: This is a 150 Ohm base resistor
R2: 82 Ohm resistor for the white LEDs
R3 and R4: These are 47 Ohm resistors for the dual color state LED
R5: This is a 150 Ohm base resistor
R6 and R7: These are optional 100K Ohm and 1M Ohm resistors to form a volage divider so you can measure the voltage of the battery safely using the A5 pin
R8 and R9: 20 KOhm pulldowns on transistor bases
C1 and C2: These are 0.1 uF capacitors across the motor leads to suppress motor hash
T1 and T2: These are NPN Transistor to drive the lights and the D5 pin, respectively. The D5 pin can be driven using Javascript.
Status: This is a two color LED to show the Bluetooth connection state of the Blend Micro
The terminal blocks go into the stenciled left and right motor area and the power area
Along the bottom for the power, A4...!D5, and Raw stenciled areas, you can solder headers so that you can use the respective pins on the Blend Micro. The ! lets you know that D5 is a sink

If you may be interested in buying a presoldered board, please contact us. If there is enough interest, we'll put together a small run and sell some boards.

Programming the behavior of the robot

The EyesBot app enables you to use Javascript to program the robot. The Javascript is run in your browser, but the files are stored on the iOS device on which the EyesBot app is running. There is a reference for the functions that can be called and some example code in the reference manual. You can also see a specific example of using this Javascript library for computer vision in another blog post.

Eyesbot Company

Computer vision

Artificial intelligence

Effecting the physical world