POV spinning display zero position

Andrew Cowan

Senior Member
My current project is a POV display - spinning LEDs used to make patterns in the air.

I need to determine when the spinning board is at its zero position. I am using a 40X2 (running off 3.3v), and want to connect some kind of sensor to one of the hardware interrupt ports, so I can check to see when it has been triggered using a flag.

Options I have thought of:
1) Hall effect sensor and magnet
Advantages: Fast.
Disadvantages: From the allegro site, most seem to have a normal voltage of Vcc/2, and then increase or decrease when a magnet is sensed. This sounds quite hard to interface with a digital port.

2) 38KHz IR LED and IR detector (goes low when IR LED present). This is the idea I am currently looking at.
Advantages: Easy on/off, does not need precise alignment, should interface well with a digital input.
Disadvantage: Speed. Can this cope with a IR exposure time of <1ms? The datasheet asks for a Burst length should be 6 cycles/burst or longer. - is this 38KHz*6 cycles = 0.16mS?

Any other ideas for sensing the zero position?

Thanks,

Andrew
 

benryves

Senior Member
One display I have seen uses a nail hammered into the base of the board to break the beam between an LED and an optical sensor on the spinning circuit board.
 

Dippy

Moderator
I'd go with break-beam too.

Basically, it can be as good as you can physically make it.

Magnets will be vague.
38kHz etc. a bit OTT.

Break-beam nice and simple and if you are good with DIY could be very fast... and cheap.
 

boriz

Senior Member
“This sounds quite hard to interface with a digital port”

Nah. Just put it through a small capacitor. This blocks the DC component completely.

If you want to detect a negative going pulse, tie the Picaxe input pin to +V via a 4.7K pullup resistor. That means the input pin will be at +V most of the time, but will make a brief negative excursion when the magnet passes the detector.

To detect positive going pulses, use a pulldown resistor instead. This holds the input at 0V until the pulse arrives causing a brief positive excursion.

Three things you need to think about...

1. Are the excursions big enough? IE. When the magnet passes the hall sensor, does the voltage on its output move far enough from the centre (quiescent) point to constitute a logic switch on the Picaxe input. Note: The hall device might not need to be driven from 5v like the Picaxe, so larger excursions might be available by driving it from higher voltages.

2. Are the pulses long/short enough? IE. The time constant of the capacitor + pullup/down resistor could prove critical. If it’s too short (capacitor too small), the Picaxe might miss pulses. If too long (capacitor too big), pulses might overlap at high trigger rates (high RPM).

3. Is a diode required? IE. After an excursion, when the hall output returns to its quiescent point, the capacitor will have been charged up a little by the resistor. So the voltage on the Picaxe input might briefly pass beyond the 0V or +V limits. With a small capacitor, this should not be a problem, but to be on the safe side, a diode ‘clamp’ will capture any out-of-range excursions.

I’m not suggesting this is the ideal solution. I’m just hoping to alleviate your fears about using a ratiometric hall sensor in this sort of app.
 

Dippy

Moderator
Would I use a slotted optoisolator?
It would depend.

If it is a spinning disc then the triggering will be slower in the centre (near axle/pivot) than if at edge.
So, your plonker that breaks the beam needs to be thinner if mounted near centre.
Obvious: it's going faster at the edge than in the centre. So the duration of bream time would be less - just wave your finger in front of a light bulb.

If you plonker is thin then the 'beam width' between IRLED - Sensor needs to be 'thinner' because your plonker has to block the light 'beam'.

If you had a 0.1mm beam and a teeny-tiny needle then it would break the beam rapidly and briefly.

So, it depends on the type you choose , where you mount it and the size of your plonker.

OR, you could make a nice fine beam for yourself; bit of black plastic and a 0.5mm PCB drill. Then you could use a pin to break the beam.

Time to play and use your imagination ..... :)
 

LizzieB

Senior Member
Depending on the construction of the device a reflective IR sensor might be easier to integrate than an interrupter type. In particular that would avoid the possibility of your plonker being in a nasty high speed collision...
 

hax

New Member
A hall sensor is probably not the best way to go in this project, but just for completeness, I thought I would mention that there are various hall sensors you can get.


Some latch on when sensing the "S" pole of a magnet and then latch off when going past a "N" pole of a magnet.

Others go high only when a pole is near, and low when a pole is not present.

So next time your project requires a hall sensor, don't assume there is only one type to choose from....
 

vttom

Senior Member
Here's a thought...

Rather than using a free-running motor that you need to sense, can you use a stepper motor or multi-turn servo so that the spin is actually under control of the PICAXE? Will it spin fast enough?
 

MartinM57

Moderator
I'd use a slotted opto switch. Very cheap, extremely fast, and with just two additional resistors you can send a clean digital input into a picaxe to trigger an interrupt. http://www.electronicsinschools.org/page.php?ps=2&p=929
Nice web site - a quick squizz at http://www.electronicsinschools.org/page.php?ps=2&p=45 caused an initial groan at what a transistor is, but it's a lot better further down and http://www.electronicsinschools.org/page.php?ps=93&p=359 is worth a read for most people and worth remembering as something to point people at when the inevitable questions arise on this forum
 
Top