Remote Control Vehicle

I really want to be able to create a remote control vehicle with my Pi! For a project, I would love to be able to press the up arrow on my keyboard to make an RC car go forward. The problem is, I don't know where to start.

Would I use infrared or PWM to control my RC vehicle? What would I need and where would I begin?

How do you put it all together? Well, your car will likely have 2 motors, they must be connected to an H Bridge, which has two functions. First of all an H Bridge makes it possible to "run" each motor in both directions, and it also takes power from an external battery pack and feeds it to the motors. The raspberry pi cannot generally power the motors directly (depending on their size) because it can't supply enough current.Once the H Bridge is connected to the motors and to the raspberry pi you can already start experimenting moving the motors.

Options:WiFi dongle, (tight ?)VNC Server at boot, smartphone operating as a WiFi hotspot. This way if things do go wrong at least you can log in to the RPi to try to resolve them. Possibly need to look at security issues here

Like yourself I have dived in at the deep end and looking to learn Python with a motorised project! Like the MagPi project I am using a Big Trak base, but as a skid drive it is the same controls as your tracked vehicle.

Instead of the H-Bridge I have opted to use a 4 relay board, each relay has two positions, Normally Open (NO) and Normally Closed(NC). The relays can handle over 240V so they give me opportunity to migrate all this into something with bigger motors

The NO position has the positive voltage, the NC has the negative and the contact is attached to a motor terminal.

If relay A is energised motor terminal A has 5v, relay B has 0v the motor turns in direction 1, if relay B is energised the motor terminal B has 5v, relay A has 0v motor turns in direction 2. Here we have the basics for a skid drive!

Now to make a program that relates a Key press to a relay. In order to go forward the left motor needs to go anti clockwise, while the one on the right needs to go clockwise.

Wire the batteries (maybe some circuitry to get the voltage right) to power the 'pi.

Wire some 'pi gpio lines to the bridge circuit (two gpio lines per motor will get you off, backwards, forward, and smoke . The same circuit will need power from the batteries.

To prototype it, start out running raspistill to read out the camera once per second to a file that's visible via a web browser. The same page that shows the camera image would also have a html form and four buttons (left, right, forward, backward). Pressing a button would run some cgi script that uses the gpio lines to control the motors.

Improvements would be to clean up the script described above to use video and maybe click on the video to change directions, etc. Add pwm to control motor speed.

Hardware improvements would be to make rpi pcb daughter board that would incorporate the motor driver, battery power clean up and charging. Maybe some more sensor inputs, servo outputs for aux stuff....

if you want a more beginner way you might want to invest in a mindstorms nxt robot. This will provide you with sensors and multiple motor/servos as well as parts to build the robot with.parts:1. Mindstorms NXT2. Raspberry Pi3. Wifi dongle4. Some sort of battery pack to power the pi