Maker Pro
Maker Pro

Low power bistable latch arrangement

flippineck

Sep 8, 2013
358
Joined
Sep 8, 2013
Messages
358
I have a timeswitch module that provides a TTL voltage signal to the 70Ω coil of a SPDT relay. One end of the relay coil is fed with +5V from a buck converter chip, which in turn gets it's power from a 6V battery. The other side of the relay coil is connected to 0V (common to battery and buck converter ground pin), via the collector and emitter of an NPN transistor. The base of the transistor is driven by a microcontroller / RTC chip combination which sends it, IIRC, about 0.2V when it should be off, and about 0.8V when it should be on.

https://www.ebay.co.uk/itm/272724645803

I also have a chicken shed door opener device which works off a resistance potential divider incorporating a CDS type LDR. in this device, a control voltage seems to be taken from one leg of the LDR and is fed to an IC quad comparator arrangement which then drives output transistors to power the door winch. It too runs off a 6V battery.

https://www.ebay.co.uk/itm/254062482501

I wanted to modify the chicken door so that it worked not on light level, but on time of day. No matter how I adjust the trimmers on the chicken door to change it's response to dusk, the fox soon gets used to it and comes a little earlier. So I need to get the door shutting well within full daylight, and the chickens safely locked in, to put the fox off enough.

At first I was going to use the timer relay to simply switch suitable high & low value resistors across the chicken door LDR's circuit position, after removing the LDR, and power both circuits from a common supply.

Problem I've run into is that the timer unit consumes a great deal of power when the coil is energised. So if the energised coil is used to hold the chicken door open for say 6 hours a day, it really isn't many days before the small 6v battery (made up of 4 1.5V AA cells, so it can fit inside the unit) runs flat.

When the timer is simply running in 'LED display off' mode, with the output relay un-energised, it consumes minimal current.

Since the timer module offers a trigger pulse mode as well as a continuous mode, I thought about simply desoldering & replacing the mechanical relay with a triggerable, bistable latch type. I then found I had trouble finding a suitable mechanical bistable relay - they all seem to work on 2 seperate set - reset coils, or polarity reversal on a single coil. Couldn't find any that would just cycle on-off-on-off eternally in response to a train of same polarity pulses fed to a single coil.

So I've come down to thinking, maybe I should be looking for a solid state latching relay or some kind of discrete component flip-flop, to read a brief trigger pulse twice a day either from the 5V TTL off the timer at the relay coil, or maybe even just the base drive off it's NPN 'relay enabler' transistor, such that it's latched output can then be read by the chicken door machine's comparator section. What would be the simplest easiest way to go about it?

Of course there remains the question of how are the chickens going to know when it's time to go in. At present they're pretty good at getting to know the light level when the door closes, and reliably put themselves to bed before it does; they've never been locked out in 2 years. I think I might need to arrange an alarm of some sort to get them in in the broad daylight (I've ordered a small triggerable one-shot mp3 player module, a small audio amp and a horn speaker and downloaded a rooster call sound - my rooster is likely to come and investigate & all the other chickens tend to follow him) so it would be good to come up with something to go between the timer & bistable latch interface, and the door, to provide both an instant, and a say 2 minute delayed, control signal. So it plays the rooster call, then shuts the door 2 minutes later. I'm vaguely thinking about using a resistor to charge a capacitor to drive a transistor to provide such a delay?

https://www.ebay.co.uk/itm/273949013140

If you've got this far thanks for reading.. all and any comments suggestions & ideas gratefully received.
 
Last edited:

DBingaman

Jun 27, 2021
103
Joined
Jun 27, 2021
Messages
103
Recommend using a Microcontroller for most of the project. One with a real time clock. You can also have a wireless UART to communicate with a PC in your house. Then you can adjust it to whatever requirements you might have as I have a feeling your timing requirements are going to need to be changeable in the future.
 

crutschow

May 7, 2021
839
Joined
May 7, 2021
Messages
839
Couldn't find any that would just cycle on-off-on-off eternally in response to a train of same polarity pulses fed to a single coil.
If you had that, how would you differentiate between opening and closing triggers?
 

flippineck

Sep 8, 2013
358
Joined
Sep 8, 2013
Messages
358
Good point.. it would depend upon the state at power on as to whether the timer ended up opening the door in the morning and shutting it at night, or the other way round..

I could include a momentary push button to manually feed a pulse to the bistable, so I could flip the state independently of the timer signal?

From a hobbyist point of view, doing it with a microcontroller of some sort would definitely be interesting and yes it would allow for all sorts of wifi remote PC control. I'm most familiar with the Arduino & have one rigged up on the desk here as it happens, all rigged up to the PC for playing with sketches etc, from an ill-fated project that ran into too many problems, but which was nonetheless a good learning curve. I'll probably have a play with that idea at some point, but for now I'd like to try and do it as simply as possible with a minimum of discrete analog components, or at most a few simple logic chips maybe.
 
Last edited:

crutschow

May 7, 2021
839
Joined
May 7, 2021
Messages
839
If you post a circuit diagram of what you have, we could likely be of more help.
 

DBingaman

Jun 27, 2021
103
Joined
Jun 27, 2021
Messages
103
Good point.. it would depend upon the state at power on as to whether the timer ended up opening the door in the morning and shutting it at night, or the other way round..

I could include a momentary push button to manually feed a pulse to the bistable, so I could flip the state independently of the timer signal?

From a hobbyist point of view, doing it with a microcontroller of some sort would definitely be interesting and yes it would allow for all sorts of wifi remote PC control. I'm most familiar with the Arduino & have one rigged up on the desk here as it happens, all rigged up to the PC for playing with sketches etc, from an ill-fated project that ran into too many problems, but which was nonetheless a good learning curve. I'll probably have a play with that idea at some point, but for now I'd like to try and do it as simply as possible with a minimum of discrete analog components, or at most a few simple logic chips maybe.
If you are interested in wireless control, I have found the following wireless UART very easy to use:
 

Attachments

  • HC12_WirelessModule.pdf
    528.4 KB · Views: 3

flippineck

Sep 8, 2013
358
Joined
Sep 8, 2013
Messages
358
Drawing.jpeg The J3Y transistor will switch states twice a day, let's say 'off' 9am & 'on' 5pm. So if the relay coil on the timer module is replaced with a suitably high fixed resistance, I should be able to get a suitable signal off the J3Y's collector to drive the mp3 player trigger when it falls to near 0V (maybe I would need a capacitor to keep the trigger momentary rather than continuous). The yet-to-be-dreamt-up triggerable delayed flip-flop would ideally wait say, 2 minutes after the mp3 played, before 'instructing' the chicken door's comparator to reverse the door state. It would then wait until the next change in state of the J3Y before once again reversing the door state, and so on. The mp3 doesn't need to play in the morning, on the rising edge of the control signal, only the door needs changing at that time & a redundant 2 minute delay there is unimportant.
 
Top