Hall Effect Timer Circuit

Discussion in 'The Projects Forum' started by teabag_44, Jan 29, 2015.

  1. teabag_44

    Thread Starter New Member

    Jan 29, 2015
    15
    0
    I want to build a timer circuit (possibly using a 555 timer) based on the presence (or absence) of a Hall Effect signal. I want the timer to turn on an SPST relay when it receives a pulse from the Hall Effect and the relay needs to stay on for about 3 minutes after the Hall Effect signal is no longer present. The Hall Effect signal can vary from 1 pulse per second (pps) to 30pps, but regardless of the Hall Effect frequency I need the relay to stay on until the pulses disappear. In other words, the time delay doesn't start until the Hall Effect signal disappears and... if the Hall Effect signal re-appears, the timer stops (relay stays energized). I will be using this timer circuit in conjunction with another circuit that is already assembled and operational, so there cannot be any interference between the two circuits (possibly couple the timer circuit with a capacitor?) The entire system will be running on 9vdc. The Hall Effect Timer circuit will turning on the display on an anemometer, but only when the wind is blowing. Can someone help??
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    You need a retriggerable monostable multivibrator set for a timeout of 1 second.
     
  3. Reloadron

    Active Member

    Jan 15, 2015
    964
    232
    Per MrChips what you want is a retriggerable One Shot which can be built around a 555 timer. What I don't quite understand is the 3 min. requirement you mention. The reason I question the 3 min is because when using the 555 for long timing periods you can run into problems and other circuit designs may fare better.

    Ron
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    I think this will do what you want :-
    RetriggerableRelayDriver.gif
    I have assumed that the Hall sensor is the type that pulls its output low (e.g. with an open collector) and has an internal pull-up resistor. D1/C1 help to reduce interference between this circuit and others attached to the 9V supply.
    As Ron says, 3 mins can be a bit of a stretch for consistent timing from a 555 and requires C3 to have a low leakage.
     
  5. Reloadron

    Active Member

    Jan 15, 2015
    964
    232
    I was hoping Alec would see this thread, always has great timing circuits. :)

    Ron
     
  6. teabag_44

    Thread Starter New Member

    Jan 29, 2015
    15
    0
    Thank you all so much for the replies. The 3 minute delay is not critical and rather arbitrary on my part, so even if a 555 timer is not consistent, something close to 3 minutes delay is acceptable. I just don't want the displays to be on all the time, especially with there is no Hall Effect activity. If there is a more acceptable timer chip available, please advise. I am using a HAL575A sensor, so whatever it takes to interface it with the timer circuit is most definitely acceptable. I plan for the relay to turn the displays on and off by lifting (or connecting) the power supply negative to the displays.
     
  7. teabag_44

    Thread Starter New Member

    Jan 29, 2015
    15
    0
    Another consideration. I know that relays come in all sizes, shapes, voltage & current ratings, etc. What do you recommend I should use for the relay. I've looked at a lot of 555 timer circuits with relays, but I have not found one that identifies the part number of the relay being used. My concern is I need to find a relay that will consistently work with the 9-Volt supply, but one that will not exceed the current capability of Pin 3. FYI - It needs to be a DPST relay.
     
  8. Reloadron

    Active Member

    Jan 15, 2015
    964
    232
    The 555 can sink or source about 200 mA so the relay coil must not draw over 200 mA. Pin 3 the 555 output pin will have a voltage out of around Vcc - 1.7 Volts so in this case 9volts - 1.3volts = 7.3volts. Most 555 circuits with a Vcc of 9 volts that directly drive a relay use a relay with a 6 volt coil. How much current will the contacts on the relay need to handle? That is also a consideration in choosing a relay.

    Ron
     
  9. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    Depending on the display characteristics you may be able to use one or more N-MOSFETs instead of a relay to switch them.
    I see from its datasheet that it's a latching sensor drawing "low current" (up to 6.9mA), or "high current" (above 12mA), depending on the latched state. Will get my thinking cap on for a suitable interface to the timing circuit I proposed.

    Edit:
    Here you go
    RetriggerableRelayDriver2.gif
     
    Last edited: Jan 30, 2015
  10. teabag_44

    Thread Starter New Member

    Jan 29, 2015
    15
    0
    Ron, the load on the relay contacts will be around 100mA. Fairly inconsequential, I would say. I was more concerned about the load on pin 3 of the 555 timer, but you answered that question by giving me some proposed relay specs... thank you. I found a 6volt DPDT relay that only draws 25mA which I believe will do the trick. What I'm not sure of at this point is what will happen to the Hall signal when connecting the timer in parallel with the original circuit which is a PIC 16F628 microcontroller (pin 18). I will wait for Alec to "re-think" the interface to the timing circuit. Thanks a Million!!
    Bob
     
  11. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    See the post #9 edit.
    If you're switching only 100mA you could use the 555 or a transistor (e.g. 2N3904) to do that. Cheaper then a relay ;).
     
  12. teabag_44

    Thread Starter New Member

    Jan 29, 2015
    15
    0
    Outstanding!!! The cap and transistor should provide adequate isolation between the microcontroller and the 555 timer so that they don't "talk" to each other. Also, the reason for the relay is basically the same... isolation. I will be turning on & off 1 or 2 LED's (which indicate wind direction) in addition to lifting the common cathode lead to one of the 7-segment digits (which indicate wind speed), and being considerably "old school" :eek:) I cannot fathom a way to control both circuits with one source (i.e. a transistor) as you suggested, thus justifying a relay. Besides that, the relay I'm looking at is cheap and I understand that technology!! LoL I'll get busy and start ordering some parts!! Thanks again for all your help!!
    Bob
     
  13. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    Like this?
    Low-sideSwitch.gif
     
  14. teabag_44

    Thread Starter New Member

    Jan 29, 2015
    15
    0
    Ok. This is what I had in mind.
     
  15. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    That would do the job, but the LEDs need individual current-limiting resistors or they will fry.
    Can't the MCU switch the common-cathode terminal directly, rather than via relay contacts?
     
  16. teabag_44

    Thread Starter New Member

    Jan 29, 2015
    15
    0
    Sorry... I should have given you more info on the LED's. They are 12V - 30mA LED's (Radio Shack 276-0011) with an internal resistor and they work perfectly with the 9V supply. I suppose the MCU could switch the 7-segment display but that would mean re-programming the EPROM and that is above my level of expertise. I am hoping that switching the common-cathode on and off with the relay doesn't effect the operation of either the display OR the MCU. It will be "trial and error" - hopefully, no error!! :)
     
  17. teabag_44

    Thread Starter New Member

    Jan 29, 2015
    15
    0
    Alec t, if you're still watching this thread... I have built the timer circuit and it's working, but not quite right. I think we need to tweak the Hall input circuitry. I don't have an oscilloscope, but I have a digital voltmeter and what I'm seeing on the Hall input is 1.27v to 2.70v... 1.27v is no magnetic field present and 2.7v is with the magnet directly in line with the sensor. So what happens is, the relay comes on as soon as power comes on (which is ok as long as it eventually times out if there are no pulses present) and the relay will stay on until I disconnect the Hall input, at which time it will run the 3-minute cycle and turn off. This seems to be the case most of the time, however on a few of my tests, the relay cycled on and off in conjunction with the pulses (not a good thing :eek:). It doesn't appear to do this all the time, but it has done it several times. Also, (one more thing :eek:) it seems as though I needed to cycle power to the timer board during a few tests to get it to work again, i.e. the 555 didn't appear to reset after the timeout cycle. I sure would appreciate anything you can suggest. Thanks. Bob

    Additional information... This is what I'm measuring on the base of Q1: .54 volts with no magnetic field present and .46 volts when the magnet is directly in line with the sensor. Hope this helps. Bob
     
    Last edited by a moderator: Feb 10, 2015
  18. teabag_44

    Thread Starter New Member

    Jan 29, 2015
    15
    0
    Alec. Attached is the schematic with voltage readings. The voltage readings are somewhat different than my yesterday's post as I am having some power supply issues. I am in the process of building up a new "regulated" 9-volt, 1 amp power supply which will eliminate these differences in voltage readings in the future. Please see my note on the schematic about R1. I guess R1 pulled the Hall signal voltage up above the microprocessor threshold to operate properly. The Wind Speed module works properly without R1, but I'm not sure if R1 is absolutely necessary for the timer circuit. Bob
    Voltage Readings 2.10.15.jpg
     
  19. Reloadron

    Active Member

    Jan 15, 2015
    964
    232
    I am going to venture a guess here with a question. Your sensor, the HAL575 is a latching type.
    Looking at the Hall Input where your voltages are 1.24V and 2.48V you should be seeing a much greater swing and R1 is necessary. Using Alec's design you should be seeing a Hall Input swing of just over 0.8V to about 4.3V. You do have changing magnetic fields applied to the Hall Sensor (N-S-N-S) correct? You are applying 9 Volts to Pin 1 of the Hall Sensor and Pin 2 or Pin 3 are the Hall Input to your circuit correct? Something just does not seem right about those input voltages to me. Then too I may be wrong with this guess.

    Ron
     
  20. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    1) A supply voltage of 7.27V suggests you are using a dead PP3 battery!
    2) As Ron says, the Hall input swing should be greater. Spice tells me that if R1 = 680 Ohms the Hall device current draw must only be switching between 6.9mA (should be <6.9mA) and 8.7mA (should be >12mA). So looks like the Hall IC is quite a bit out of spec or is not receiving its proper supply voltage. First make sure you have a solid 9V supply. Try connecting a pull-up resistor of 680k or 750k from Q1 base to the positive rail, and/or increasing R1 to 820 Ohms.
    3) Trying to measure voltages with a DMM when the Hall input is changing won't give accurate readings. I'm particularly suspicious of the readings at Q1 base, because of the presence of C2. The base voltage should never get above ~0.7V. If Q1 base voltage changes as shown, there should be a much greater change in collector voltage.

    Edit: As Ron noted, your latching Hall device requires a change of magnetic polarity from N to S or S to N to make it flip output states. Your posted voltages are for magnet 'present' and 'not present'. Did you flip the polarity?

    Edit2:
    Oops, ignore comment (2) above. My bad, I didn't spot what the datasheet for the HAL said about keeping at least 3.75V across the device. For your 9V supply, R1 needs to be ~270 Ohms and, following the application note in the datasheet, could be repositioned if it made interfacing to the frequency measuring circuit simpler. Here's a revised circuit :-
    RetriggerableRelayDriver3.gif
     
    Last edited: Feb 11, 2015
Loading...