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

Pololu Forum

Luna: Raspberry Pi, A-Star 32U4, Dagu Wild Thumper 4WD All-Terrain Chassis


#1

Luna (as in Moon Rover) is a remote exploration probe originally based very loosely on the PiBot-B Project. Her maiden voyage was 11 MAR 2016, so I thought I would post here for her birthday :slight_smile:

At her core she is a Raspberry Pi with an attached Arduino to handle sensor data. Pololu now has better interface options like the A-Star 32U4 Robot Controller SV with Raspberry Pi Bridge, but when i started building this I just used the Pi for primary communications, visuals, and driving and fed Arduino sensor data to it over a USB connection to the Pi. All Pi-side work is in Python.

Specifics:

  • Raspberry Pi 2-b (1 Gb RAM) running Raspian Jessie
  • Pololu Dual MC33926 Motor Driver for Raspberry Pi
  • Pololu A-Star 32U4 Mini LV
  • Dagu Wild Thumper 4WD All-Terrain Chassis, Black, 75:1
    ** was originally a Dagu Rover 5 Tracked Chassis
  • Logitech USB Webcam C300 (mounted on a servo)

Sensor bank:

  • Adafruit Si1145 UV/IR/Visible Light Sensor
  • Adafruit BMP280 temperature & pressure sensor
  • Adafruit Si7021 Temperature + Humidity Sensor
    ** original build had two different generic DHT22 Temperature and Humidity Sensors
  • Generic photoresistor
  • Generic ultrasonic rangefinder
  • DF Gas Sensor

Power:

  • 7.2V RC battery pack (motors)
  • 2x DC 5v 1000mA (2200mAh) Powerbank batteries (phone chargers)

Initially I was very happy with the Dagu Rover 5 Tracked Chassis, but it did not offer a lot of clearance and I sometimes bottomed-out in rougher terrain. Over time the legs start to bow in and the chassis starts to throw tracks with increasing frequency, eventually making it impossible to drive without constant assistance. I substituted 120x60mm Dagu Wild Thumper Wheels, but learned an important lesson about torque and why differential steering does not work on a two-wheel-drive robot:

20160408: Replaced tracks with 120mm x 60mm Dago Wild Thumper wheels... single LUNA_forward.py jumped to 31in (78.5 cm) 90cm? 81cm? Unfortunately the turn radius is slow and pained on hard surfaces and non-existant on grass due to high angular friction on the back wheels during differential steering. http://www.rakeshmondal.info/4-Wheel-Drive-Robot-Design Pololu topic notes that if you do not cut off the extra 10mm or so of axle the axles with start to warp! https://forum.pololu.com/t/dagu-rover-5-tracks-come-off/4419
Eventually I was able to upgrade to the Dagu Wild Thumper 4WD All-Terrain Chassis. This brought a few new challenges, but I will discuss them later if there is any interest.

Operation is done from the command prompt, ssh-ed in over the Raspberry’s wifi connection, viewing what the camera sees over HTTP using a Motion-based web server approach. I have very small python scripts that take an argument integer and drive either forward, back, left, or right using the argument as a duration in seconds. More recently I have the ability to drive semi-autonomously using the input from the ultrasonic rangefinder, stopping and turning when an obstacle is detected.

Originally the sensor data was manually pulled from the Pololu A-Star 32U4 Mini LV over the USB serial connection and printed raw to console:

20160909_2101 Ping: 344cm DHT1 Hum: 34% Temp: 29*C DHT2 Hum: 36% Temp: 29*C BME Temp: 29.86*C 85.75*F BAR: 28.58 InHg Alt: 350.73m Vis: 260 IR: 254 UV: 0 gas: 508.00=2.48V Photo: 86

…then was simplified to write to a flat text file, and now uploads to a remote MySQL database running on another device.


#3

Wow! Great project! A lot of components integrated together.

I’d love to see it in action if you have any videos.

Do you have code available publicly? I’d be interested in looking how you do the video streaming from the Pi via http. This is something I was considering to try with my RPB-202 robot.

Keep us posted, I always like to see what others are doing!

A big all-terrain rover like this might well end up on my already long list of future projects…


#4

Thank you, your projects have given me a lot of assistance!

I still have yet to figure out how to stream the video, so for now I use motion (see http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome ) as this seemed to be the most recommended tool on the Raspberry Pi forums.


#5

Sample movement script, usage would be like

sudo python LUNA_forward.py 1

and would move forward for one second.

import time
from dual_mc33926_rpi import motors, MAX_SPEED

import argparse
parser = argparse.ArgumentParser()
parser.add_argument("runsec", help="run for runsec  seconds", type=int)
args = parser.parse_args()
nummer = str(args.runsec)

try:
	motors.enable()
	motors.setSpeeds(0, 0)
	print("Forward " + nummer + " seconds")
	motors.motor1.setSpeed(MAX_SPEED)
	motors.motor2.setSpeed(MAX_SPEED)
	time.sleep(args.runsec)

finally:
  # Stop the motors, even if there is an exception
  # or the user presses Ctrl+C to kill the process.
  motors.setSpeeds(0, 0)
  motors.disable()

Clearly you can see that I am borrowing heavily from the Pololu example scripts :slight_smile:


#6

Hi.

We posted about this robot on the Pololu Blog! Thanks for sharing.

Ryan


#7

Interesting note on the Dagu Wild Thumper 4WD All-Terrain Chassis:

I felt like the robot was a little underpowered as compared to the promotional videos, so I hooked everything up and put a voltage reader on the motor outputs. Surprised to see that the max output was 5v not 6v, now I see my error:

I was powering the motors with a 7.2V battery, assuming that would be enough for the 6v motors. I have a step-down that shows input and output voltage and had set it to 6.5v, but only 5v made it to the motor output. When I swapped it the battery out for a 9.6V and adjusted the max output of the stepdown to 6.3V I started seeing full 6.0V to the motors.