Help with directional lighting project, hall effect sensors etc

pwdixon

Joined Oct 11, 2012
488
Pretty simple stuff then, one pole sets the latch other pole resets the latch, time between latch set/reset/set will indicate direction. There will be a speed issue to do with response speed but even when going really slow the overall calculation of direction should still work. I'm sure even if there are no external light driving relays that 'blob' could contain enough drivers to get the system to work.

I'm in Newbury UK.
 

Reloadron

Joined Jan 15, 2015
7,517
Pretty simple stuff then, one pole sets the latch other pole resets the latch, time between latch set/reset/set will indicate direction. There will be a speed issue to do with response speed but even when going really slow the overall calculation of direction should still work. I'm sure even if there are no external light driving relays that 'blob' could contain enough drivers to get the system to work.

I'm in Newbury UK.
That would be my guess. A south pole latches the sensor and the north pole un latches the sensor. The presence of pulses means rotation and maybe thet is sent to a one shot used as a missing pulse detector? The time between latch and un latch is maybe how direction is determined?

Ron
 

Alec_t

Joined Sep 17, 2013
14,313
one pole sets the latch other pole resets the latch
Agreed. That will result in a periodic rectangular waveform (if there's motion) with a duty cycle indicative of direction, e.g. 1:10 for forward, 10:1 for reverse. No change of Hall sensor state within a given time (few secs) = no motion. We should be able to come up with something to control the lights accordingly.
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
It would need to be known roughly what the original algorithm truly was for the sequence, or exact chain of events.
Then some means of duplicating it using the same detectors and magnets.
In the environment it is in I don't see IR etc being that reliable? Plus the magnets and sensors are already there.
Max.
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
Looking forward to some solutions :)
What I am thinking is that there is a sample taken and if one pole is seen and not the next or if the wheel stops in mid between any poles, there is a sample time that will declare the car stopped.
What it would then need is what minimum speed is considered as a 'Stop'?
Max.
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,313
Here's a simple arrangement which might meet your needs. With the component values shown, a wheel moving more slowly than 1 rev in ~10 secs is regarded as stationary. It takes ~ 15 secs to determine the stationary state, after which you get 'all reds'. I don't see how to speed up that determination without increasing the rev limit treated as stationary.
RailcarLights.gif

Edit: slight change to schematic
 

Attachments

Last edited:

Thread Starter

Hoopdub

Joined Feb 23, 2015
23
excellent, thanks Alec, unfortunately I don't have a clue what any of that means :-D have not done electronics since gcse in school and I have forgotten quite a bit lol. im more used to larger relays and diodes. I see your in Cardiff, im from Pontypridd.
 

Thread Starter

Hoopdub

Joined Feb 23, 2015
23
im slowly remembering what all the symbols are etc. transferring the schematic into reality im struggling with at the mo lol
 

Alec_t

Joined Sep 17, 2013
14,313
im slowly remembering what all the symbols are
Good. Keep at it! If it helps, U1, U2 and U3 are all CMOS logic circuits (which, therefore, need anti-static handling precautions to prevent their being zapped). U1 is a quad exclusive-OR gate. U2 and U3 are each a quad NAND gate with a Schmitt-trigger (snap-action) characteristic. C3 is an electrolytic capacitor with a working voltage >12VDC. C1 and C2 are each a plastic-film type capacitor. M1-M4 are N-channel MOSFETs selected to have a low 'on' resistance and would be able to handle several Amps of current, should you need that (we don't know your LED specs).
 

Brownout

Joined Jan 10, 2012
2,390
The issue of working at all speeds is easily solved if the electronics only looks for a change in polarity and no time limit needs to be imposed. If there is in fact hysteresis involved, this should be easily solved. Seems to me that some measurements of the current sensor needs to be made and recorded, since we can't tell otherwise how it actually works. With the recorded measurements, it should be simple to design the logic required.
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
The issue of working at all speeds is easily solved if the electronics only looks for a change in polarity and no time limit needs to be imposed. If there is in fact hysteresis involved, this should be easily solved. Seems to me that some measurements of the current sensor needs to be made and recorded, since we can't tell otherwise how it actually works.
http://sensing.honeywell.com/product-page?pr_id=36104
They are simple magnetic latch/unlatch open collector output type, the magnets a sufficiently large it seems in this application.
Max.
 

Brownout

Joined Jan 10, 2012
2,390
If nobody's said it yet, you can determine direction of rotation by comparing pulse lengths. The longest pulse will have the same polarity of the trailing magnet. For example, for a long positive pulse, the direction of rotation is such that the N magnet passes before the S magnet. Sorry, I can't see Alec_t's attachment and he may have already conveyed this.
 

Søren

Joined Sep 2, 2006
472
Hi Hoopdub,

"The box is resin filled so I can’t reverse engineer it."
Just pop it in a pot of water and boil it for say 15..20 minutes, that will turn the resin into something like cold molasses (perhaps a bit softer) and you can dig out the circuit with a pair of pliers and a screwdriver or similar - Careful with the hot stuff, it sticks to skin!


Assuming a pull up resistor on the o.c. output, rotation of the wheels will result in a high signal with a low pulse as the magnets pass by, when going one direction and a low signal with a high pulse when the direction of rotation is reversed.

A circuit could be made from a CMOS 40106, if the minimum speed isn't too low - I don't know wheel size, circumference or how many degrees each magnet is "visible" to the sensor, so I can't be too specific about the lower practical limit.

The elegant solution, however, would be to use something like a PIC10F22n, where the minimum velocity would be nothing but a number in the code (the white lamp off delay ties to the minimum velocity of course).

The coding would be easy, look for a transient (either high to low or v.v. will do) and start timing, as long as a new transient arrives before the max. timing is reached, keep the relevant white lamps on. Which lamps should be on is determined by the input state, which should be sampled a shade after each pulse.

If done this way, very little external components will be needed, like 4 resistors, a cap, a zener diode and two transistors.

PIC10F22n
They're around $0.50 a pop and you can even upload the code and get them delivered already programmed, although I am not aware of the cost of this service, as I usually leave (boring) production to my customers.

(Just did a quick look-up. The programming of the chips is only a few cents and I didn't see any start-up fee)


Regards,
Søren
 

Thread Starter

Hoopdub

Joined Feb 23, 2015
23
thanks for all your help so far guys. as I'm used to bulkier electronics in the form of automotive relays etc. all of the above seems very daunting to me, creating any of the systems you guys have offered up appear to be way out of my capabilities, I'm not that dexterous with a soldering iron sadly. its the damn direction pick up that's throwing me, I could make it work easy with relays if I could just overcome the direction detection side of it, I didn't realise that without having a physical contact to operate a switch would need so much electronics to achieve. now I see why these boxes we have been fitting are £180 each.

here is some more information for you.
the system will be used outside in all weathers and temperatures. it may be subject to quite a bit of vibration up and down the track, and when the trailers are being loaded and unloaded.
The LEDs we use have a current draw of 0.05A at 13.8 volts, and we use 8 of these units, 4 white and 4 red.
the trailer system runs off a 12v dc car battery.
if we were to use the system on an excavator it would need to run off 24v dc.
the system we used to buy in comes as the picture below, a box, lead and sensor about 1 meter long, and a plug for us to connect the feeds and the led outputs.

we buy in the magnets and leds separate to the control box.
the wheels on the current trailers have a usable diameter of 390mm as you can see there is a recess in the rear where we fit the magnets, they are at roughly 170mm radius.



we have never been told as far as I am aware that the sensor has to be placed at a certain radius for the system to work correctly, and we have used them on some different trailers with larger and smaller wheels without any issues . they have always worked fine.
 
Top