Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

frequency divider 2:1 reed contact & electro magnet

Status
Not open for further replies.
With the coil outside the alloy box, I still need to protect it from the wheater elements any tips fot that?
You could pot it in resin (e.g. car body filler), or wrap it in self-amalgamating tape.
About the circuit, does it matter how long the income pulse take?
No. You get a ~20mS pulse in the coil as soon as the reed makes first contact (contact bounces in the interval up to ~10mS from first contact shouldn't affect the 2:1 divider).
Coil energisation is for 20mS, even if the reed stays closed (parked).
 
Well, I tried a new battery and also disconnect the coil, but no changes. Could it be the debounce is not working correctly?
I use a NXP HEF4013 cmos chip.
contact bounces in the interval up to ~10mS from first contact shouldn't affect the 2:1 divider
I calculated that I get about 1 to 6 pulses/sec from the magnet to the reed. Maybe 10mS bouncetime after the first contact is too short then?
If try to simulate the movement by swipping a magnet by hand, I see the led going on sometimes very shortly and dimmed, not like the others pulses. Sort of a false one coming through.
I start calculating with the RC value of R2C2 only to find out that I'm using a 330 Ohm instead of 330K Ohm resistor :mad:
So after changing the resistor it seems like I getting better results, time for some more testing...
 
R2 = 330 Ohms would explain the problem :)
 
So after some more testing I can say that the 2:1 divider working fine! After 3 weeks I started with this plan I finally got it working. Thanks for all the tips and advice here, especially to alec_t who was always there with real solutions, respect.

I have the coil and the new reed soldered to the side of an about 4x6cm PCB, the battery is taped to PCB with some rubber in between, and the complete unit is attached to the frame with velcro.

Now my next step is to provide a wheather protection for it. I thought of do some potting in a mold or so. I like to give the housing a suitable form to able to fix it stable to the not complete flat frame. Maybe I can 'stamp' the frame with clay to have an exact copy of the mounting location. Then I can use the 'negative' of this clay mould as a casting for the PCB and battery.
But there are some points to take care of; the 9V battery needs to replaceable, the new reed contact should 'in reach' of the magnet and the coil may not be covered to much to still be able to trigger the old reed.

Any ideas what materials to use for the molding and potting: resin, polyester,... ?
 
Glad to hear it's now working as designed :D.
Any ideas what materials to use for the molding and potting: resin, polyester,... ?
As I said, car body filler? It's electrically insulating, relatively cheap and easily obtainable. You could actually mould it against the frame.....just coat the frame lightly with WD40, or something similar, to act as a mould release.
 
Yes thart sounds like a good idea, cheap and mouldable. But will it be possible to get it complete waterclose? I don't need to submerge it, but it can be outside in the rain and wind so even with a small opening water can get in. And once inside it stays there and corrosion can begin. Maybe I can try to add an extra seal with varnisch or paint once the filler is dry.
But then I still need to find a way for connecting/integrating the coil, reed switch and 9V battery.
Maybe I can using such a reed https://www.conrad.com/%26quot%3bSnap-fit%26quot%3b-miniature-reed-sensor-MS-320-3-PIC-MS-320-3-1-closure-Max-0.7-A-Max-180-V%2fDC-Max-10-W.htm?websale7=conrad-int&pi=503525&Ctx={ver/7/ver}{st/3ec/st}{cmd/0/cmd}{m/websale/m}{s/conrad-int/s}{l/int/l}{sf/<s1>503525-89 </s1>/sf}{p1/081cf76f59d1beb390c986a7a6babf89/p1}{md5/5aced3962ada4383097512f399247bc8/md5} where I can use the handle to fix it in the filler, and leave the body outside.
Also the coil I'm thinking of fixing on a similar manner to the filler.
The battery that's something else, I use a premade connector with to solder leads, but I don't see a way to make that waterproof. maybe I just stick it to the outside of the filler with some velcro or in a holder? Making some kind of slot in filler to slide the battery in looks too advanced to me. And even then I need some kind of cover/door to close this...
 
I envisaged the set-up as :-
a waterproof alloy box housing the electronics and battery,
the new reed being a plastic-encapsulated type with a wire going to the box,
the coil potted in resin and with a wire going to the box.
 
It must be the heat nowadays, but I don't see how you get to this for lifetime of 9V battery with 30mA load, on 5Hz 20ms pulses:
500mAh / (30mA x 20ms / 400ms) = 330 hours.
where is this 400ms coming from?
Also while calculating power consumption of the circuit, I need to look at the LED which also takes 20mA at the same Hz as the coil. What about the other parts like the CD4013, RC, Q,... ?
I use a 9V lithium 1200mA, maybe I can (filler)seal the battery and circuit together? The battery is then not replaceable but full waterproof and if it keeps working for 2 years at 1h/day... the rest of the parts are cheaper than the battery.
 
Last edited:
where is this 400ms coming from?
If the new reed is pulsed at 5Hz (= 200mS intervals) then the 2:1 divider gives output pulses at 400mS intervals to the coil.
I need to look at the LED which also takes 20mA at the same Hz as the coil.
Taking that into account too the battery life will be 30/(30+20) what it would be without the LED, i.e. 0.6 x 330 = 198 hrs.
What about the other parts like the CD4013, RC, Q,... ?
Current consumption is negligible (micro-amps), so the circuit is effectively 'off' except during a 20mS pulse.
 
I like to go a little deeper in the functionality the circuit itself.
There are 2 RC circuits in the diagram:
1. in the debounce
2. in the +/-20ms pulse to the coil

I don't understand why R3C3 uses an Elco and R2C2 (debounce) uses a standard cap?
With R2C2 there is connection to pin4 in between the R & C where the voltage raises when the cap is loaded. But for R3C3 there is no middle connection between the R & C. How do you calculate then the RC value in combination with the transistor?
I tried t=RxC, t=2200ohm x 0.0000022F=0.00484 sec or 4.84ms for the elco to reach 63% of it's charge. but what does that mean/do here in the circuit?
 
Last edited:
Sorry for the late reply.
I don't understand why R3C3 uses an Elco and R2C2 (debounce) uses a standard cap?
Standard non-elco is the ideal for all time delays to ensure stable delays, because elcos are very wide tolerance and tend to change capacitance or go leaky as they age or are subject to varying temperature. However, non-elcos of high capacitance value (i.e. > ~1μF) are bulky and expensive. As with most things in life there are compromises to be made, so it's common to use non-elcos for small time constants and elcos for large time constants.
With R2C2 there is connection to pin4 in between the R & C where the voltage raises when the cap is loaded.
When C2 has charged up sufficiently its voltage reaches the CLR input threshold and the latch U1a resets.
But for R3C3 there is no middle connection between the R & C. How do you calculate then the RC value in combination with the transistor?
The time constant of R3C3 is, as you calculated, 4.84mS. But the time for C3 to charge to the point where the base current in Q1 drops to ~ zero (i.e. voltage across C3 = 3-0.7 = 2.3) is around four times that (as verified by simulation, not my calculation).
 
I like to expirement a bit with the R3C3 value to see what time the coil really needs to trigger the exisiting reed switch, in order to optimize battery life.
I thought you used LTSpice to calculate the R3C3 value, right? Does this also counts for my BC547 I used?
Can I multiple also other RC values by four to get the right timing?
So if I use 3k3 instead of 2k2 will I get: 3300x0.0000022 => 7.26x 4 ~29ms trigger time? I suppose it doesn't matter if I change the R or the C value to get other timings?
 
Does this also counts for my BC547 I used?
The circuit simulates ok in LTSpice with a BC547 model.
Can I multiple also other RC values by four to get the right timing?
Yes, within reason. R3 can't be too large or there won't be enough base current to turn Q1 on fully. On the other hand, if R3 is too small then current will be wasted.
I suppose it doesn't matter if I change the R or the C value to get other timings?
See above.
 
Hi alec_t, I'm also working on exactly the same challenge and found this (old) discussion. Do you by any means still have the schematics as I'm not able to open the link.
The flip flop works but I have to shorten the pulse to prevent the battery from draining to fast.

Best regards
 
Status
Not open for further replies.

Latest threads

Back
Top