This Christmas I got a really neat Arduino Car Kit off Amazon which I jumped on straight away to start building. I’ve tried building a car exactly like this in the past however it was simply a card board box with two motors which didn’t even have enough power to push itself with an Arduino Uno in it, so this kit was exactly what I needed. In particular were the motor driver and battery box which when used together could power motors to carry a surprising amount of weight!
To start off with I used an Arduino Uno to test that everything was working with the L298N Motor Driver which is quite self-explanatory and makes life very easy for programming the motors. You can find instructions on how to use it here.
An interesting problem which occurred was that the Lumia 1020 phone I was using as the camera was incredibly heavy and was toppling the car whenever it reversed, after hours of re-engineering and shifting around the centre of gravity I finally fixed it by moving the power charger (the cylinder) to the very back of the car and building a bumper out of Meccano and adding it to the front which would stop it tilting. I also managed to strap the phone very tightly to the car which worked out very well and works by having a skype call running with my laptop via WiFi.
I also made use of a breadboard to avoid wasting power by having the motor controller continuously connected, the Edison can also be turned off by disconnecting it from the power charger. All-in-all this was a great project which lasted a good three days over the Christmas break. View the code below.