Shopping carts are useful, but all of these carts require a push or pull to move. How about we create a battery-powered cart that doesn't require human effort?
In this project, we will design a battery-powered mini motorized shopping cart using four DC motors attached to four wheels, which can be controlled using a Bluetooth app on your smartphone with a joystick remote control.
Building a Motorized Shopping Cart
This shopping cart can be built using readily available items such as a shopping cart, four 10” wheels (used in robotic cart), four DC gear motors (12V @ 300 RPM), PVC pipes and an acrylic sheet.
Items needed for the cart
- Shopping Basket – is a 30” x 20” x 15” plastic shopping basket
- PVC Pipes T-Joints, L-Joints – we require 4 L-Joints, 2 T-Joints, 1” PVC pipe
- Acrylic sheet – is a 3' x 1.5' 4mm thick clear acrylic sheet
- Wheels – Four 10” diameter wheels
- DC gearmotors – four 12V 300 RPM DC gearmotors
When you have all the necessary items, follow the step-by-step process of building the cart.
Step 1: Build a frame using PVC pipes, T-joints and L-joints. The frame size is about 3'x 1.5' (36” x 20”).
Step 2: Fix the 3'x 1.5' acrylic sheet to the PVC pipe frame with screws and prepare a base for the shopping cart.
Step 3: Attach the 2'x1.5' shopping basket to the base of the acrylic sheet with screws as well as fevicol.
Step 4: Attach a 10” wheel directly to the DC motor shaft using the screws provided.
Step 5: House and secure two motorized wheels side by side inside a 2” diameter PVC pipe and prepare the front, left and right wheels. Prepare the left and right rear wheels in the same way.
Step 6: Finally, fix the four front and rear wheels with a PVC pipe frame using clamps and screws. The motorized shopping cart is ready.
Here are some snapshots that will give you a complete idea of how to build the cart.
It's time to build your control and remote control circuit. So let's start with the system block diagram.
System block diagram
The figure shows the main building blocks of the system. The complete system can be divided into two different sections.
- Shopping Cart Control System
- Joystick remote control
The shopping cart is moving and the control system is built using four DC motors, Arduino NANO board, 2 DC motor driver modules, HC05 Bluetooth module and HC12 RF transceiver.
The joystick based remote control is constructed using 2-axis resistive joystick, Arduino NANO board and HC-12 transceiver module.
HC-12 Transceiver Module
It is used as a transmitter in a remote control and as a receiver in a shopping cart. It is used to transmit commands from a remote control, and the receiver in the shopping cart receives these transmitted commands. It works on a frequency of 433 MHz and has a range of 1100 meters.
HC05 Bluetooth Module
This module is used to receive commands from the user's smartphone through the Android Bluetooth application. It receives commands and transmits them serially to the microcontroller on the Arduino board.
Video game control
It is used to send forward-backward-left-right commands from the remote control to the shopping cart.
Arduino NANO board
The Arduino board in the shopping cart performs all of the following tasks
- Receives commands to move the HC12 cart.
- Controls are required to move the HC05 cart.
- It moves the cart in the desired direction like forward-reverse-left-right by rotating all four motors.
Using the remote control, the Arduino board receives forward-backward-left-right joystick commands and transmits them using the HC12.
Motor driver module
It is used to drive two DC motors. It provides sufficient voltage and current to both motors.
DC Motors
4 DC gear motors are attached to the four wheels of the shopping cart which provide the desired movement to the cart.
Battery
A 12V battery provides power for the entire shopping cart circuit.
Voltage regulator
It is used to supply regulated 5V to the Arduino board and motor driver module.
To start building the circuit, you first need to collect all the necessary items. Here is the list of items needed to do both circuits
Items required for remote control and shopping cart circuit
- HC12 transceiver module
- HC05 Bluetooth Module
- L298 Motor Driver Module
- Two-axis joystick
- Arduino NANO board
- 7805 voltage regulator
Now let's see a detailed design of the system with a circuit diagram of its functioning and operation.
Joystick Remote Control Circuit Diagram
The remote control circuit uses just three components: 2-axis joystick, an HC12 transceiver module and an Arduino NANO board.
- The joystick has a 5-wire interface (1) +5V (2) Gnd (3) VRx (4) VRy (5) SW. The 5V and GND pins are connected to the 5V and Gnd pins on the Arduino board which provide 5V power to the joystick's internal POTs
- The VRx pin is the slider (middle) terminal of the horizontal POT (X) and is connected to the Arduino analog input A0.
- The VRy pin is the slider (middle) terminal of the vertical (Y) POT and is connected to the Arduino analog input A1.
- The SW terminal of the internal joystick button is connected to digital pin 13 on the Arduino board.
- The HC-12 module has a four-wire interface (1) Vcc (2) GND (3) Tx and (4) Rx. The Vcc and Gnd pins are connected to the 5V and GND pins on the Arduino board that provide a 5V power supply to the module.
- Its Tx and Rx pins are connected to the Arduino board's D12 and D11 digital pins.
- An LED is connected to digital pin D10 to indicate transmission.
Shopping cart circuit
The figure shows that the shopping cart circuit is built using HC05 module, HC12 module, 7805, two L298 motor driver modules and Arduino NANO board.
- The HC-12 module is connected in the same way as the remote control. Its four pins are connected to the +5 V, GND, D12 and D11 pins of the Arduino board.
- The HC-05 module also has four-wire interfaces (1) Vcc (2) GND (3) Tx and (4) Rx. The Vcc pin receives +5 V power from the 7805 and the GND pin is connected to circuit ground
- The Tx and Rx pins are connected to the Rx and Tx pins of the Arduino board (D0 and D1), respectively
- Arduino drives four DC motors using two L293D motor driver modules
- The Arduino pins D2-D3-D4-D5 are connected to four inputs of the L293D module 1. The four outputs of module 1 drive two front DC motors (left and right)
- Similarly, pins D6-D7-D8-D9 are connected to four inputs of module two. Its four outputs drive rear DC motors (left and right)
- Both motor drive modules receive a 12 V motor supply from the battery. The Arduino board also receives a 12V supply to the battery's Vin pin.
- 7805 IC provides 5V regulated output (from 12V battery) which is supplied to HC12, HC05 and both motor driver modules
- An LED is connected to digital pin D10 for indication
Functioning and operation of the circuit
First, let's see how the remote control works.
Working with remote control is quite simple. In just one line of explanation, it transmits different commands to move the cart when the joystick is moved from left to right or from top to bottom.
- As the user (operator) moves the joystick in the X (horizontal – left or right) or Y (vertical – up or down) direction, the internal X and Y POTs change, and this will vary the analog outputs VRx and VRy from 0 to 5V
- These outputs are provided as analog inputs to the Arduino. The Arduino will read these analog inputs and based on a change in the VRx and VRy values, send and transmit the following commands to the shopping cart using HC12
- Commands are given serially to the HC12 module. The HC12 module transmits these commands using a carrier frequency of 433 MHz.
- The LED flashes whenever a command is transmitted.
Now let's see how the shopping cart circuit works.
Again in a single line, this circuit moves the shopping cart in four directions, front-back-left-right, according to the command received from the remote control or smartphone.
- The command transmitted by the HC12 remote control module is received and demodulated by the HC12 module in the receiver. It provides this command serially to the Arduino microcontroller.
- Similarly, if a smartphone controls the cart, the Bluetooth control Android app sends commands to move the cart and the HC05 Bluetooth module receives them. The HC05 module further provides this command serially to the Arduino (Note: Before sending commands to the HC05 module, the operator (user) must pair his smartphone with the HC05 module. To pair for the first time, a password is required which is by default “1234”)
- The LED flashes whenever the command is received from a remote control or smartphone.
- When the Arduino receives the command to move the cart, it rotates all four motors as per the following table. It provides signals to rotate the motors through the L293D motor driver modules. The module will rotate the motors forward or backward according to the required movement of the cart.
The remote control and shopping cart circuits are working and operating based on the program downloaded into the internal FLASH memory of the Arduino microcontroller (ATMega328). The next step is to go through the software programs for remote control and shopping cart of Arduino microcontrollers.
Software program
There are two programs, one for remote control and another for shopping cart. The remote control program reads the joystick's analog input and decides whether it is moved left, right, up, or down. Sends and transmits commands through serial communication using the HC12 transceiver. The shopping cart program reads commands via serial communication from the HC12 transceiver and drives all four motors back and forth to move the cart.
Both programs are written in C programming language using Arduino IDE and are compiled and loaded into the internal FLASH of the Arduino microcontroller.
Here is the code for both programs
Youtube video links for this project