Introduction: Syzzyk's Whiskers
These are sensors, like cat's whiskers for your robot project. If you are a new or novice roboticist read on past the Whisker's for ideas on Logic Boards, Circuit Boards, and powering your projects.
What you will need:
The copper tubing is hardened (stiff, not coiled) 4mm OD, 2mm ID. I use a the little tubing cutter to the left of the tile in the photo. You'll need to cut two 8mm long bits from the tubing.
You will also need two 6 to 8 inch bits of 22g wire, I used one red and one black which you will be soldering to the copper in a later step.
The mount for all of these was printed on a 3D printer and I have included a couple of grid views from Blender as well as the .stl file.
And of course all of the soldering equipment. There are some very good soldering Instructables so I won't try to do better than those.
Step 1: The Mount
Here is an overhead view and a side view of the mount as well as the .stl file for 3D printing.
Step 3: Soldering
Next, solder one red wire to one of the copper bits, and one black to the other as you see here.
Step 4: Final Assembly
Using 4" plastic cable ties, strap one of the contacts vertically through the two holes on the thinner end of the mount. Then using a 2mm bolt and nut through the head of the other cable tie and fasten it to the high part of the mount and slip the contact over it so that the two click into each other when the whisker is tweaked.
Feed the wires through the holes at the back end of the mount, these will hold the contacts in place and give the cable tie a bit more 'bounce.'
Below you will find a suggested project for connecting Syzzy's Whiskers to a microcontroller, in this case I've used and Arduino.
Download the USMotors.ino for an example sketch on hooking up Syzzyk's Whiskers and the Logic Board to your Arduino.
Step 6: A Logic Board
An OR Logic Gate is an arrangement of discrete components or part of an Integrated Circuit typically with two inputs and one output. In this application I am using 0 volts as a 'low state' or 'zero state' and +5v (from Arduino) as a 'High state' or a logical '1.' This is called 'positive logic.'
Take a look at the truth table in the picture. For any input state with a +5v value the OR gate passes that High value on, If both inputs are Low, nothing happens except for monitoring for a changed condition. Now, take a look at the 4071 Quad OR Gate Integrated Circuit. Notice the pin-outs and their internal configurations. Look familiar? Yes, four logic symbols just like the big one on the right. Arduino can be programmed to monitor any pin set for INPUT for it's High or Low state. Download and study the .ino file (the Arduino sketch) to see how to do this.
Hold the pin to 0v and Arduino knows it is Low. Apply +5v to a pin and Arduino can tell that it is High. Hook the output from an OR gate to a properly programmed Arduino pin and your program will know what is happening on the other side of the gate.
Compare the pinouts in the previous step with the 4071 IC in the center of this circuit board. Follow the traces on the board, which is laid out very similar to a solderless breadboard except that there are solder connections on the other side.
Pin 7 on the Logic Board is connected to ground on the Arduino.
Pin 14 is connected to +5v on the Arduino.
Pins 1, 2, 5, 6, 8, 9, 12, and 13 are connected to ground by 10k resistors. These are very important, they hold the pin to 0v, a low logic state. These are the pins where the black wire from your Syzzyk's Whiskers and leaf switches will connect using the pin headers.
The left two Syzzyk's Whiskers will be connected to pins 1 and 2 on the Logic board. The right pair connect to pins 5, and 6. See below for an example picture.
The red wires from these switches will connect to any header pin on the far right of the picture, the +5v bus. Pins 3 and 4 are the outputs for Syzzyk's Whiskers and connect to the Arduino. One for the right side and one for the left side of the robot.
I have treated the leaf switches a little differently on the front of my application (SRB3). The black wires from the leaf switches connect to pins 8, 9, 12, and 13 in no particular order. It is the two output pins, numbers 10 and 11 that need to be connected together. Why is this important? We want to save a pin on the Arduino, but we do NOT want a High Logic state fed back into the other OR gate, it will be damaged. To solve this, pins 10 and 11 are connected each to their own 1N4148 diode which then are brought together at the topmost yellow wire. This is our output which will tell the Arduino the state of any individual leaf switch.
SRB3: Syzzyk's Object Avoidance Robot. SRB3 is my latest and improved object avoidance robot featuring my own Syzzyk's Whiskers and a couple of microcontroller pin conservation techniques.
Yes, I've built a Roomba that doesn't clean anything!!! Woot! Yes, I realize what I have built; the adventure was the educational and the technical/problem solving involved.
There are four Syzzyk's Whiskers (see below) and four limit switches forward in addition to two ultrasonic detectors. I've found that ultrasonic detectors are only about 60% effective when used with an Arduino. The eight switches are connected to the logic board featuring Quad OR gates.
The two left Syzzyk's Whiskers are connected to one OR gate and create a back/turn left 45 degree action, conversely the two right Syzzyk's Whiskers activate a back/turn right 45 degrees action.
The limit switches have their leafs hooked together by aquarium tubing with a small copper rod for a stiffener, when any of these are triggered the robot backs up and turns 90 degrees right. By using the logic board I only need three pins on the Arduino to all this to take place.
Step 9: Pin Saver Board
Here is the schematic for the pin saver board. This will connect to power and ground, in my SRB3 application these come from the power board which breaks out 3 sources from a 12v rechargeable through buck down converters in the next step.
The top of the picture shows where to plug in the servos on the right of the robot. The next section down is where the left side servos plug in. Power and ground is shared among all four, the right and left servo wires are shared within each pair. Only one Arduino pin is required for the left, and one for the right servos. The bottom of the board is where the ultrasonic sensors are connected.
I have used HC-SR04 sensors on my application. Here again, power and ground are common for two sensors; but POWER is NOT shared with the servos.. The Echo and Trigger pins for both are brought together so that they only use two Arduino pins to hook up the two sensors.
Plug in the right servos to the top outside section and jumpers to power, ground, and the Arduino in the center. Plug in the left servos to the second section. Plug in the ultrasonic sensors to the outside of the bottom section, and jumpers to the Arduino from the center.
Step 10: Powering It All
First off, let's talk about batteries. I decided to use a Tencel 2000mA 12v rechargeable NiMH battery pack for SRB3.
Metal Halide batteries are not NiCAD (Nickle Cadmium). NiMH have some drawbacks and some bonuses. NiMH charge slower and discharge faster when used with a high demand system. They also get HOT when to much demand is placed on them. NiMH discharge slower and last ALOT longer in lower demand situations. Robots such as SRB3 are low demand situations for a battery, low demand electronics which are mostly in a wait state a lot of the time. The only high demand items in this system are the 4 servos. If there were 12 servos NiCad would be a better choice. You also need a charger that is intended for NiMH charging, these are different than a NiCad charger. You must use the head sensor that is attached to the charger while charging the batteries, they can get HOT and the sensor will shut down the charge cycle if this happens. This has never happened to me but it can.
Step 11: Buck Down DC Voltage Converters
These are the D-SUN Mini DC Voltage Step-Down Regulators.
Notice the + and - on the front and the arrows for IN and OUT on the back. When you mount them to a circuit board don't get lost on what is pointing where. IN is 12v IN, OUT is what ever you set it for, 5v in our case. See the little, itty-bitty, tiny, almost microscopic adjustment on the front of the board that only takes the smallest screwdriver you can get? I used the screwdriver from a eye glasses kit for awhile but these are almost to large. I finally bought a set of microscopic screwdrivers from Amazon which work better and give finer control.
The Power Supply Board:
I used the snap off stand-offs, one for each corner to mount three of the buck downs to a PCB board. I hope when you do this step you have kept careful track of which way is IN and OUT on these. The wiring is simple here, 12v from the battery to IN which can be common for all the buck-downs. OUT from each buck-down: One to supply the Arduino with a barrel jack. One to plug wires into the Pin Saver Board.
Thanks for listening. Check out my web site: www.syzzyk.com