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.

New guy looking for help building a circuit.

Status
Not open for further replies.

Bearly Legal

New Member
Hey guys, I'm pretty good with electronics but this is the first time im attempting to build a circuit and the whole resistor,capacitor,ohms, etc, etc, just throws me for a loop. So maybe i could explain what im trying to do and someone could do a quick sketch that i could understand. not like a actual technical schematic cause ive looked at a few of those and find them difficult to understand.:confused:

Im trying to make a circuit board to be mounted under a switch panel that will be used to power accessories. its going to be 12vdc powered and wish to use tact switches and bi color leds to show the status of the switches.

Going to be 5 switches to run 5 different accessories like fans and a water pump. i would like the green side of the led to light up when i start the system and the red side to light when the accessory is running.

I bought a few parts from radio shack. a board, SPST tact switches and 2 lead bi color leds. please let me know what you guys think, if anyone can help, or you need more info. Thanks in advance.
 
Sounds pretty interesting!

Is there anything you really can do?


Boncuk
 
well i want the switch to be a push on/push off. they just have to be small enough to fit on the board and behind the switch covers
 
Last edited:
well i want the switch to be a push on/push off. they just have to be small enough to fit on the board and behind the switch covers

I take it that means they need to be pretty small, Problem is I have never seen a mechanically latching pushbutton that I would consider small. So it sounds like you would need a logic circuit to electronically latch the outputs.
 
i have a pcb board that has what appears like pressure sensitive switches but not sure if they are momentary or latching

Most likely they are momentary, You can test them if you have an ohmeter.
 
do you think what im asking can be accomplished? personally im better with switches and relays and running wires then making a circuit, so if i have to i'll go that route. but kind of wanted to try something a little out of the box of my comfort zone. just need some guidance. let me know if you have an idea or point me in the right direction. thanks for the help so far too
 
Tact switches are generally small, non-latching, and can switch only small currents at low voltages. What accessories will you be actuating?
 
2 15" electric fans, 2 8" electric fans, and a water pump for now and ill have 2 extras switches for extra goodies if i add them later.
 
OK, help, but not design. Start by reading this article: **broken link removed**

and this one: https://www.electro-tech-online.com/custompdfs/2012/07/Lab6.pdf

What you basically find is that switches are subject to " contact bounce" and logic circuits are fast, so that one push turns into a random number of pushes.

Take an IC such as this one: **broken link removed**, combine it with a ULN2003 **broken link removed**, a few relays and a 5V power supply and your there, ALMOST.

I looked at the datasheet again, and the device only outputs pulses, so it becomes messy again.
A flip flop which usually comes in dual varieties would be required to "LATCH" the state. Getting the FF to always power up in the same state requires a power on reset circuit. See: **broken link removed**

A CD4027 is a DUAL J-K Flip-flop See: http://en.wikipedia.org/wiki/Flip-flop_(electronics)
and http://www.ti.com/product/cd4027b
There are plenty of DC-DC converter kits that will get you to 5V. Your relay coils can run off the 12 V supply. The CD4069 will probably work.

OK, I forgot the colors, but that's easy too. You need inverted outputs as well, so use an inverter. You'll also need a bi-color LED where the anode is common and connected to a resistor, your +12 will do.
An inverted ULN2003 will connect to the amber side and the non-inverted to the red side of the LED.
This would be for GREEN/RED.

Oops, red/amber LED's might be tough to find. Red/green yes. That makes the logic a little wierder because RED stays on all of the time and GREEN needs to be inverted.

So, we need to find an inverter that works. They come in HEX packages. They are ESD sensitive and unused inputs MUST be connected to something.

I went back and re-read your stuff. You do want GREEN/RED although you can pick any combination of colors of RED, GREEN or AMBER. AMBER is red and green together. AMBER (ready) and GREEN (OK or on) might be my choices.

So, it's a messy solution and some resistors. I did leave out some details. This is why this ususlly turns out to be a microcontroller implementation.

This was more of a thinking out loud kind of exercise. When I did something similar in the 80's for a car radio interface circuit, it was a pain.

Debouncing can be done in hardware or software. Both are difficult, because I have done both.
Driving the LED and the Relay is easy and providing the spike suppression for the coil is easy. The diode can be placed at the relay itself. Without it, you will see all sorts of strange behavior when the relay changes state.

Amber, Green and red is pretty easy with a bi-color LED. They are available in common anode and common cathode versions. Both RED and GREEN on make amber. The LEDS need a series resistor which is usually R< (V-1.2-x)/20e-3 so for the ULN2003 you would need R < (12-1.2-0.6)/20e-3. This assumes Vf=1.2, could be higher and the driver dropping 0.6V also.
The ULN2003 chip doesn't require +power, Th COM pin connects all the supression diodes to V+. That's not needed when driving an LED. The ULN2003 driver will be OFF with the input floating or not connected.

Starting from the other end which is a switch, you have to debounce it. Odd things can happen if say, you hold for an hour and let go, so finding a hardware debouncer that always powers up in the same state is a good thing. Power on reset circuits have traditionally been a problem. They make circuits just for that now, primarily for micro controllers.

Everything is turning to be surface mount these days and guess what that one is SMT only. There are adapters available.

Now the trick is finding some way to remember the state. Again, a nice use for battery backed up RAM or FRAM when you want to preserve the state after a power failure.

A 1 bit memory element is basically the Flip Flop. The J-K and the D flip flops are common. The J-K is extremely useful because when J&K are tied together and there is a clock pulse, the output Q and the complemetary output NOT Q toggles. So, this property would remove the requirement for an inverter. FF's like nice clean signal edges. If they aren't fast and clean, they don't work.

They also have level sensitive Set and Reset inputs which is useful so you can create a definite state on power up. Likely tricky.

The debouncer has 6 elements, the inverters 6 (may or may not be needed) and the Flip flops have 2 each. Then there is power on reset etc. and a power supply.

Inputs if not used on these chips have to be connected to + or gnd.

Logic voltages are getting lower and lower. 0.8V is now possible. There may be references to TTL comparable or 5 Volt tolerant A 3.3 V logic device may be able to accept a 5V logic device with the addition of a series resistor. You won't run into that here.

The one SMT part will cause you grief, but once you get one to work, it's easy to build 6. Just not sure your up to it.

This https://www.electro-tech-online.com/custompdfs/2012/07/MAX6846-MAX6849.pdf might help for a power on reset design.
 
Last edited:
You can do the toggle with two inverters. If the idea is to have the red led on when the output is active, and the green led on when the output is inactive, the attached circuit should work; just duplicate it for each switch.

Sorry for the bad quality image.
 
thank you both for your input. but regretably, because this isnt my area of expertise, that might as well have been spoken in chinese. lol. I understood some of it, but not much. and thank you for the diagram. a little easier for me to understand but the technical schematic is hard for me to undestand because I dont know what the symbols for each part mean.
 
If you really want to go outside of the box use a micro controller.
that way you have a lot of options. like if you are running a water pump have a float switch to shut down the pump if the water level is too low.
there is no limit to what yo can do with a MC and sensors.
 
Ive been looking around on the interwebs. What do you guys think of using a latching relay? Ive found a few schematics showing how to use a latching relay with a momentary switch. But then i add in the led and i get lost. I only want the green lit when the headlights are on and red whenever the accessory is on. Ive looked at the micro controller but correct me if im wrong, but dont you have to write a code for them? Thats way out of my league.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top