PDA

View Full Version : hall effect



dragons_fire
- 10th April 2007, 14:16
im building a robot that uses 71RPM max motors, and i want to be able to measure the revolutions so that i know how far it goes. what is the best way to do this? pulsin or count. and how do they get wired? can i just put the signal line from the sensor straight into the pin on the PIC?

the hall effect sensors im using are:

http://rocky.digikey.com/WebLib/Optek/Web%20Data/OHN3120U%20OHS3120U.pdf

and im using a PIC18F6585

the robot is just for fun and its going to be used indoors to map my house, (somewhat like a micromouse would).



http://i163.photobucket.com/albums/t305/dragons_fire_photo/IMG_7956.jpg

the pic shows the base of it, which is 3" x 3" x 1". both motors and the battery back fit inside, while the PCB sits ontop and is about 3" x 3". The motors in it were just put in for test fitting. i am going to use some of the solarbotics 298:1 gear motors.

Danny

mackrackit
- 10th April 2007, 14:22
Use COUNT.
COUNT=counts the number of pulses on a pin.
PULSIN=measures pulse width on a pin.

mackrackit
- 10th April 2007, 14:33
"how do they get wired? can i just put the signal line from the sensor straight into the pin on the PIC?"

Depends on the voltage you use to drive it. Wiring is in the data sheet you provided. Check output voltage , if 5 then good. Straight to the PIC.

If higher then maybe a LM741 to get what you want. Or a voltage divider.
If lower the use the on chip comparator. I think the 18F6585 has this.(have not used it and did not look it up).

dragons_fire
- 10th April 2007, 15:49
2 replies in 17minutes.. thats amazing... thanks for the help guys.. i have tried to do pulsin using it straight into hte PIC before, adn had some problems.. i guess i just need to practice my programming more!!!

Heres another couple pics of it:


http://i163.photobucket.com/albums/t305/dragons_fire_photo/IMG_7965.jpg

http://i163.photobucket.com/albums/t305/dragons_fire_photo/IMG_7963.jpg

http://i163.photobucket.com/albums/t305/dragons_fire_photo/IMG_7966.jpg