Sharky 2

this is a follow-on to an earlier proof-of-concept robot found here: https://www.robotshop.com/letsmakerobots/node/36052 The brush part of this sweeper is from a Shark hand held sweeper that I found in a thrift store for a few bucks. The previous project just added drive motors and a few sensors to the Shark hand held sweeper, but this one extracted the brush from the Shark and put it in a whole new robot. The base of the robot is a piece of masonite, the body is a microwave plate cover that I found in a dollar store. There are four IR sensors mounted near the bottom of the body and the sonar on top and in spite of that it still got into situations where it couldn't tell it was stuck against something. I resolved that issue by using an optical encoder reading a free wheeling wheel on which was a printed encoder wheel. If the robot gets stuck against something then the encoder wheel stops going around and I know I need to do some avoidance. This project was really fun and a lot of the components were scavenged from old printers and what-not including the MOSFET used to run the brush motor. It uses a subsumption architecture for the program as this is very well suited for a task like this.

Sweeps the floor using ultrasound, IR, and an encoder for obstacle detection/avoidance

  • Actuators / output devices: Two servos modified for continuous rotation, small electric motor scavenged from a printer
  • Control method: fully autonomous
  • CPU: Homemade Arduino using an ATMega8
  • Operating system: Arduino
  • Power source: 2 cell Li-Poly
  • Programming language: C
  • Sensors / input devices: One SR04 ultrasound, four IR emitter/detecter pairs, one IR encoder
  • Target environment: The workshop after building robots

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/sharky-2

Good revision model

Sounds like you have been very resourceful. The microwave part looks like a perfect top for a robot vacuum. Is this the end of the development or are there bugs still to fix, improvements to make. How about a video?

Some additional information

sans_top.jpg

Here it is without the top.  Hopefully you can see enough details.  The purple boxes are lettered A through E in a clockwise direction.  They are:

  • A - IR Reflective sensor looking at a plywood encoder wheel that "floats".  If the robot is not moving forward this wheel stops turning and I know that I must be stuck against something.  Works 100% of the time.
  • B - Homemade ATMega8 breakout board running Arduino Code.  This basically just breaks out each of the I/O lines to standard 3 pin headers (signal, power, gnd).
  • C - R/C Airplane 3.3A BEC.  I fly model airplanes too, so this was a handy way to provide 5v for the logic and servo drive motors.
  • D - Homemade MOSFET driver for the brush motor.  MOSFET was scavenged out of an old printer or something.
  • E - IR detector widget.  Drives the 4 IR emitter/detector pairs mounted on the front sides of the sweeper.  Basically has 4 I/O lines that are read by the Arduino.  When something is detected the line goes high.

I am also reading the voltage off of one cell of the LiPo (so I don't need a voltage divider) to determine when the battery needs to be replaced.

Code changes yet to be done

The avoidance routine right now is the standard "back up, turn, then resume".  I would like to make it a little smarter as often just a slight turn opposite the detected object would free it up so it could continue.  I also need to reduce the timeout used on the encoder wheel.  Right now it will grind against something for 2.5 seconds before deciding that it isn't moving, so I need to reduce this significantly.  I might also add on some additional LEDs for status feedback or just for fun.  After all it looks kind of like a flying saucer, so some additional blinky lights might be called for.

Hardware issues to resolve

As usual with hacked servos, one of my drive motors is noticeably faster than the other.  It will do a circle with about a 4 foot radius as is, so I need to adjust or replace one or both of the drive motors.  I also need to devise a better way to attach the top.  Right now I am just wiring it on so I need to devise some good quick release method instead.  Other than that, I am pretty pleased with the hardware.  The addition of the encoder wheel took the obstacle detection from 85% to 100%, so once I get the software tuned a little more I think it is good to go.

I'll add some video after a little more tuning of the hardware/software.  In the meantime feel free to ask any questions or for pictures of specific things.