Let's Make Robots!

Remote controlled Rover 5 Robot

Drives around controlled by a remote.

I have a rover 5 chassis (4 motors, 4 encoders). My goal to use this chasis to create a robot that drives around and is controlled by a remote.

 I am new to robotics and I am unsure about how to assemble my robot chassis / what to do next. After discussion I have decided to use an Arduino Uno with this remote.

I already have the board pictured here as well as the Arduino Uno.

My Arduino Uno is the one pictured below:

I recieved the following parts, along with the chassis itself and a battery holder capable of holding 6 batteries (total 9V)

I am now in the process of connecting up the motors with the motor driver and the Arduino Uno as mentioned on this comment, and as below:

  1. Connect a PWN pin on your Arduino to each pin on the board that says PWM.
  2. Take A regular digital output on the arduino to each pin marked DIR.
  3. (Optional) Take Analogu inputs on the Arduino to each pin marked CUR.
  4. Tie the ground and 5V of the arduino to the board. (top right by the Motor 4 output)

On the Arduino forum page, I have recieved the following advice on how to assemble my Rover 5 with an Arduino Uno

I have also been given an example code to get me started, that does not use the CUR pins or encoders, that 'should drive the robot around and give you [me] a place to start."

Click here to see the original comment with the code.

I have begun on this path, and I have already connected the PWM and the DIR pins to their locations as mentioned above.

Thanks in advance!

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Joccer,

I strongly suggest that you get a few LEDs and switches and find some basic Arduino tutorials. They are all over the web, a quick google search for "Arduino Tutorial" should find you many.

It may not seem as exciting as a robot, but it is the beginning. Using PWM to control the brightness of an LED is similar to how the speed of a motor is controlled. Getting input from a switch is very similar to how sensors are read.

I make it a point to try out every sensor with a simple microcontroller (Arduino or a Teensy 3.1 for now) and breadboard before it touches a robot. This makes it easy to experiment with the sensor so that I know how it works and I have fewer surprises when I do put it on a robot.

Note: fewer does not mean none. In any sort of code, no matter how well written, adding new things can cause problems. However, the better written the code, the fewer problems.

Thank you DangerousThing for your ideas,

I will try out what you have suggested over the next few days

Thank you,

Joccer

Vin and the power socket are both power inputs from the batteries to the voltage regulator on the Arduino. +5V is the output of the regulator which then powers all the logic.

As for the IR receiver, Here is the best information I know of: http://www.sbprojects.com/knowledge/ir/index.php

If your TV remote can generate SONY IR code then you might want to try my code here: http://letsmakerobots.com/content/simple-ir-decoder-sony-remotes

One sample uses an external interrupt, the other uses a timer interrupt.

As you are trying to control 4 motors I seriously suggest getting an Arduino Mega or one of my Spider controllers. Both use an ATmega2560 which has a lot more IO pins, PWM outputs, Analog inputs, External Interrupts and Timers.

Thanks for your advice oddbot. I have ordered a remote which is in the description above. I will input the power up to the arduino via the power socket and the Vin. In regards to getting an Arduino Mega or a Spider controller, would this replace the Arduino/motor driver or work along side it? What benefits would this give me and do I need one to continue? Thankyou, Joccer

They are Arduino but with more connections. Try looking them up instead of being so lazy. You really need to spend more time searching the internet for your information. Many of your questions could be answered with a few Google searches. I gave you a link to the Spider. Did you even bother looking at it?

The 4ch motor controller your using was designed for the Spider controller. It has the same size PCB with the same mounting holes. This allows them to be stacked neatly using some hex spacers.

 

I have ordered some jumper wires to replace the somewhat dodgy connections that I have now as seen in the images above.

I have also ordered a IR remote, which comes with some basic code and wiring diagram as seen on this page

The wiring diagram is as below:

I am assuming that the +5 as labelled on the diagram is power that has gone into the Arduino from the Vin on the left, and then out through the 5V of the arduino to both the motor driver board and the IR reciever. Is this correct?

Also, does this method of power input to the Arduino board mean that the normal place where it recievers power (via the plug near the USB connection port on the arduino) is not needed?

 

Joccer

I am beginning to plan the Remote control of my Rover 5 at the moment.

For my power switch I am considering getting this.

I am thinking of getting this and this to wire the remote control recieving end up like this. (the breadboard is the same dimensions as seen on the image)

As described in the lower part of my project description, I described how the wiring istructions I have been given already use 4 of the 6 PWM pins on the arduino. As this remote control reciever connection requires another 4, what is the best way to be able to connect the reciever breadboard and the other connections at the same time / is there a way to get around this?

Are these parts okay? If anyone has any suggestions/ideas please let me know.

Thankyou,

Joccer

A remote control does not need any PWM pins. I think you better study the datasheets.

I've used that power switch myself and I think it should be fine. 

3 of the 4 PWM pins to be used by the receiver appear to be used to control a RGB LED. You can get 7 different colors from a RGB LED without using PWM. You could probably get a few bits per color control by just using a software PWM.

I don't understand why the IR receiver needs a PWM pin. The IR receiver should be set as an input anyway. I would have thought the IR receiver could be used on any I/O pin.

I have bought an very simple on off switch (with enough voltage capacity), I have ordered this remote. It comes with a reciver as shown - so no need for a breadboard.

Thanks

Joccer