DSC_0076

During the past year, we’ve been testing and experimenting with the Liberty Car.  Not least was taking the web application code used in the Liberty Car and modifying it so that it can work with any remote-controlled (RC) car with similar modifications. The code is now flexible enough to work with other cars and is now available on our GitHub page!

We’ve also been looking at the hardware used in the Liberty Car and, after lots of testing, we have a parts list that is a good compromise between cost, ease of implementation, and flexibility. So now you too can create your own Liberty Car!

In this article we’ll explain how to build the Liberty Car hardware.

Hardware shopping list

Here’s what we used to create our new batch of Liberty Cars. You can swap out some of the parts easily with functional equivalents but, for some, you’ll have to re-work our code.

Part Use Alternatives
Car chassis (we use Tamiya TT-O2)Sometimes they come with a motor, ESC, servo, and radio transmitter/receiver. If it does, make sure the ESC and radio receiver are separate devices in the car and can be unplugged from each other. The car chassis itself. None. Unless you want to build a Liberty Boat (in which case, get a boat).
Motor Moves the car forward and backward. None.
ESC (Electronic Speed Controller)Make sure it is for use in RC cars and not RC boats. Takes signal commands from the PWM board and sends power to the motor based on those commands. None.
Servo Steers the front wheels of the car. Some cheaper RC cars have a motor at the front. Using a motor loses fine-grained control over where the wheels are facing (control will full left, full right, or forwards).
Raspberry Pi (Model B)256MB or 512MB are suitable. Hosts and executes the code that controls the car. You could use a Raspberry Pi model A but you would lose the ethernet port, which is used for the WiFi router. Could also use an alternative board as long as it can run Java and has GPIO/USB/ethernet.
SD card (we have 8GB which is more than enough)Get any size you want above 4GB. Holds the operating system and code for the Raspberry Pi to run. None.
WiFi router (we use the TP-link nano) Gives the car its own WiFi network letting other devices connect to the car without needing an existing WiFi network. Could be replaced with another WiFi router (easier if it can be powered over USB). Could be replaced with a USB WiFi dongle if you have an existing network you can connect the car to.
PWM controller board (we use Adafruit 16-channel 12-bit PWM/servo driver –i2c interface) Takes the signal from the Raspberry Pi GPIO pins and sends PWM signals to the steering servo and ESC in the car telling them what to do. Could be replaced with another PWM capable board. The Raspberry Pi can send 1 PWM signal in hardware and can create more through software tricks (though this can be tricky to get working). You only need 2 PWM signals to make the car work.
Ribbon cable cobbler Nice way of connecting GPIO pins on the Raspberry Pi to the PWM controller. Could use direct wiring instead. Having the ribbon cable makes it easy to connect/disconnect the Raspberry Pi from the car.
Voltage regulator board (we use LM2596 voltage regulator)Needs to be adjustable and to support 7.2v in and 5v out. Takes the voltage from the car batteries (typically 7.2v) and converts it to 5v for the Raspberry Pi. None.
Micro USB cable We will be chopping off the USB male end of the cable and using it to connect the voltage regulator to the Raspberry Pi. None.
Tamiya style Y plug adapter (as long as your battery has a Tamiya connector)Make sure the adapter matches the battery/ESC connection type. Lets us split the one power output from the car battery into two. We can then send one line to the ESC/motor and the other to the voltage regulator. You need to split the one output from the battery to two so using this makes it simple. You could just put extra wires coming out of the existing connections instead.
Ethernet & USB power for the WiFi router Takes power and data from the Raspberry Pi to the WiFi router. None.
Misc. wirePreferably 4 colours and about 5cm long in each colour Will not need to take much current – only working at 5v. Takes voltage and signal from ribbon cobbler board to PWM controller board None
Battery for RC car (we use NiMh 7.2v Tamiya batteries which are very common) Powers the whole setup None
Battery charger for battery Charges the battery None

Once you have all of the above parts (or suitable alternatives), you can start building your Liberty Car!

Building the car

Make sure you have the following tools:

  • Soldering iron and solder
  • Wire cutters
  • Wire strippers
  • Voltmeter (DC voltage)
  • Any tools needed in the RC car chassis construction (depends on the car/kit you get)

Tip: Make sure that none of the separate circuit boards come into contact when plugging everything in and avoid short-circuiting the boards.

  1. Assemble the car chassis (including adding the ESC, motor, and steering servo). This might not be necessary if the car you have is pre-assembled. If you car comes with a radio transmitter/receiver, remove it from the car and unplug the servo and ESC.

    car in progress
  2. Take the Tamiya style Y plug adapter and cut one of the male ends off the adapter.

    Tamiya Y connector
  3. Strip the end of the adapter from which you removed the male connector, then solder it to the input + and – terminals on the voltage regulator (red = positive, black = negative).

    Tamiya Y connector attached to voltage regulator
  4. Charge the battery and attach it to the female end of the splitter cable.
  5. Take your voltmeter in DC mode and read the voltage on the output terminals of the voltage regulator. Adjust the voltage regulator until the voltmeter reads 5v output from the voltage regulator.

    Setting voltage regulator to output 5v
  6. Take the micro USB cable to power the Raspberry Pi and remove the full size male end of the cable, leaving as much length on the cable from the micro USB end as is needed (I normally leave ~20cm).
  7. Strip the end of the cable from which you removed the full size connector. You should find four wires. You only need the red and black (power) so remove the other 2 and strip back the red and black cables so we can solder them.
  8. Attach the red and black cables to the positive and negative output from the voltage regulator (red = positive, black = negative).

    Voltage regulator with tamiya Y connector and USB micro attached
  9. You should now be able to plug the battery into the Y splitter cable and the micro USB end from the voltage regulator into the Raspberry Pi and see it start to boot up (red and yellow lights). Congratulations, you just set up the power conversion for the whole setup!
  10. Unplug the Raspberry Pi micro USB cable before continuing.
  11. The PWM controller board from Adafruit normally comes without the pins soldered on, so solder one group of pins to some of the output channels on the board (refer to the photo for which pins we attach – normally channels 12 through 15). This is tricky as you need to solder each individual pin whilst avoiding letting solder from the different pins create a connection between the pins (which would create a short circuit).

    Adafruit 16ch PWM controller


    Adafruit 16ch PWM controller soldered attachment
  12. Take the ribbon cable cobbler board and four wires ~5cm in length (preferably a different colour for each to make things easy). Attach one wire between each of the following connections (left side being on the cobbler, and right side being on the PWM board):
    • GND -> GND
    • SCL -> SCL
    • SDA ->SDA
    • 3v3 -> VCC

      Ribbon cobbler to PWM controller
  13. Plug the ethernet and WiFi router USB power cable into the Raspberry Pi. It doesn’t matter which of the two USB ports on the Pi you use to supply power.
  14. Plug the SD card with a Raspberry Pi OS installed (we use Raspbian) into the SD card slot on the Raspberry Pi.
  15. Plug the ribbon cable onto the Raspberry Pi GPIO pins. Make sure the “lump” on the long side of the ribbon cable is facing towards the inside of the Pi and not away from the Pi.
  16. Plug the ribbon cable into the ribbon cable cobbler board you just attached to the PWM controller. It should only fit into the ribbon cobbler board one way.
  17. Plug the servo cable on to channel 14 on the PWM controller. The servo will plug in vertically with the white wire on top.
  18. Plug the ESC cable on to channel 15 on the PWM controller. The ESC will plug in vertically with the white wire on top
  19. Make sure the ESC is switched off (if you have a switch), then plug the splitter cable into the ESC power input.
  20. Plug the micro USB cable from the voltage regulator into the Raspberry Pi. If the battery is still connected the whole setup should now power on. If not, plug in the charged battery.
  21. The whole setup should look like this:

    Complete setup
  22. Check that the PWM board has a green LED illuminated.
  23. Check that the Raspberry Pi has at least 1 solid red LED on and at least one of the other LEDs is flickering.
  24. If you do not see the LEDs in steps 17 and 18 check that all cables, the ribbon cable, and all soldered points are making good contact and are not loose or short circuiting.

In the next article, we describe how to set up the Liberty Car software.

Join The Discussion

Your email address will not be published. Required fields are marked *