Handy Grow Room Tech items...

heckler73

Well-Known Member
The "tone ring" on the alternator rotor (fixed stator) is a 24 segment encoder. I can get practically instant crank speed by checking the interval between pulses on the hall sensor.

The most brief period is 833,000 microseconds at 6000 rpm. I am using the no-scalar, 16mHz clock.
I bit shift a 16 bit register and count each time if overflows. I know how many 62.5 ns, ticks that takes.

The rest is just math. Running this way, I don't have any timing issues in the software loop. The RPM is always available, on the microsecond level. That is way below the real time, of engine lag, and my wrist speed.

Plenty of time.
Oh you're using the digital channels? I mostly use the analogs (but I'm trying to read analog voltages in experiments, generally), and any digital work I've done usually hovers around 5Hz at best because the components I play with are slow communicators (like 120-200ms response).

I'm a little confused by those timings, though. At 100Hz (6000rpm) your smallest cycle is 0.833s ?
 

Doer

Well-Known Member
Smallest interval. It is actually a tone. D in Octave 7. That the test I use

24 segments remember?

24,0000 per minute at 1000 rpm. That's 1/400 of a second per or 2.5 milliseconds at idle. Idle is just under tone A in Octave 4. Concert A 440.

I use the digital input for the crank and analog for the throttle pot.
 

heckler73

Well-Known Member
Smallest interval. It is actually a tone. D in Octave 7. That the test I use

24 segments remember?

24,0000 per minute at 1000 rpm. That's 1/400 of a second per or 2.5 milliseconds at idle. Idle is just under tone A in Octave 4. Concert A 440.

I use the digital input for the crank and analog for the throttle pot.
:lol:
Can you play the opening bar of Star Spangled Banner at a red light?
Actually, you could just code it into a sub-routine and it'll play itself :lol:

That's fantastic you use both A/D channels.
24 segments? You mean the "encoder". Yes I remember that, but still don't know what you're encoding, exactly.
I am not a biologist, nor much of a gear-head. I learn about auto-mechanics when something breaks. ;)
 
Top