Mini Robot Cart – Part One

Mini Robot Cart – Part One

Introduction
This is the third robot cart I have built and arguably the best and most versatile. I wanted to see what I could fit in the small Jiffy Box and still work as robot cart. (actually the term robot is technically incorrect, remote control would be better in this instance) In my opinion it was successful because the grandkids had fun playing with it for over 2 hours, taking pics, turning the lights on and off, driving it in the dark.


The brains of the cart is a RaspberryPi Zero. Which sets itself up as a WiFi HotSpot. Connect to this via a web browser, camera video is displayed and cart movement can be controlled. The LED lights can be turned on and off and pics taken and displayed (up to 9). The cart also plays 1 of 29 audio files randomly selected at random times.

Motors
The motors were the 2nd slowest I could find. Previous carts had moved too quickly. Probably the motors are too slow because it takes a long time to get anywhere. But the motors do not use much current (5V 22mA no load each) and are well within the spec of the motor driver. (200mA)

Encoders
Each motor has an encoder which can be used to tell exectly how far the motor has moved. With a 4.3cm diameter wheel I calculate one encoder pulse represents 0.07mm of travel. In reality it is not that accurate.

Originally I programmed the Pi to record encoder pulses which could then be played back. ie you move the cart in a certain pattern which the cart can then repeat by itself. It was not very successful. Many factors like wheel slippage on surface, possible missed encoder pulses, slight variation in motor movement. Testing with no load showed encoder pulses can vary by as much as 5% over the same time period.

Motor Speed Variation
Testing with no load revealled the motor speed was different by 6.5% between the two motors purchased. When running on the floor the cart would turn slightly in one direction when it was supposed to be moving forward. So, in the final design the encoder pulses were used to vary the speed of one motor to match the other. It does this continually and for each motor.

A secondary problem with the motors is they are horizontally opposed, one moves clockwise, the other counter clockwise. There was a noticed speed difference between clockwise and counter clockwise in the same motor. The orientation of the motors was chosen to produce the least diffence in speed when the cart is moving forward.

Both motors sound very different too. One is much more noisly than the other.

Power Supply
The battery (7.2V 900mAH) was chosen, mainly due to its size. It fitted neatly in the available space. It has more than enough power to run the device for over 2 hours as the grandkids playing with the cart demonstrated. Peak power usage is around 340mA when the motors are running, 270mA when a web page is connected, 140mA no page connected. (IMHO the Raspberry Pi is great device but a power hog).

Charging the battery was an issue, having to remove the panel of the case to get access. The two jumper pins on the side near the wheel allow access to charge the battery without the panel removal. They also allow powering of the unit via an external supply for bench testing of software.

A Pololu 5V 2.5A power supply board was used to convert the battery 7.2V to a level acceptable to the Pi, sound amplifier and other bits.

Part Two Parts List.
Part Three Software.

Regards
Jim

7 Likes

Hey Jim,

That’s a super neat little project you’ve got there. I would definitely submit that via our projects tab on our website to be published and to receive a store credit! check it out: Create a Project Australia

2 Likes

I had an email from Garth36767 on the 18 June asking how the lights are turned On and Off.
The post seems to have been removed.

The lights are driven by one of the outputs of the Explorer Board. The Raspberry Pi switches this output on or off depending on information received via the tablet wifi. The web page has a icon which, when tapped, toggles between light on or light off.
The Explorer Board Darlington drivers are capable of driving up to 500mA. More than enough for two LEDs.

Cheers
Jim

4 Likes

Hi and thanks for the reply Jim. : )

3 Likes

Hey James,

Awesome project!! I love the wiring in particular.

Liam.

2 Likes