Skip to content

cwelect1/policeyourbrassbot

Repository files navigation

Police Your Brass Bot

A robotics project for DGMD E-17 Spring 2024 that collects spent shell casings (brass).

Collecting brass at the firing range is a tedious task that no one seems to enjoy. There are manual options that exist to complete the job, but with modern advances in technology an automated solution is in order.

We are taking 2 approaches to prototyping that solution.

  1. Create an RC Car like robot operated via Raspberry PI along with a PixHawk for navigation.
  2. Roomba controlled via a Raspberry PI communicating via the serial port.

Materials - Roomba Implementation

Hardware

Qnty Description
1 pc Roomba 675 (or similar model with Serial Port)
1 pc Raspberry PI 4B (Raspberry PI Zero 2 W will suffice if not adding LIDAR)
1 pc Logic Level Converter 3.3v <--> 5v between Roomba and RPI
1 pc Jumper wires to connect PI and other hardware
1 pk Adafruit iRobot Mini-DIN Connector Cable (or Female to Male wires - above)
1 pc Powerbank 2 or more USB portss & 10,000 mAH or more recommended
10 pcs 5/8" 4-40 pan head screws (Philips worked best for me)

Mechanical / 3D Printed

Most mechanical parts will be 3d printed (Deisgned by this team).
See the 3d folder.

Qnty Description
1 pc Roomba Cover (exposes Serial Port) - modified design of this.
1 pc Collector Frame - used to attach collector wheel to Roomba
22 pcs Collector Wheel Tines
20 pcs Collector Wheel Spacers
1 pc Collector Wheel Hub
1 pc Collector Teeth
1 pc Collector Bin
2 pc 1/4" diameter dowel 4" long

Tools / Misc.

  • Soldering Iron / Solder
  • Drill and bits (1/2", and 5/32")
  • Screw/Hex driver depending on fasteners chosen
  • RPI supplies (Monitor, keyboard, power supply, hdmi adapter/cables)

Instructions

A few things:

  • Design is based on not opening Roomba or using it's power source
  • RPI and Roomba use different logic levels 0-3.3v and 0-5v respectively (hence the Logic Level Converter)
  • Our concentration is to pick up brass, then work on a proper mapping algorithm

Hardware

PI UART (Serial) to Roomba Mini-Din (Serial Port)

In order to communicate with the Roomba, we need to connect to:

  • Transmit (TX pin 4)
  • Recieve (RX pin 3)
  • Ground (pin 6 or 7)

Alt text

Roomba uses 5v logic levels and Raspberry PI 3.3v. To rememdy this difference and not fry the PI, we
utilize the Sparkfun Logic Level Board. We only need 2 of the 4 channels.

Alt text

Wiring Diagram

The pinout on RPI Zero, Zero 2, and 4B are all the same.
Here's an example of how to wire the RPI, Logic Level board, and Roomba together.

Alt text

Software

Raspberry PI Setup

We are going to interact with the PI as a headless server and don't need the GUI. Ensure that:

  • wifi is setup and working
  • SSH is enabled
  • know your username and pwd (obviously the defaults should be changed)

Here's a link to the offical RPI Getting Started docs.

Enable UART on RPI

You need to REBOOT after this config update

cd to /boot/config on the PI

# Comment out the console entry
# console=serial0,115200
#Enable UART if it isn't already enabled

enable_uart=1

Install Required Libraries

  1. ssh into the pi using your username@your_rpi's_ip_address
ssh pi@192.168.1.1
  1. Confirm that you have Python 3.6 or higher installed. RPI comes installed with both 2.x and 3.x.
python3 -V
  1. Install pyserial.
pip3 install pyserial
  1. Install pyrommbaadapter.
pip3 install pyroombaadapter
  1. ...and finally...clone our repo.
git clone git@github.com:cwelect1/policeyourbrassbot.git

Issues / Challenges

  • Roomba to RPI serial communications seems to flake out. We've seen the same python code execute flawlessly once and then fail the very next execution.
  • Roomba wheel encoder(s) not reporting proper values. This has only happened on the Left wheel...and we replaced the whole wheel with same exact results (seems to be serial issue or problem on the main board)
  • Roomba doesn't go straight (ever) - perhaps this is related to bullet above
  • Adding LIDAR turned out to not be possible on RPI Zero. It only has one UART for Serial communication

What's Next...

  • Work on code to monitor (and react to) sensors while roomba is moving. This has been more challenging then 1st thought
  • Improve 3d parts for fitment
  • Add LIDAR and implement SLAM algorithm for range mapping
  • Add object detection and avoidance

References

About

Project for DGMD E-17 Spring 2024

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages