Turntable Speed

julianE

Senior Member
Hello,
I bought one of these for my turntable,

23075

and neglected to notice that it's a 50 Hz model and I need a 60 Hz. I don't mind that it's 50 Hz I rather prefer a portable light source.
I need to order some high intensity LEDs, would a white LED be better or should I go with red or some other color?
As far as generating the frequency using an 08M2 would I be better off using PWM ( I looked at the wizard and the lowest frequency is 61 Hz) or just toggle with a pause. Also, I'm not sure if i need the light to be blinking at 50 Hz or double that at 100 Hz?

Thanks in advance.
 

BESQUEUT

Senior Member
The thing was designed to work with a neon lamp. So correct frequency is 100hz.
A neon lamp light one time per max voltage with no polarity.
 

hippy

Technical Support
Staff member
I counted the silk-screen marks and, for the 45 RPM band, that appears to be about 45 per 120 degree, 135 per revolution, so, at 45 RPM, that's 6075 ticks per minute, 101.25 per second.

So that would confirm 100Hz.

Working backwards from that, there should be 100 * 60 / 45 marks per revolution; 133.3, which I would guess is what it actually has, if one includes the gap where there are no marks.
 

julianE

Senior Member
I counted the silk-screen marks and, for the 45 RPM band, that appears to be about 45 per 120 degree, 135 per revolution, so, at 45 RPM, that's 6075 ticks per minute, 101.25 per second.

So that would confirm 100Hz.

Working backwards from that, there should be 100 * 60 / 45 marks per revolution; 133.3, which I would guess is what it actually has, if one includes the gap where there are no marks.
Hippy, as always, thanks for all your help. Life got busy and I finally got a chance to experiment. Very basic switching of a white LED with a 390 ohm series resistor, I'm sinking on C.2 pin on 08M2

Low C.2
Main: Toggle C.2
pause 10
goto Main

since my turntable speed is probably off a little the marks did not stop. 10 millisecond delay should equate to 100 Hz,

Just to try, I varied the pause from 1 to 8. Pause of 1 should be 1 Khz, it worked. I guess if you use a multiple of 10 that too will stop the marks.

My next step is to set up my other turntable with direct drive and quartz speed regulation and calibrate my picaxe strobe using it. My best turntable is belt driven and does not have speed indication it does have an FG servo DC motor so it is speed regulated. It's a statement turntable from the 1980's they took great pains to make the best in class machine and yet could not have an LED speed indicator. the platter is a work of art made with 2 different materials, zink for inner portion and aluminium for outer.

I have never used the PAUSEUS microseconds command and that's my next step. I'm going to make the strobe a variable speed with some sort of a display, should be fun.

Thanks everyone for all the help.
 

hippy

Technical Support
Staff member
One important thing to note is that a loop with a PAUSE 10 won't be executing at 100Hz. The PAUSE itself won't be entirely accurate and there is overhead in the other commands. With an M2 there may also be some inaccuracies or drift in the actual internal clock speed.

In most cases this is not a problem, won't even be noticed or have any adverse effect, but, when one has a set-up intended to highlight slight variances from a certain frequency, those discrepancies will be exaggerated.

To get an accurate 100Hz signal one would normally use a hardware signal generator and drive it from a crystal clock source.

I am surprised using PAUSE 1, 1kHz, worked. At 100Hz, the LED should be flashing so that it's on when a timer mark is under the LED, off while the next mark moves into place, on when it has done so. At 1kHz one would be catching all marks while moving.

The mark is moving during the on period, so there will be some blurring. This is why most strobe lights pulse only briefly at the appropriate rate.

What you see could depend on whether you are lighting just one mark at a time, as they pass under the LED, or lighting all marks simultaneously. I suspect you may not be accurately confirming rotational speed, merely confirming that it is rotating at a constant speed.
 

AllyCat

Senior Member
Hi,
Pause of 1 should be 1 Khz,
No, for several reasons. If you're using TOGGLE then there will be two pauses per cycle, so it would be 500 Hz. But because PICaxe Basic is an "interpreted" language, then ALL instructions take a significant time to execute: Ballpark figures are 400 us (0.4 ms) for a TOGGLE (or for a High or Low) , 800 us for a GOTO and the overhead on PAUSE is about 300 us. So a "Pause 1" loop will take around 2.5 ms and toggling give a frequency around 200 Hz.

PAUSEUS has more overhead than PAUSE so (at 600 - 700 us) PAUSEUS 0 takes about twice as long to execute as PAUSE 0 ! My guess is that for your toggling 100 Hz program above, you need to replace the PAUSE 10 with approximately a PAUSEUS 310 (i.e. 3100 + 700 + 800 + 400 = 5000 us = 5 ms).

Also, as hippy indicates, the internal oscillator is not perfect, normally factory pre-set to within 1% and probably will remain stable to within that percentage (although the official Microchip specification is much worse). You can trim it a little with CALIBFREQ, but generally adjusting a PAUSEUS will be more versatile. The mains power-line frequency is typically specified to remain within about 0.5 % and should be "perfect" if averaged over a period of some days.

Cheers, Alan.
 

julianE

Senior Member
I like it when an initially simple idea turns out to be complex. Thanks for all the insight Alan I was hoping you'd respond. At this point I'm going to try to solve this empirically and maybe work backwards to figure it out on paper. I have a turntable with very accurate speed control, a direct drive model which is an anathema among the purists. I'll vary the led flashing until it's just right, freeze the design and use it as a reference for the high end belt driven table.

Other methods I've read about is to use a crystal oscillator with a couple divider chips and a transistor LED driver.

I just remembered, I have a highly accurate audio frequency counter, it also will generate audio signals, I might have to take it off the shelf.
 

hippy

Technical Support
Staff member
I have a turntable with very accurate speed control, a direct drive model which is an anathema among the purists. I'll vary the led flashing until it's just right, freeze the design and use it as a reference for the high end belt driven table.
Perhaps it would help if you could describe exactly what you are wanting to achieve at the proverbial end of the day rather than trying to figure out how to do one thing when there may be some other better way.

Some PICAXE chips have a gated timer / counter which can be used to give pretty accurate and high resolution timing measurements which may be useful.
 

julianE

Senior Member
PAUSEUS has more overhead than PAUSE so (at 600 - 700 us) PAUSEUS 0 takes about twice as long to execute as PAUSE 0 ! My guess is that for your toggling 100 Hz program above, you need to replace the PAUSE 10 with approximately a PAUSEUS 310 (i.e. 3100 + 700 + 800 + 400 = 5000 us = 5 ms).
Alan,

Astonishing work, thank you. PAUSEUS 310 was almost perfect. Hippy is right about lack of clarity in my postings to clarify I have multiple turntables and for this discussion I am working with two of them, one is a direct drive with a quartz speed control and an indicator LED when the speed is correct. The other is belt driven that is also speed regulated but without any indications when the speed is set correctly. I mounted the strobe puck on the direct drive turntable that is spinning at correct speed and varied the PAUSEUS value, the point where the strobe markings appeared to stand still is with PAUSEUS 314 so that's the value I will be using once I solder and finalize the project. Very close to your calculated value.

To further verify operation I got the test equipment off the shelf and measured the frequency of the setup,

PAUSEUS 310= 102 Hz
PAUSEUS 314= 101 Hz
PAUSEUS 318= 100 HZ

I'm fairly certain the strobe puck printings are not perfectly precise and my test equipment has not been calibrated in over 20 years, still, good enough.

I will order a higher quality calibration disk for future use.

The belt driven turntable is now calibrated to PAUSEUS 314 value.

Thanks again and all the best.
 

julianE

Senior Member
Perhaps it would help if you could describe exactly what you are wanting to achieve at the proverbial end of the day rather than trying to figure out how to do one thing when there may be some other better way.
Hippy,
I'm sorry for the poor description, I'll do better in the future.
Thank you for all the help.
 
Top