So many ways Sam, Hall effect, plain old coil and magnet glued on the shaft **, spinning disk with holes and opto, old relucter and pickup from car distributor, heck even points for low rpm application, all can be directly driven or run off an idler belt / pulley setup, who cares how many sensor triggers per revolution, you can tweak it in the software to do any math required. On my lathe I plan to put a small belt to the "encoder" from the headstock so I do not have to hassle modifying the spindle. Oh I thought of another one, if your spinning shaft has a nut spinning too aim a small magnet at the nut and a coil of wire at it at about a 60degree angle, might work as a reluctor. Or a spinning gear . . .
** Note: Remember those aftermarket Cruise Control units from the 1980s?
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Yup, we used to install some magnet on the drive shaft when there was no existing VSS source. been a long long time![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Joe, thanks for all the ideas. I chose to go with the coil and magnet. I did this for several reasons, mainly I didn't want to wait for a new hall effect module to come in.
I used the coil from a 24v relay I had, I left the bar in the center of course. I got a small but quite strong round magnet from the earpiece of an old cell phone. I connected the coil to a NPN transistor which I forward biased to increase the sensitivity and then ran the output of that NPN into a PNP to give a good positive pulse to the 16F628A.
As a test while everything was still breadboarded, I put a cardboard disc about 6" in dia. on a variable speed drill, taped the magnet to the edge of the disc a gave it a spin. The readout appears to work perfectly, varying with the speed of the drill very reliably ! And the magnet will still work when it's about 1" away. I will have it setup so that the coil and magnet are in close proximity though.
Now I'm going to do the board design in Eagle, then use PCBGcode and mill several boards out on my CNC mill and I should be set.
I'm real happy about this and again, I really appreciate the code and all the help !
Best regards,
Sam
EDIT: I forgot to mention that it displays only in multiples of 60. ie: 60,120,180,240, etc. RPM. Not "linear", I left the formula as displays=(displays*60) as that's all I need for the way I'll have it attached to the first machine I use it on.
Last edited by Sam; - 8th February 2009 at 17:15.
I never noticed that, I will look into it.
EDIT: Ok I think it is Displays = Displays * 60 If you use 6 magnets and make this statement Displays = (displays * 10) you will get 10 RPM resolution. I plan to use a multiple pulse per revolution encoder scheme which will significantly increase resolution. I think I will build it using parts from an automotive distributor (the guts) and fabricate all of the rest.
Last edited by Archangel; - 8th February 2009 at 20:09.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Hi Joe,
I must be doing something wrong. I mounted the magnet to the spindle of my mill which on high should be spinning about 2400 rpm. The display is reading anywhere from 250 to 1010 and constantly fluctuating. This is with displays=displays*10. When programmed with displays=displays*60 it's varying from 3000 to over 5000 and again, constantly fluctuating.
I'm using a 10mhz xtal and have the code set at 10mhz OSC too. Could this be causing a problem ? I'm trying to figure it all out on my own but I'm not getting it, "obviously".
Last edited by Sam; - 9th February 2009 at 01:36.
Try putting a resistor from the input to ground, it sounds like it is picking up stray signals (rf?) and twist the input wires or shield them. I would try say 10K first. The displays=displays*10 would only be valid with 6 magnets.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks