Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Leafbot

This is version 0.1 of a little robot based on a Dagu Wild Thumper with a Raspberry Pi, two Pololu G2 motor controllers and an RC battery. Motors have been replaced with 99:1 gear ratio for better slow control. (the wires look like they touch the hot chips in the photos but they are routed away from hot chips during assembly).

There is an First Person View interface through the Raspberry Pi Camera using a python web server on the Pi running over Wifi with video through ffmpeg and JSmpeg. The Robot can be controlled by an Xbox controller by plugging into the PC USB jack.

The arm is a Lynxmotion system with an Acrobotics gripper. The Pi controls the arm servos and G2 motor controllers using the pigpio project which allows Pulse Width Modulation on the Pi GPIO pins.

It uses lots and lots of custom made wiring using Pololu wiring and connection / crimping supplies. The servos are powered by a Pololu 6v regulator and the Pi by an Adafruit UBEC regulator + usb connector parts. This goes through a simple custom circuit board with a lot of soldering and paper-clip circuits on the back. (I know it looks like the wires touch the hot chips but they don’t when assembled). The electronics are all attached to the underside of the Thumper top, and the default Dagu wiring has been rebuilt with XT60 connectors that plug into the topside for assembly.

Future plans:

  • Upgrade Pi regulator to Pololu 5v 5a regulator
  • Connect Pi to Pololu G2 controllers using data instead of RC
  • Upgrade wifi range with a usb dongle + antenna,
  • Add multi-watt LED with LED driver
  • Add Pololu current detector, to estimate battery charge
  • Improve html interface
  • Clean up wiring

Thanks

2 Likes

That looks awesome! Great job. Thank you for sharing. Your future plans sound like neat improvements as well; I’m excited to see more updates!

Brandon

version 0.2

The main prototype board is completely rewired with a bunch of Pololu wiring, connectors, pins, crimp tools, etc. Raspberry Pi 5v power now comes from Pololu 5v 5a regulator, wired directly to GPIO pins, because powering via the MicroUSB on the Pi always resulted in low voltage warnings in dmesg and cpu throttling. The tricky bit here is not to flip polarity and fry the Pi when experimenting. Max current draw is when video is streaming and everything else is on

Robot Arm servo power is still from a Pololu 6v regulator - but i have also wired the Enable pin to the Raspberry Pi, and pulled it down with a 10k resistor. This allows a low power sleep-mode.

I added a Meanwell 1 amp LED driver, with a LED mounted on the front of the bot, with a piece of aluminum scrap as a heat sink. The Pi is connected to the LED driver PWM brightness pin, with a 10k pullup(pulldown?) to make sure it’s off when the Pi is off. Brightness can be controlled from the robot control web page.

There is also a usb extender port for plugging in a Wifi Dongle antenna for better range outdoors.

Software: A separate linux Process was created to stop all main wheel gearmotors within 0.5 seconds if there are no controller commands coming in from the network. The old bot would get stuck moving when connection was lost, repeating to itself the “go forward” command forever without stopping. This Process also will put the robot to a lower power sleep mode if a minute or two go by with no input.

The controller webpage can remap the buttons and axes for any usb-pluggable gamepad controller, and the robot will remember the mapping. Tested on PS2-style and Xbox-style. DarkMode/LightMode added, and some more statistics from the robot like Wifi signal strength, low voltage warnings, etc.


I have broken several of the 25D wheel motors gearboxes when the robot fell, about 2-3 feet. I combined broken parts and spares to fix the broken gearbox. I also broke all of the robot arm Servos and had to replace them with sturdier versions.

Several different batteries will work, although the wheel gearmotors ideally want 6v. I am using mostly NiMH radio control car batteries but have also built some custom LifePo4 battery packs. (I do not think hobby Lithium Ion are safe enough for this). The whole thing stalls at about 10 amps total with about 7 volts so I’ve been using batteries rated for at least that discharge rate.

I accidentally shorted the battery through the mainboard when one of my poorly built Deans connector (the t-connector) had a tiny little bit of the wire poke out and touch the frame of the robot just the wrong way. I had a PCB controller on the battery I was using that is supposed to stop short circuits - it did, but it fried itself in the process. One of the header pins on the main board also acted like a fuse and melted. The Pololu regulators, controllers, and Raspberry Pi survived all this somehow.

Future plans.

Use point to point wifi, not a router. Boost range.
See if there are non-marking tires available.
Infrared camera.
Backup camera.
Ultra low power sleep mode, wakeup over bluetooth.
Smarter brain process, to stop it from going over cliffs or tilting over.
Image classification.
“PC-web-less” mode to allow direct control from a wireless gamepad.
Keep trying to figure out Pololu G2 Motor Controller serial commands with Pi (tried this but failed). To cut down on the amount of wiring needed.
Maybe use a Pololu Servo control board, again to cut down on the amount of wiring. (and maybe stop some of the servo hum…)

Thanks