Wheely Cool Line Following Wheelchair Bot
by WheelyCool in Circuits > Assistive Tech
43 Views, 0 Favorites, 0 Comments
Wheely Cool Line Following Wheelchair Bot
Access to nature and outdoor spaces is something many of us take for granted, but for wheelchair users, navigating parks and natural areas can present significant challenges. Uneven terrain, narrow pathways, and steep inclines often make these spaces inaccessible, depriving people with mobility impairments of the physical and mental health benefits that come from spending time in nature.
This Instructable presents our solution: a robotic assistant designed to help wheelchair users navigate outdoor spaces independently. Our robot follows designated paths (marked with colored tape) while securely pushing the wheelchair, allowing users to enjoy parks and other outdoor environments without needing assistance from others. The chosen line color can be selected via a web interface, which also provides real-time sensor statistics. The robot will smartly stop when too close to an object and play alerts when a line is found, when approaching an object, and when stopping. Additionally, the robot will produce audible error tones if a component is disconnected or a line cannot be found.
Supplies
Circuit components:
LSM303DLHC Accelerometer+Magnetometer Board
MAX4466 Electret Microphone Amplifier
Assembly:
Perfboard
Assorted wires
Solder
3x Wheels
Solid mounting platform (cardboard box used here)
Screw terminals for motors
Peripherals and tools:
MicroSD card for sound effects
Soldering iron and stand
Screwdriver
USB C cable
Phone or computer to configure webapp
Computer for flashing code
Software Configuration
Install Arduino IDE >=2.3.6 with the correct version for your platform to modify and flash code onto the board.
Using the Boards Manager, install the Arduino ESP32 Boards package (>=2.0.18-arduino.5).
Using the Library Manager, install:
- Adafruit NeoPixel (>=1.15.2)
- Adafruit LSM303DLHC (>=1.0.4)
- DFRobotDFPlayerMini (>=1.0.6)
If prompted to install any dependencies, install them as well.
Using an SD card reader, add sound effects of your choosing to the MicroSD card formatted as Fat32. Label them 0001.mp3, 0002.mp3, and so on corresponding to the following alerts in the code:
Download the main.ino file containing the code and place it in a folder called main.
Due to limits on Instructable uploads (no zip or .h support for certain files), the web interface file must be created manually. Create a file called index.h with the following content and place it in the main folder:
Circuit Wiring
The project code includes tests for each component, along with serial output showing their status. Images of each component connection individually at each step can be found above. Ensure that the pin configuration matches the circuit diagram, as these components were tested with slightly different controllers. Test each part adding one at a time as follows using a breadboard and male-to-male pin headers to create connections for each part.
Ensure both index.h and main.ino are in the folder called "main". Open the project and flash the code to the controller using the Arduino IDE to confirm the controller is functional. To access the web interface, connect to the hotspot created by the ESP32 Nano (Default SSID: ESP32-LineBot, Password: 12345678) and go to its IP address (Default: 192.168.4.1). From there, the line color can be selected, as well as the current acceleration in each axis.
Connect the MP3 player:
- Player VCC to Arduno VBUS
- Player RX to Arduino D12
- Player TX to Arduino D9
Connect the speaker to the MP3 player using the SPK1 and opposite GND pin. Insert the SD card, then run the code to check if the circuit plays a noise. If not, ensure all wiring is correct and check the serial output to determine the state of the MP3 player.
Next, connect the LSM303:
- LSM303 SCL to Arduino pin A4
- LSM303 SDA to Arduino pin A1
- LSM303 GND to Arduino GND
- LSM303 3v3 to Arduino VBUS
Test to see if the sensor data changes using the web interface by moving around the sensor.
For the photocell:
- Connect one pin to Arduino VBUS
- Connect the other pin to Arduino A7 with a 10k pull down resistor.
For the Neopixel ring:
- Connect the Neopixel IN pin to a 470 ohm resistor, followed by Arduino pin D8
- Connect GND to Arduino GND
- Connect V+ to Arduino VBUS
Once connected, the LED ring should continue to spin in a circle, and the color can be adjusted using the web interface.
Connect the ultrasonic sensor next:
- VCC to Arduino VBUS
- Trig to Arduino D10
- Echo to Arduino D11
- GND to Arduino GND
Once connected, the robot will play a noise if the sensor detects an object under the threshold distance (Default 5cm). Serial output will also show that a close object has been detected.
To connect the H-Bridge:
- Connect all 4 center GND pads to Arduino GND
- Connect the +V and +Vmotor pins to Arduino VBUS
- Enable1 to Arduino D5
- Enable2 to Arduino D6
- In1 to Arduino D2
- In2 to Arduino D3
- In3 to Arduino D4
- In4 to Arduino D7
Connect the motors to the output pins on both sides of the H-Bridge.
Test by placing the line tracking assembly over a colored line of tape or paint, ensuring both motors begin turning.
Downloads
Soldering
Using perfboard, mount and connect each component by soldering them. For any component that uses header pins, trim and install pin sockets for modularity and easier troubleshooting. You will need quite a large piece of perfboard to assemble the mainboard, however parts can be moved to daughterboards as needed and connected via wires. Tests will be very similar to the breadboard.
Start by soldering the MP3 player header pins to on side of the board and connecting them to the Arduino per the circuit diagram and breadboard connections. To do this, solder wires to the joints on the bottom of the board, acting as jumpers between pins. Attach header pins to the SPK1 and opposite GND pin, then attach the speaker. Insert the SD card, then run the code to check if the circuit plays a noise. If not, ensure all wiring is correct and check the serial output to determine the state of the MP3 player.
Next, solder the accelerometer header pins and connect them to the controller according to the circuit diagram. Test to see if the data changes using the web interface.
For the line tracking portion, connect the photo cell along with its pull down resistor, as well as the Neopixel ring and its respective resistor to the appropriate pins. Once connected, the LED ring should continue to spin in a circle, and the color can be adjusted using the web interface. The current value of the sensor also be checked by printing the value of SENSOR_PIN to serial. Tape or mount the photo cell to the center of the LEDs such that the photo cell is facing the same way as the LEDs.
Add pin sockets for the ultrasonic sensor next. Once connected, the robot will play a noise if the sensor detects an object under the threshold distance (Default 5cm). Serial output will also show that a close object has been detected.
Connect the H-Bridge pins to the controller per the circuit diagram, and solder terminals connected to the motor outputs on either side of the H-Bridge. Connect motors on both sides by screwing them into the terminals. Test by placing the line tracking assembly over a colored line, ensuring both motors begin turning.
Finally, connect the microphone according to the circuit diagram. This will be further discussed in the last section.
Assembly
To assemble the robot, mount the assembled circuit firmly onto a base, followed by the motors, speaker and speaker.
Mount the light ring and photoresistor to the bottom of the robot, such that the photoresistor is centered in the ring and facing the ground.
Mount the ultrasonic sensor at the front, ensuring it has a clear view in front.
Add wheels onto both motors, as well as a supporting wheel onto the back. The robot is now fully assembled and ready to test!
Make any final changes to pin configurations, network settings, thresholds, sound effects, or other modifications using the labeled headers and variables in the code. Ensure index.h from earlier is still in the folder, and flash the Arduino again. Though Instructables does not support zip files, the full source code can be viewed on our Github.
Downloads
Operation
First, power the robot via a USB cable, connect to the WiFi Hotspot, and select the appropriate line color using the web interface.
Next, place the robot at the start of a colored line. It will turn on the motors and begin following the line, playing a sound to indicate it has begun tracking.
The robot will continue moving until it reaches the end of the line, or comes too close to an object/barrier.
The robot will then play a sound effect through the speaker and stop moving.
Potential Improvements
- Microphone processing:
- Voice control with a "stop" command was originally part of the design and the microphone has appropriate connections per the circuit diagram. However, due to motor noise and sound effects, it was prone to false triggers and was removed from the code.
- Implementing more nuanced audio processing would allow for this background noise to be filtered out.
- With precise audio processing, more commands than the original design could also be added.
- LIDAR:
- Add a LIDAR sensor to the circuit.
- This would enable the robot to create a detailed, 360-degree map of its surroundings and navigate more complex spaces without relying solely on physical path markings like colored tape.
- More proximity sensors:
- Add proximity sensors to the corners and rear of the robot to eliminate blind spots.
- This provides comprehensive obstacle detection and prevents collisions from any direction, not just what's directly in front.
- Better dashboard:
- Create a more intuitive interface to select the desired path with images of the full path laid out on a map.
- Add a better speedometer/accelerometer display with a graphical compass.
- Battery management:
- Integrate a proper Battery Management System (BMS) to accurately monitor charge levels, prevent over-discharging.
- Provide users with reliable low-battery alerts, ensuring the robot is always ready and doesn't unexpectedly stop.