Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: Commanderbob on November 18, 2008, 11:16:54 PM
-
I am trying to make a tachometer with an AVR, a magnet, and a hall effect sensor. The hall effect sensor I have is this one (http://www.allelectronics.com/mas_assets//spec/SS-19T.pdf). When there is no magnetic field it outputs around 2V that goes up or down if there is a positive or negative field applied.
Originally I though of using an opamp and the AVR ADC to check when the magnet went by. The problem with this is I will be polling the hall effect sensor. Do you think it would be better to use a comparator and a pin change interrupt? If I used a comparator then I would have to use two and a OR gate to detect both + and - fields so I don't have to worry about which way I install the magnet. The magnet will not pass the sensor more then 450 times per second (~27,000 RPM), usually under 250.
Is it better to use one opamp and the AVR ADC, comparators and a OR gate, or something I have not mentioned?
Thanks,
Justin
-
Imho AVR internal comporator is the way to go
-
Can you set the voltage to compare it with to anything you want? I read that it uses the same reference as the BOD. Does that mean you can only use the voltages the BOD can be set to?
-
A bit late to reply to this post but to anyone who finds it on google search ... here is the link to something I did and worked:
http://www.societyofrobots.com/robotforum/index.php?topic=14973.0 (http://www.societyofrobots.com/robotforum/index.php?topic=14973.0)
There are links to the Hall effect sensor I used and the arduino program related to it.
Hope it helps.