Kids love robots. And parents seem to like the idea that their kids are learning about robotics. So i came up with the BuffaloBot for my students: a 2WD Arduino robot with geared motors on a laser cut design of my own. So far i’ve made 3 versions:

  1. an autopilot robot based on 2 ultrasound distance sensors, avoiding obstacles
  2. a robot with another Arduino as remote control , using a pair of nRF24L01 radio modules
  3. with a light sensor (LDR) on the robot, a screen on the remote control shows the robot’s sensor data

autopilot robot with 2 ultrasound distance sensor, DRV-8833 motor driver, Arduino Nano


At first i tried to run this robot from a single Lithium cell (18650, nominal voltage 3.7V, around 2800mAh) but that proved unworkable: the motors only draw about 200mA each but the voltage drops below 3V and then the motors have difficulty to start moving, even with large capacitors. Initially I was using the old L293D but that did not work at all with only 3.7V; the motors were only getting 2V. Then i got acceptable results with using a MOSFET for each motor, but that did not enable me to go backwards. Luckily i found a relatively cheap breakout board for the DRV-8833 motor driver chip; the specs say it works with voltages as low as 2.7V.


But still the single Lithium cell did not give good results. Reluctantly i switched to 4x AA batteries, giving 6V and that is working very well. The battery holder is glued to the bottom. The 6V is too high for the Arduino, and too low for its Vin voltage regulator, so i added a diode in series with a forward voltage of about 0.8V, resulting in 5.2V on the Arduino.


The robot goes forward as long as it does not see any obstacles left and right; turns left when obstacle on right, right when obstacle on left, and does a pivot turn (wheels going in opposite direction) when it sees an obstacle left and right.


earlier version with 18650 lithium cell


The second version of the same robot adds an nRF24L01 radio module (SPI), and does not need the ultrasound sensors. The radio receives X and Y values of a joystick on another Arduino (UNO in below picture) with the same radio module. This Arduino sends the joystick values as data packets every 100ms, using the RF24 library. The radio module requires 3.3V, which the Arduino UNO delivers well, but the 3.3V on the Nano does not seem to supply enough current so i ended up adding an LDO voltage regulator (AMS1117). I added a buzzer to give an alarm when the robot does not receive any radio.


When using several robots at the same time, we need to pair each remote control with its robot: the radio should use a dedicated ‘pipe’ in the RF24 library.


The above simple setup only uses one way radio traffic: the remote control is sending, the robot is receiving. If we want to send sensor data from the robot back to the remote, the coding becomes a little bit more challenging to switch the radios between listening and sending. I added a simple voltage divider with an LDR on one of the robot’s analog inputs, and the value shows on the remote control’s screen as a number and a bar.


Note: the ultrasound sensors in above picture are not connected in this setup, they are only used in the autonomous setup described above.

Leave a Reply

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