Custom Circuits are legal. Make sure all wiring is within the rules and the power is provided as legally required.
R39, R47, R54, R58, R69, R72 are a few.
We have used a hall effect in the past. I will direct some additional help to this thread.
You can code in anything. If you are running your robot using LabVIEW, I don't see why you couldn't do it in there too.
Here's an email I got from another mentor:
Quote:
Team 836 had great success using the linked Hall Effect sensor very similar, if not identical to your Digikey linked sensor (http://www.adafruit.com/products/158). The magnet can also be found on Adafruit.
This particular hall effect sensor is sensitive to the south pole of a magnet and is active low, (eg. every time the sensor sees a south pole, it will connect the output to ground.) Please note this is a simple explanation.
As for ways to interface this sensor on the Digital Side Cars: all DIOs are pulled high by a 10K resistor built into the DS. When your sensor triggers, it will pull the line low, so your DIO pin will be at 5Volts until the magnet passes the sensor, momentarily returning 0V as the magnet passes, then return to 5V.
I would suggest you take a small piece of protoboard and solder a PWM cable directly to the sensor in this order: PWM signal to sensor output, PWM power to sensor power, and ground to ground. Put the solder joints on the back side of the board. Then bend the sensor and lay it flush with the protoboard, using some 26 gauge wire (CAT5 works well) and the other holes in the board to secure the pwm cable to the back side of the board and the sensor to the front of the board. This will provide some strain relief for the cable and something to keep your sensor flush with the protoboard. Next, drill a couple holes in your proto board for mounting to the robot. The other end of your PWM cable can hook to the digital side car DIO just as it normally would. Remember when you're mounting, that these sensors work best <~1/4 inch away from the magnet.
As for coding this again pretty simple, look at the WPI documentation for gear tooth or counter. You will want to count either rising or falling edges then use the period output to give you the time between the edges ie time take for each rotation. A little math and presto... RPM!
|