Showing posts with label Bluetooth. Show all posts
Showing posts with label Bluetooth. Show all posts

7/30/2013

Arduino and Android control speed and direction of RC Surfer

Accelerometer sensor controls throttle and rudder


My RC surfer project (see last Blog entry) evolves into much more work than thought and the last addition is the control of the dc motor speed and the rudder with the Android phone.

Using the accelerometer sensor x- and y-axis values which are sent via bluetooth to the Arduino board I can in-/ decrease the speed of the motor by turning the phone up and down. To control the rudder I have to flip the phone to the left or to the right.

The reaction time with the first code on Android/ Arduino was kind of slow. I had to optimize the code and now it reacts almost in real time. Only the voltage value which is displayed on the phone is jumping when there is (too) much load on the system. I might have to add some isolation to the Arduino power supply to avoid too much noise when the motors draws much current.

The next thing I will do is to design a PCB which fits into the free space of the RC surfer in the forward compartment. So it's EAGLE time!

7/12/2013

RC Surfer controlled by Android and Arduino

Motor control and telemetry data added to RC Surfer


I just added some controls to my RC Surfer project. I can now control the power of the dc motor by a slider on my Android phone for the full scale (that's analogWrite() 0 to 255 on my Arduino). This is done by the "ENA"-Pin (enable bridge A on the L298 motor driver IC) and using PWM on the Arduino.
Remote control app with data transmitting and receiving
I also have a "Start" and "Stop" button for any "emergency" case. Later I will add the functionality to stop the engine if the bluetooth connection will be interrupted.

I also added some telemetry data coming from the RC model. For now it's the voltage of the rechargeable battery pack and the temperature of the motor driver IC.

I did some first tests outdoors and had a range of a about 40 meters (~130 foot) with my bluetooth connection. Curently I'm using the Itead Bluetooth Shield V2.2 from IteadStudio. The range might be more than enough for later tests. There is still the option to exchange the HC-05 module with a XBee but I would then loose the option to control everything with my Android smartphone. For the moment the connection is sufficently reliable.

Of course the speed and direction will later be controlled by sensors of the smartphone.The slider is just for early tests.