A father / daugther project :-) simple door monitor

Hi Group

My dougther showes interst in my electronic hobby. She's 10 years old, and we setteled on creating a little monitor device for her, showing the open/close state of several doors and windows (we would like to end up with a total of 16 switches) in our home. I have tons of 0,2mm copper wire here from old transformers and we intend to use this for the wireing between the monitor appliance and the switches. I also do have plenty of LEDs and other stuff (including the hex inverter schmitt triggers mentioned later) and obviousely I would like to use what I have here already.

I figure that the partially long thin wires from the monitoring appliance to the switch and back will see a varying drop in the voltage, so I figured that driving the leds this way directly is a bad idea. I therefore thought to use hex inverter schmitt triggers to have a clean signal to drive the leds and also to be able to define individually per door/window wether open should light the led or vice versa.

I started to capture a little schema which you can see here:

formatting link

The idea should be to input the wire from a switch into a gate (hex inverter schmitt trigger) and by jumpering the output of a given gate apropriately either drive another gate (to invert the signal once more) or directly drive the led. The pulldown resistors at the input of the second gate are meant to avoid a floting input in case the "user" defines to use the inverted signal alas not using the second gate.

JP1 shall get the returning wires from the switches, JP2 is here to have enough connectors to power the wires to the switches.

I think this should work, but I don't have enough experience with stuff like this and thought I ask before I burn more time. Then, I also would like to know if this works so as I do not start to explain all this to her ending up with something not working....

TIA

Markus

Reply to
Markus Zingg
Loading thread data ...

For teaching purposes it wouldn't be such a bad idea to start with simple switches, a long thin wire, and a series resistor, and see what happens. If you have a volt/ohmmeter, you can even measure the resistance and/or voltage drop.

Reply to
Arlet

Not necessarily - LEDs are currnet operated - as long as your wire is good for 10-20 mA, then all you have to do is adjust the current-limiting series resistor to accomodate the series drop in the wire.

Looks pretty good - AWFULLY good for somebody who claims to be a beginner! ;-)

But one piece of advice - there should be pullups or pulldowns on inputs that might float: a floating CMOS input screws things up - indeterminate state, linear region, power consumption, oscillation, etc, etc, etc...

Cheers! Rich

Reply to
Rich Grise

If you hardwire the output of one inverter to the input of the second, you will have both high and low signals available for the LED. Then just use one jumper to select the desired state, inverted or non-inverted. That will reduce your parts count somewhat.

Also be sure every input to the 74HCT14 is terminated with some resistance to ground to avoid static and oscillation problems. 100K resistors should work.

-Bill

Reply to
Bill Bowden

Hi Bill

Silly me! Of course, that's a very good idea. I did not liked the two jumpers and your aproach not only saves me parts, it makes the whole thing less error prone also with regard to invalid jumper settings which are now actually not possible.

Will do. Thanks again.

Markus

Reply to
Markus Zingg

I think you are making it far more complex than it needs to be. The voltage drop in the wires to the doors/windows should be such a small percentage of the total drop due to the limiting resistor that it can be ignored. You'll have about 17 ohms in 100 feet of wire. For example, if you run 12 volts out to the door/window switches, and use 1K limiting resistors for the LEDs, you'll get about 10 mA. That translates to a voltage drop in 100 feet of wire of .017 volts. You may have more variation in the combination of the limiting resistance tolerance and the Vf variation in the LEDS, than variation caused by the different lengths of .2 mm wire.

Aside from that, if you do decide to go with the more complex circuit, I don't think the idea of making each LED independently switchable to indicate closed or open status is good. I think they should be consistent; that is, if led lit = open that should apply to all leds or if led off = open that should apply to all leds.

Ed

Reply to
ehsjr

Hi Ed

Thanks for pointing this out. Some wires are likely to be in the 300 feets (or even more) range. If I understand you right, this would tripple the voltage variation to about half a volt versus say nearly nothing with shorter wires with switches located more "nearby". I just intend to end up with an appliance where the connections can be easily interchanged later, alas where I don't have to adjust resistors to have a similar birghness of the LEDs.

You have a point here. However, the reason to have it this way comes from the fact that we most likely will have different switches for windows and/or doors based on their different construction. We will make simple switches ourselfes and it's handy being able to implement them as closers or openers so as they fit a given door/window construction best.

So, with the jumpers we actually have a tool in our hands to make the display consistant with the logical state of the doors/windows independant of the kind of switches used.

Markus

Reply to
Markus Zingg

Why not run the wiring and experiment with the various combinations of current control ?? For my money the simple resistor and LED's should be OK.

--
Cheers ............. Rheilly P
Reply to
Rheilly Phoull

Then just associate a particular resistor with each LED - the wire length isn't going to change, is it?

Or, if you want to get fancy-schmancy, you could use current drivers with voltage compliance all the way from almost Vcc to a volt or so above ground:

  • Vcc +Vcc | | | | [R1] [LED] | | | | | b / c +--------------| NPN | < e | | [1N4148] | K | | | [R2] 68R for ~10 mA [1N4148] | K | | | | GND GND

R1 is non-critical - just keep the diodes and e-b junction conducting through the dynamic range, which shouldn't be very far, for LEDs.

This way, the voltage compliance at the collector makes up for differences in the wire resistance.

You also might want to watch your power dissipation if you're running a high Vcc, but at 10 mA it shouldn't be too much of a problem. (the transistor dissipates the heat that the dropping resistor would, the difference is that the transistor is constant-current regardless of Vcc, up to a point. :-) )

Have fun! Rich

Reply to
Rich Grise

Or, you could substitute a single red LED in place of the 2 diodes and eliminate one more part.

-Bill

Reply to
Bill Bowden

Aha - your last paragraph explains. Nice idea. As to the length of the wire - yes, running 300 feet with a 10 mA LED current would give you about a 1/2 volt drop. That may, or may not, cause discernable difference. It will certainly be minor. With 300 feet of wire at 17 ohms per 100 feet, with a 1K limiting resistor, you'll have 1051 ohms resistance. At 12 volts, that will translate to ~.0097 mA through the LED, figuring 1.8 Vf. If the wires were very short, the resistance would be negligible, so you'd have 1000 ohms resistance. That translates to .0102 mA - a difference of .0005 mA.

Getting back to the homemade switches: you can make either kind of switch, and mix normally open and normally closed, and still make lit = open (or lit = closed) with either a normally closed or normally open switch and your jumper idea, without the need for the inverter. You just change where the LED plugs in to the header. Drawn below is lit = open

+12 -------[1K]---+---[LED]---+---Gnd | | | / | +---o o----+ Normally Open

When door opens, switch opens, removing short across LED

+12 -------[1K]---+ +---[LED]---Gnd | | | | +---o--o----+ Normally Closed

When door opens, switch closes, completing circuit to LED.

You can also do it vice-versa where lit = closed - just use the same diagram and swap the switches.

Ed

Reply to
ehsjr

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.