Autonomous Driverless Car

Introduction:

The Arduino Nano 33 BLE Sense is an Arduino Nano with the capacity for machine Learning (using TinyML) but in this case I am using it simply as an Arduino. The aim is to get it to navigate around a course without bumping into anything, (sides or obstacles). It is more of a coding challenge than technology.

Further Development:

  • Use the bluetooth to either control or receive data
  • Use in conjunction with a Particle Photon for data
  • Add a camera
  • Solar/wind powered
  • Motion/light response
  • Include Machine Learning

Components:

2 x Continuous rotation servo and wheel

These servos rotate 360˚ rather than the usual 180˚. So they rotate continuously in one or other direction when they are given certain values and no rotation at another value. There are plenty of very cheap ones out there but they have a very narrow band width for when they are not rotating which means they can creep. It is worth getting a more expensive one because they are easier to use.

Arduino Nano

The Arduino Nano is scaled down version of the Arduino Uno. So if you are familiar with the Arduino Uno you will be familiar with this. I am using the Arduino Nano 33 BLE Sense (because I have one). You can just use an Arduino Uno. With the Nano being smaller it makes the car more compact.

Power pack

You need power, quite a bit because the servos are quite power hungry. I use one large double output power pack but you could use 2 smaller ones, however you will be recharging one of them quite a lot. I recommend getting a bigger size in terms of mAh. These are the sort that are used to charge phones.

Ping Pong ball

Yes a ping pong ball, you could think of something else but these are cheap and low friction. You will need to cut it in half which is a little bit tricky. You could use it whole and cut a hole for it in the chassis. A simple and elegant solution.

USB TTL adapter

This is an adapter you push into your power pack and it means you can connect leads to the ground (GND) and the 5volts. So you can connect the two rails on the breadboard from a power source. A very simple and effective way of powering components.

Male/Male jumper leads

These are cables/leads/wires that you can push into the breadboard to make connections. They come in multi-coloured bundles of varying lengths. They have pins at each end. You can also have female connectors which you can attach pins to.

Female/Male jumper leads

These leads have a male pin at on end a female connector at the other. You will need this to connect to the TTL pins one one end (female) and the breadboard at the other (male).

HC-S04

This is an ultrasonic distance sensor. It is digital, it sends a pulse out from one of the ports and measures how long before it returns to the other one, from this you calculate the distance. They are cheap and easy to use. Think car reversing sensors for every day practical application. However they are not so good if the surface is at an oblique angle. I have included three of them so that I get the side values as well.

Components

These are all (or most) of the components you will need. Total cost is around £20 which isn’t bad. Plus a power pack which can cost around £10 for a cheap one. The chassis will be made out of cardboard. You might want to get some double sided tape and some duck tape. The double sided is to keep things in place and the duck tape is to clamp it all together. The Nano 33 BLE Sense is a bit more expensive that a basic nano or uno.

Stages

  1. Connecting the components
  2. Upload the code to the Nano
  3. Test it
  4. Building the chassis
  5. Testing again and make improvements
  6. Create more challenging terrain
  7. Have a competition (racing round a circuit)
  8. Add more features (if I get that far)
  9. Have fun

Stage 1 – assembling the prototype

Putting it all together so that I can prototype it before I make it for real, all I have done is used double sided tape to temporarily place things on a cardboard box so I can now play with the code and get it working code wise.

Wiring diagram

Wiring diagram for the Internet of Cars. The two leads (red and black) connect to the TTL +5v (red lead) and GND (black lead).