Digital speed readout

Has anybody made one from scratch? I recently got into writing software for PIC microcontrollers (for work) and it struck me that one could be used to
monitor a series of pulses from a spindle-mounted transducer and display the RPM on a 4-digit display.
The point I've got to so far is getting the PIC to display numbers and to increment a value if it parses an 'on' from a button. Next bit to do, software-wise, is to set up an interrupt to increment the counter without polling the switch. Should manage that okay, but I'd appreciate comments on how to read the spindle's rotation.
My thoughts at present are to use a hall effect device and a small magnet, with a spindle-mounted vaned disc passing between device and magnet. To get a decent rate of display update (10 per second seems okay), I plan to cut several vanes into the disc to ensure that there are several pulses per rotation. I haven't thought much yet about converting the output from the hall effect device into something the PIC can read, but gather they're low voltage (I saw 0.4V in the spec for one).
Looking to fit one each to my Clark CL300 lathe and Cobra Micro mill (Clark CMD10). Haven't thought about how to fit the discs yet, but somewhere inside is the plan. The PIC is the Microchip 16F628.
--
Wally
www.wally.myby.co.uk
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Wally wrote:

Same here. I've been meaning to make a little tacho for ages but haven't got around to it.

Use a built-in asynchronous counter, like pic16f628's CCP module. No pulses will be missed & no interrupts will be needed; interrupts are best reserved for responding to occasional events, they can be a pain to debug.

Cutting your own sounds like work - also best avoided! Ready-cut slotted discs and opto-switches (which detect the gaps using infra red light) can be reclaimed from an old inkjet printer. An optical switch is an LED/photo-diode pair, so will work at logic levels and will perform well provided you keep swarf and oil out.

If you can't mount the disc, how about using a photo-reflective opto switch to detect black lines painted on the spindle? Or maybe a small magnetic proximity detector to sense teeth of a steel gear in the gear train?
hth Guy
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Guy Griffin wrote:

I had a look into the CCP idea, but I'm not sure yet if it can work for me - it responds to events on pin B3, but port B is used for the output to the display (and four bits of port A multiplex between the digits).

Sounds like a good excuse to play with my rotary table. :-) For the arrangement I'm talking about, less mass of metal is needed because the vanes pass between the magnet and the sensor, compared with a self-contained gear tooth sensor which needs a greater mass passing nearby to create a sufficient disturbance in the magentic field. My web troffing suggests about 1.5mm for a vane type, but 5-6mm for a gear tooth style.

I'm not into an optical method. Certainly, the disc/sensor in the mill would be in the gearbox, which does get dirty inside. Haven't decided where to fit it in the lathe, but I'd prefer to put it in the housing for the back gears rather than in the headstock.

Again, dirt is an issue (along withe a desire for zero maintenance, where possible). The gears in the mill are all some sort of plastic. Some of the lathe gearing might be metal.
--
Wally
www.wally.myby.co.uk
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Check out the current edition of MEW. There is an article by Tony Jeffree for one which uses an optical pickup and an LCD for the readout.
Archie

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Archie wrote:

Thanks, but, as I say to Guy, I'd rather not use an optical method - I'm after a set-it-and-forget-it solution.
--
Wally
www.wally.myby.co.uk
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Well, admittedly not how you want to do it, but with the same result: <http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/Tacho/index.html
Nick
--
DIY-DRO // Eigenbau-Digitalanzeige
Available now in USA / Canada
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Nick Mller wrote:

Very nice, and so it should be for 80 quid. :-)
I haven't costed my idea yet, but under a tenner per machine is sorta the ballpark.
--
Wally
www.wally.myby.co.uk
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Then you have to use a bicycle-tachometer.
Nick
--
DIY-DRO // Eigenbau-Digitalanzeige
Available now in USA / Canada
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Nick Mller wrote:

Well, I've already got magnets, wire, voltage regulators, vero, stuff to make brackets/housings.
Sensor - 1.50 PIC - 2.00 4 7-segment LEDs - 2.50
...would leave 4 quid to spend on other components. (I'm assuming I can find a suitable DC supply inside each machine, otherwise I'll need to add a small mains transformer and PSU bits.)
--
Wally
www.wally.myby.co.uk
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

OK. I fully understand your attitude, albeit I think it is not economic. :-)) I really think it is wort looking at Microchips site. They do have excellent app-notes and you might even find what you need. I've done PICs and I really liked their docs. Dig!
Nick
--
DIY-DRO // Eigenbau-Digitalanzeige
Available now in USA / Canada
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
There are dozens of solutions to this 'problem'. If you pursue a digita
solution then you are basically making a counter/timer. Personally, wouldn't bother with vanes - just stick your probe near a convenien gear wheel and feed it into a cheap panel display with a coun facility. The display needs to be able to accept a scale factor to sho RPM and take account of the number of teeth you have. Generally accuracy issues are most relevant for slow speed operations when yo get fewer pulses per update.
A much simpler solution is to make an analogue f/v converter an display on a DVM. 1% accuracy is not too difficult and would b perfectly adequate for machining operations.
A nice add on for the digital option might be a m/s scale, which for given (entered) radial distance from the spindle centre would displa the relative speed of cutter and metal. Just multiply RPM by 2(pi)/6 (x 0.1047) to get rad/s and then multiply that by radial distance in to get m/s. So, if you are turning a 6" diameter flywheel at 200rp then first go metric (6" = .1524m, radius = 0.0762m). 0.0762 x 200 2(pi)/60 = 1.6m/s
-- Myford Mat ----------------------------------------------------------------------- Myford Matt's Profile: http://www.rcgroups.com/forums/member.php?uf19 View this thread: http://www.rcgroups.com/forums/showthread.php?tQ962
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Myford Matt wrote:

The problem with gear sensing is that the gears are mostly plastic. I'll look some more into panel displays, though.

Nah, I'm looking for a nice 4-digit LED display that's permanently mounted on each machine.

Now, that is a damn good idea. :-)
--
Wally
www.wally.myby.co.uk
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I picked up a bycicle speedo from asda for about 11 the sort that uses a magnetic pick up.
You enter the dia of the wheel to read speeds as in Kph. the idea is to use work out the dia needed to give me a relation ship that provides rpm.
Cheep, battery powered and small.
Adrian
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Adrian Hodgson wrote:

An interesting idea, but not really what I'm looking for in terms of display.
--
Wally
www.wally.myby.co.uk
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
The industry standard way of measuring engine speed is with a magnetic pickup, a ready made thing that looks rather like a bolt with a point on one end and a screened cable coming out of the other. It's actually a magnetic core with a coil wound around it so when any piece of ferrous metal moves near the end it produces a voltage, you can put this next to a gear or even a ring of bolts and it will produce a pulse as each tooth/bolt passes by. It works in dirty, oily environments unlike optical solutions and is very reliable. It only takes an op-amp or comparator to condition this signal into 5V logic for the micro and then it's just a matter of measuring the frequency and allowing for the number of teeth. The way to do it is to use one of the micro's counter/timers in pulse accumulate mode, if it's only 8 bit then extend it to 16 bit with the overflow interrupt, then generate a 100mS window with another timer (often shared with a crude task manager) and use this to read and clear the accumulator. You now have the number of pulses per 100mS and it's simple maths from there. This is the system we have been using for years to measure engine speed and it works extremely well with even the simplest of micro. Greg

for
the
on
get
low
(Clark
inside
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Greg wrote:

I like the idea with the bolts - it gets around the plastic gear problem. Those sensors aren't terribly cheap, that I've found so far, though (about 17 quid, compared to about 2 quid for a hall effect device, roll your own magnet and bracket).

That's why I opted for a magnetic method.

That'll be something to learn about, then...

This is pretty-much the approach I've taken, other than looking at using an interrupt to respond to the pulses and increment my own counter.
--
Wally
www.wally.myby.co.uk
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

If it's stand alone... a D to A converter connected to a volt meter, run from an inductive sensor works well. I built my circuit on a 20mm x 20mm veroboard.
--
Regards Jonathan

remove AT to reply
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.