Bluetooth RC Bot


Description

Use a simple iOS application to control a Magician Robot via Bluetooth LE. A virtual joystick is used on the iOS device to manipulate two differentially controlled PWM motors on the Magician Robot. Three degrees of freedom is possible (any direction on the cartesian coordinate, rotation about an axis, and speed control).

PowerPoint Presentation

Group Members

  • David Bray
  • Nick Sheehan
  • David Whitney
  • Adrian Winata

Components


Pinouts

MbedH-BridgeMotor
p21PWMB
p22BIN2
p23BIN1
p24AIN1
p25AIN2
p26PWMA
VOUTVCC, STBY
VINVMOT
GNDGND
AO1Right Motor +
AO2Right Motor -
BO1Left Motor +
BO2Left Motor -
nRF8001MbedDescription
SCKp7 SPI SCKSPI data clock pin, connect to your SPI master clock out
MISOp6 SPI MISOSPI data out pin, data is sent from the module on this pin. Data level is 3V but that is fine for 5V microcontrollers
MOSIp5 SPI MOSISPI data in pin, data is sent to the module on this pin
REQp9basically what the nRF8001 considers the 'SPI Chip Select' pin, an input
RDYp8data-ready pin, an interrupt output from the breakout to the microcontroller letting it know that data is ready to read
ACT--output from the module, lets the host know when the nRF8001 is busy
RST--reset pin input
3Vo--output from the onboard 3.3V regulator, you can grab up to 100mA from this pin.
GNDGNDcommon ground for data and power
VINVOUT3-5 VDC input to power the breakout

Source Code

Import program4180_Project_BluetoothRCBot

Use a simple iOS application to control a Magician Robot via Bluetooth LE. A virtual joystick is used on the iOS device to manipulate two differentially controlled PWM motors on the Magician Robot. Three degrees of freedom is possible (any direction on the cartesian coordinate, rotation about an axis, and speed control).

iOS Application Source Code (Requires Xcode)


Pictures

Front-Top View

/media/uploads/awinata/img_1460.jpg

Side View

/media/uploads/awinata/img_1461.jpg

nRF8001 Closeup View

/media/uploads/awinata/img_1462.jpg


Video Demos


1 comment on Bluetooth RC Bot:

21 Jun 2015

I am running this now, but falling into a few issues...

Having powered up my new module, it isn't showing up on any bluetooth devices ( I am primarily using the Bluefruit LE app recommended by ADA Fruit, on iPhone 5s, iOS 8.3 ).

Having traced the code, blePeripheral.begin (); isn't working in main.cpp (approx. line 68)

This is because nRF8001::begin isn't working in nRF8001.cpp

Because waitForSetupMode(); isn't working in nRF8001.cpp (approx. line 201)

I have traced this to the "while (!setupMode){" loop in nRF8001.cpp (approx. line 778)

Where and why does "setupMode" get activated is this a software issue, or is it triggered by a hardware input? I will continue tracing, but any thoughts would be much appreciated.

Thanks,

George

Please log in to post comments.