Monday, 20 May 2013


Earth Rover 

Part III

Providing Power, Direction and Speed Control


 Wiring the Motors, DPDT Relays and PWM to the MOSFET

Also see our new site  Eusentient.com

The diagram above shows how I wired four of the DPDT relays (on my eight relay board) to control the direction and speed of the motors for the Rover's wheels. NB the circuit for controlling the relays using an Arduino pin is ready made on the eight relay board - here.

A logic level, power N-MOSFET switches high current to provide motive power at 12vdc vdc. The gate is controlled by an Arduino PWM pin so speed can be adjusted accordingly. However each individual relay is only capable of switching 2A at 12vdc, but that can give me 24watts, per wheel in theory. There is also a 24v version.

When the Arduino PIN V1 is set to logic 1, the motor goes in one direction, and when set to logic 0 the  the DPDT relay switches it to go in the opposite direction. Fly-back diodes  (D1 and D2) are used to reduce emf spikes from the coils in the relay and motors. D1 is an integral diode in the MOSFET package.

 I decided to make a perf-board version of the Mosfet PWN driver circuit x4 using this free design app.

Mosfet PWN driver circuit x4

 I could have made it more compact, but I wanted to keep the symmetry of the design:

Perf-board Mosfet PWM driver circuit x4 with heat sinks

I glued aluminum heat sinks to the Mosfets using epoxy-based thermo-paste, and used Schottky power diodes for fly-back [those are the big black monoliths]


Saturday, 18 May 2013

Earth Rover 

Part II

Android-Arduino User-Interface

Tablet Screen Shot

This is my first stab at producing a user interface to communicate with my Arduino Earth Rover over blue-tooth. I given links to the code below, it's a bit raw but there lots of work to do. You can send commands from the Android, like setting the speed and direction. Also there is some test code to confirm the sending of data from the Arduino, eg a bump sensor. When the correct data  is sent from the Rover an alert toast appears and the text of a button will change to red, depending on which side of the Rover was bumped.

***Disclaimer***
 * Please note this code is provided for free and AS IS. There is no support and no guarantee
 * from the Author. As a non-expert I am happy to answer constructive comments and questions.
 *****************
 *Subject to GNU licence version 3 and copyright of Craig Turner May 2013:

 * please use it, modify it, and enjoy it.
 * If you find it useful please link to my website:
 * http://gampageek.blogspot.co.uk/2013/05/blog-post.html
 *
 * Bluetooth coding based on Matt Bell's Blog here:
 * http://bellcode.wordpress.com/2012/01/02/android-and-arduino-bluetooth-communication/
 */
Arduino code here
Android code here


Earth Rover 

Part I

Arduino Semi-Autonomous Robot 

With Android User-Interface

Ok, I'm not even attempting to build something like a Mars roving robot  :o - but my mini budget earth rover is a good starting point for me to learn some more robotics. I've built RC and sequence (dancing) robots before see here, but not an autonomous robot with sensors that can find it's own way around a space.

I've pulled together some resources to start with, some used in previous projects:

  • A 4WD robot car chassis here

     
  • An android tablet
  • A Japanese eight module DPDT relay board from Ebay £29 [to direct power to the motors]

  • Arduino Mega 2560 dev board  from here

  • An OWI-535 Robotic Arm from here



  • An SRF05 ultrasonic sensor from here
  • A selection of micro-switches to act as bump-sensors from here


  • Discrete components such as power MOSFETs, power fly-back diodes, resistors, capacitors, leds, terminals, headers etc... from a standard electronic supplier eg here
https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Componentes.JPG/400px-Componentes.JPG
[Image is not of actual components used]


That's a start.

Coming soon in Part II -  Arduino remote control from an Android tablet over blue-tooth.