Author Topic: hacking a tacho module?  (Read 7136 times)

Offline hopefuldave

  • Full Member
  • ***
  • Posts: 189
  • Country: gb
hacking a tacho module?
« on: April 19, 2013, 09:46:51 AM »
I can't see why I can't...

I have a frequency counter pcb, usual set up is to use a 60-tooth disc to convert rpm to Hz, I'd like to use as a lathe spindle tacho - I'm planning to use a reflective sensor instead of the usual slotted one, pointed at a shiny gear on the spindle, but it has 70, not 60 teeth...

The tacho pcb (one-chip microcontroller) has a 24MHz crystal, occurs to me that a 28MHz crystal would shorten the timing period while it counts teeth and correct the displayed frequency/rpm? The chip it's using is rated to 32MHz, so it should cope...

Any thoughts?

Dave H. (the other one)
Rules are for the obedience of fools, and the guidance of wise men.

Offline John Rudd

  • Hero Member
  • *****
  • Posts: 2525
  • Country: gb
Re: hacking a tacho module?
« Reply #1 on: April 19, 2013, 10:06:39 AM »
Errm, Lemme see..

Try it and see...2 chances, it'll work or it wont... :bugeye:

IIRC, Tony Jeffree (spelling? ) did a project based on a pic and specified a particular xtal frequency and stressed the importance of its value..

I'd be more inclined to just use a 60 tooth wheel... :scratch:
eccentric millionaire financed by 'er indoors
Location:  Backworth Newcastle

Skype: chippiejnr

Offline Bluechip

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 1513
  • Country: england
  • Derbyshire UK
Re: hacking a tacho module?
« Reply #2 on: April 19, 2013, 11:17:22 AM »
I'm with Mr. Rudd. Make a 60T disc. Save yourself a lot of aggro.
 
I would guess if it's a PIC it may well use tmr1, and it's then quite easy to fall foul of the limited options re: pre-scaler. It will also baffle any code in there that uses delays I would think.
 
I tried to chirp up a PIC driven strobe a couple of years ago by tweaking the Osc. Frequency.
 
What a miserable crisis that was ....  spent about 20 hrs. trying to frig the existing code, eventually did it from scratch in 3-4 hrs. Which is what I should have done in the first place.
 
BTW Do you have source for a 28MHz crystal? I can't seem to find one. At one time I seem to remember there was a geezer who did any freq. you wanted for the Radio folk, probably gone now..
 
( I have a 26MHz crystal, but it's 3rd overtone, it cranks over at 8 and a bit on a PIC ... bugger. )
 
Dave BC
 
 
I have a few modest talents. Knowing what I'm doing isn't one of them.

Offline hopefuldave

  • Full Member
  • ***
  • Posts: 189
  • Country: gb
Re: hacking a tacho module?
« Reply #3 on: April 19, 2013, 11:42:08 AM »
Thanks, gents...
Nowhere to put a 60-tooth wheel on it.... The only possible location is where I'm planning to put a synchronizing cam when I do a single-tooth clutch for leadscrew reverse (the coarse threads, below 16 tpi, are driven by the spindle pulley before the 8:1 backgear, so aren't synchronous with the spindle, hence I can't just use the threading drive as it stands or I'd end up with lots of 8-start threads...) - the 70-tooth is on the spindle to drive the threads and feeds, so changing it isn't an option... Makes it difficult to add headstock dividing, too! That'll have to hang off the back of the spindle...

My thinking is that the microcontroller counting pulses / minute is really measuring Hz at the input, the 60 tooth disc multiplies to give revs / min, so by making the microcontroller clock 7/6 x the original frequency (28 rather than 24MHz) it'll count for 6/7 as much time so taking 1rpm and a 1 second count it would see 60 pulses from a 60 disc, reduce that to 6/7ths of a second it'll see 60 pulses from a 70...

If the microcontroller clock wouldn't take a 28MHz crystal it'd be a non-starter... But it looks like the "frequency counter" is direct from the chip manufacturer's data book 'sample circuits' pages, just with the type number sanded off ;)
It's not a PIC, it's a general purpose microcontroller, based on the 8051 (max 32MHz clock), so all its timing will be based on counting clock cycles with a DJNZ instruction or three... Totally clock-dependent.

Dave H. (the other one)
Rules are for the obedience of fools, and the guidance of wise men.

Offline Bluechip

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 1513
  • Country: england
  • Derbyshire UK
Re: hacking a tacho module?
« Reply #4 on: April 19, 2013, 11:52:17 AM »
You could try it.
 
I suspect something will be compromised as it was in my case, but I doubt if it would kill anything if it does.
 
A 14 MHz crystal is standard, and simple frequency doubler circuits are on the net so it wouldn't be too onerous.
 
Did not look on ebay for a 28Mhz crystal, just Farnell, Rapid & RS.
 
Let us know how you get on .. :thumbup:
 
If it works, you've won, if not you've lost nothing ..
 
BC
 
EDIT   Mouser seem to have some ....
 
 http://uk.mouser.com/ProductDetail/Citizen/CSA309-28000MABJB/?qs=sGAEpiMZZMsBj6bBr9Q9aaHDOJpEQYjpwER0%2fte6v0A%3d
 

 
 
I have a few modest talents. Knowing what I'm doing isn't one of them.

Offline hopefuldave

  • Full Member
  • ***
  • Posts: 189
  • Country: gb
Re: hacking a tacho module?
« Reply #5 on: April 19, 2013, 12:17:51 PM »
Kanga products here in the UK have 'em too, a whole pound-fifty plus post. In the same package style too! I've fired off an enquiry re fundamental vs overtone and suitability, waiting with bated breath... Got to be worth a try, its about the only leaded part on the board!  :D

Dave H. (the other one)
Rules are for the obedience of fools, and the guidance of wise men.

Offline andyf

  • In Memoriam
  • Hero Member
  • *****
  • Posts: 1795
  • Country: gb
    • The Warco WM180 Lathe - Modifications
Re: hacking a tacho module?
« Reply #6 on: April 19, 2013, 01:07:39 PM »
In the distant past,  I've bought xtals from QuartSlab http://www.quartslab.com/ . They seem to have been away since I last dealt with them. I mention it only because they will make one for  almost any frequency you fancy.  Kanga will be a lot cheaper.

Andy
Sale, Cheshire
I've cut the end off it twice, but it's still too short

Offline John Rudd

  • Hero Member
  • *****
  • Posts: 2525
  • Country: gb
Re: hacking a tacho module?
« Reply #7 on: April 19, 2013, 01:39:07 PM »
How about a second 70 tooth gear driven by the orig, hang a 60 hole disc from the idler?  :scratch:

Ok, I'll get me coat....  :loco:
eccentric millionaire financed by 'er indoors
Location:  Backworth Newcastle

Skype: chippiejnr

Offline hopefuldave

  • Full Member
  • ***
  • Posts: 189
  • Country: gb
Re: hacking a tacho module?
« Reply #8 on: April 19, 2013, 03:29:15 PM »
Quote from: John Rudd
How about a second 70 tooth gear driven by the orig, hang a 60 hole disc from the idler?  :scratch:

Ok, I'll get me coat....  :loco:

Or even a 14 tooth with a 12 hole disc, 21 tooth with 18....
Could even add a Gray-code disc to give spindle position and direction...


No, don't get me started, no room for that, either!

Dave H. (the other one)
Rules are for the obedience of fools, and the guidance of wise men.

Offline andyf

  • In Memoriam
  • Hero Member
  • *****
  • Posts: 1795
  • Country: gb
    • The Warco WM180 Lathe - Modifications
Re: hacking a tacho module?
« Reply #9 on: April 19, 2013, 05:17:17 PM »
You mentioned using a reflective sensor. Can't you just use a disc of something shiny, paint 60 black spokes on it, stick it to your 70T gear and aim your transmitter/sensor at it?

Andy
Sale, Cheshire
I've cut the end off it twice, but it's still too short

Offline hopefuldave

  • Full Member
  • ***
  • Posts: 189
  • Country: gb
Re: hacking a tacho module?
« Reply #10 on: April 20, 2013, 04:40:09 AM »
That would be simpler, but there's not really access in that direction... Holbrook packed a lot in the headstock, quite tightly, and still left the headstock nearly two feet long....

Just changing the crystal seems a lot less work, too!

Dave H. (the other one)
Rules are for the obedience of fools, and the guidance of wise men.

Offline quantumeer

  • Jr. Member
  • **
  • Posts: 19
Re: hacking a tacho module?
« Reply #11 on: April 20, 2013, 08:42:24 AM »
Black up 10 of the teeth.  The obvious frequency counter circuit won't care that the pulses are irregular ;)  Or indeed, change its idea of how long a second is by changing the crystal.

Mark