Pretty Useless Machine

by MikeTheMaker in Circuits > Arduino

18564 Views, 134 Favorites, 0 Comments

Pretty Useless Machine

whole thing - 1.jpg

A catapult "gets rid of" the red thing. A robot "brings the red thing back to the catapult." Cooperatively, these devices busily work together at conflicting goals to accomplish nothing (insert your analogy here).

Parts

This requires 3d printing, electronic work and wood work. Print all of the 3d parts (two of the wheels). Wheels and the "thing" should be printed at 100% fill. The "thing" must be a bright color (one the Pixy camera can find), but a color that (in the camera's view) only exists on "the thing."

(4) Arduino Unos

(2) Nextrox Mini 12V DC 60 RPM High Torque Gear Box Electric Motors

(2) TOOGOO(R) 37mm DC Geared Motor Mounting Bracket Holder

(2) Eureka vacuum belts (tires for the wheels)

(1) Servo gripper unit--from Jameco.com

(2) Servo motors (I use Hitec)

(1) High Torque servo motor (to pull the catapult spring)

(1) Servo motor with the mechanical stops and electronics removed (gear motor to operate actuator)

(1) Ping ultrasonic transducer

(1) Pixy camera

(8) NiMH AA batteries

(1) Battery holder for 8 AA

(1) SPDT switch

(2) Arduino Motor Shield

(4) Infrared Sensor

Plywood, 1 x 4, wood screws, electrical tape, jumper wires, solder

Note: The 3d files for the actuator (GM Leadscrew, etc.) were modified from a design by Chiprobot (http://www.thingiverse.com/thing:317192)

The Thing

thing - 1.jpg

Print the parts (witch wobble base should be scaled to 85% of original size). Acquire four nickels (or similar size coins for weight).

thing - 2.jpg
thing - 3.jpg

Insert the coins in the base and the plastic plug above the coins.

thing - 4.jpg

Insert the rod in the "rings" and glue or melt together.

thing - 5.jpg

Glue or melt the rod assembly to the base. This "thing" will always land rod side up.

Lifter (linear Actuator)

lifter - 1.jpg

Cut off the ends of a servo horn and attach the horn to a servo gear motor (normal servo motor with internal end stops and electronics removed).

lifter - 2.jpg

Attach the 3d printed servo horn.

lifter - 3.jpg

Push this into the leadscrew and secure with a 2-56 screw and nut.

lifter - 4.jpg

Place the servo bracket against this assembly, making sure that the motor shaft can turn freely. Melt the servo bracket to the assembly using a soldering iron (or glue them together).

lifter - 5.jpg

Attach the gripper unit to the extend plate.

lifter - 6.jpg

Attach a servo motor to the gripper.

lifter - 7.jpg

Attach the gripper assembly to the actuator assembly.

lifter - 9.jpg

Glue the servo lid to the servo motor bracket.

lifter - 12.jpg

Add the ping holder to the bottom of the servo bracket, then fasten the ping detector to the bracket.

body - 1.jpg

Attach the motor brackets and motors to the body. Use the vacuum belts on the wheels as tires, then push the wheels onto the motor shaft. Attach the lifter assembly to the body (drill holes as needed).

camera bracket - 1.jpg

Add the caster base and wheel to the rear of the body. Add the camera bracket.

pixy tilt bracket - 1.jpg

Add the camera bracket, Pixy camera and an Arduino. Install the sketch in the Arduino and attach the Pixy camera to the Arduino.

In this step, I'm adding vision capability for the robot.
Let's examine the operation of the vision system. Pixy is trained to a color--push the white button on top until the Pixy LED turns red then release. Place the target color (my red wobbler "thing") in front of the lens until the LED turns more or less the color of the target "thing". Press the white button and release--the LED should flash to indicate acceptance. The Pixy camera detects color blobs (providing location information about them) and works best in a controlled light environment. In other words, if the light source changes, Pixy will have trouble seeing the selected color--Pixy is trained to a color/light source combination. In my setup, the red led (attached to the Arduino) blinks when the object is to the right. The white led blinks when it is to the left. When straight ahead (or nothing visible), both led's are off.

Downloads

electronics holders - 3.jpg
electronics holders - 5.jpg
electronics holders - 1.jpg

Add the battery holder bracket and the Arduino holder platform. Add the battery holder and the switch.

schematic01112016.jpg
electronics holders - 4.jpg
electronics holders - 2.jpg
electronics holders - 7.jpg

Add wires to the Ping transducer (I used wire wrap wire) and bring the wiring to the appropriate Arduino.

electronics holders - 6.jpg

Most of my connections were made using jumper wires and a breadboard.

light sensors - 1.jpg

A "line follow" bracket was printed. To this I mounted two infrared sensors and wires--this assembly is mounted on the bottom of the robot.

catapult - 2.jpg
catapult - 3.jpg

The catapult parts are printed and assembled using bolts and nuts.

catapult - 4.jpg

A spring is attached to the high torque servo motor and the catapult arm. I used 22 gauge wire wrapped a few times to secure the spring to the catapult arm.

catapult - 1.jpg
schematic catapult04112016.jpg

The end stop and ir sensor are added to the catapult assembly.

light sensors - 2.jpg

An ir assembly is added to the robot.

robot and thing - 1.jpg

Install the various sketches into the appropriate Arduino.

whole thing - 2.jpg

When the "thing" arrives on the catapult, the ir sensor detects it--then, after a time delay, the spring servo puts tension on the arm, The release servo is actuated and the "thing" flies through the air. The spring servo resets, then the release servo resets.

whole thing - 3.jpg

The robot (after a delay to allow the "thing" to land and quit wobbling) commences a search using the Pixy camera. If it sees the "thing," it will go to it to pick it up. If not, the robot will go straight until it hits a wall, then the higher current of a stalled motor will be detected and the robot will reverse, turn, and continue the search.

When the Ping ultrasonic detector indicates that the "thing" is within the gripper, the robot stops, gripper closes and actuator rises. The robot then reverses, hunts the black line and follows the line until the robot ir detector indicates arrival at the catapult. The gripper is opened, the robot backs up, turns and waits--then repeats.

A few afterthoughts: The blue painters tape is not necessary, I just place it under the electrical tape so that the electrical tape would not "stain" the wood. I may want to paint the floor and line at some point in the future.

Did I need to use so many Arduinos? Maybe not, but it is easier with my limited software capability to assign tasks to a processor and avoid keeping up with tricky timing (like measuring overload current to the motors while timing the return signal of ultrasonic sound, etc.)