Author Topic: Adding basic switching/transistors to a simple LED circuit  (Read 4818 times)

0 Members and 1 Guest are viewing this topic.

Offline barfdoggTopic starter

  • Contributor
  • Posts: 20
  • Country: us
Adding basic switching/transistors to a simple LED circuit
« on: March 18, 2016, 07:43:40 pm »
Hi guys,

To preface:

I built a CNC router a few years ago and among several projects I’ve made some cool Plexiglas plaques and such. An example of something I have made is posted below. I created a base that accepts AAs, has a switch, and the appropriate resistors to power the LEDs. This is relevant because I plan to create a similar project, but have run into a snag (My lack of knowledge).

As for my electronics experience, I have dabbled in repair and modification in the past. (N64 RGB mod, replacing failed caps, etc.) However, I have no experience in "creating" something, or utilizing transistors and such, so I apologize in advance for my mediocre description skills.


My project idea comes from something I use at work. there are six of us in my office, and we have some equipment that we need to keep an eye on, so for us to track who has it, there is a laminated piece of paper that says “IN USE” on one side, and “NOT IN USE” on the other side. Below it is a white board. When you use the equipment, you flip the paper over and write your name on the board. This is just a simple way to let us all know the status. No big deal, but also not that fun.

I thought it would be fun to improve our process with a "modern" solution.

I plan on creating an etched Plexiglas sign that is edge lit by LEDs similar to the picture I posted below of an earlier project.

I will create a Plexiglas sign with LEDs as follows:


IN USE
NOT IN USE

NAME 1
NAME 2
NAME 3
NAME 4
NAME 5
NAME 6

I initially figured I would supply 6V DC power via a simple external power supply, add the appropriate resistors in line to each of the LEDs that would illuminate the etched names, with switches to turn on each one. nothing complex there at all, but as I thought about it I felt that manually switching on the “IN USE” and “NOT IN USE” lights independently of the names would be redundant. I would like it to behave in the following way:  When no “name” is powered, the "NOT IN USE" light should be illuminated. When one or more name lights are active, the "NOT IN USE" light should be off and the “IN USE” light should be illuminated, so it seems I need to create some sort of logic gate.

My initial drawings start out with +6V input going to six switches. from each switch I add the appropriate resistor before the LED. I was looking at using a transistor as a switch for the "IN USE" light by tapping  the + after the switches. Obviously doing so before the LED would just end up powering all of the LEDs as soon as I turn one on, so I was thinking of putting it behind the LEDs as I understand they pass voltage forward. Will this work the way I think it will? can I switch on the separate "IN USE" circuit by tying in a transistor after all the LEDs? Also, I have been reading about modes of operation. Do I assume correctly that I can do a variation of this to have the "NOT IN USE" circuit in a normally on state, but switched off when current is applied through the switches? I feel like I'm close, but I want someone that know what they are doing to tell me if I'm looking at this the right way or not. Anyone that can point me in the appropriate direction would be appreciated, as while likely a basic task in the world of electronics, it is a step forward in complexity for me, so I'm a bit unsure.

Here is a basic draft of what "I think" might be close to what I am going for. I'm sure I'm not formatting it right, but would such a creation work the way I think it would?




« Last Edit: March 18, 2016, 10:42:20 pm by barfdogg »
 

Offline michaeliv

  • Frequent Contributor
  • **
  • Posts: 260
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #1 on: March 18, 2016, 11:45:23 pm »
I don't think your circuit will work.
The attached circuit is as simple as I could get it.
The MOSFET's aren't really that important, any low power, low gate voltage MOSFET's should work.
 

Offline michaeliv

  • Frequent Contributor
  • **
  • Posts: 260
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #2 on: March 19, 2016, 12:08:16 am »
Here's a more robust one with no MOSFETs but diodes instead of resistors.
When one or more switches are activated, the 2nd from the right LED is ON.
When all the switches are OFF the rightmost LED is ON.
« Last Edit: March 19, 2016, 12:41:28 am by michaeliv »
 

Offline barfdoggTopic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #3 on: March 19, 2016, 01:07:27 am »
Here's a more robust one with no MOSFETs but diodes instead of resistors.
When one or more switches are activated, the 2nd from the right LED is ON.
When all the switches are OFF the rightmost LED is ON.

Yeah, I can see I was way off as I suspected.

What you posted is absolutely fantastic and quite helpful.

I hope to find the components I need tomorrow, and will report back with my attempts.

Thank you very much for your help.
 

Offline michaeliv

  • Frequent Contributor
  • **
  • Posts: 260
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #4 on: March 19, 2016, 01:33:15 am »
You're welcome.
BTW you can pretty much use any diodes and transistors for the 2nd schematic.
Also you should probably test what serial resistors you need for the LEDs that you want to use, I put in 220R, but it will depend on the LED.
 

Offline barfdoggTopic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #5 on: March 19, 2016, 01:53:04 am »
You're welcome.
BTW you can pretty much use any diodes and transistors for the 2nd schematic.
Also you should probably test what serial resistors you need for the LEDs that you want to use, I put in 220R, but it will depend on the LED.


Gotcha.

Like you say, based on the LEDs I have I'll be going with different resistors compared to the placeholders you set, but I don't know how/if those changes will affect ideal impedance for R2 and R4.

Could you tell me what the purpose of R2 and R4 is, and how one would calculate those values? I'm trying to grasp how it works as a whole.

Thanks again!
« Last Edit: March 19, 2016, 02:07:42 am by barfdogg »
 

Offline michaeliv

  • Frequent Contributor
  • **
  • Posts: 260
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #6 on: March 19, 2016, 02:20:12 am »
This page is about what R2 & R4 does :
http://www.petervis.com/GCSE_Design_and_Technology_Electronic_Products/transistor_base_resistor_calculator/transistor_base_resistor_calculator.html

It's not necessary to change the base resistors if you're going to change the 220R resistors. They do depend on the 220R, but not by much. They depend more on the transistor that you'll be using.
I just placed values that 'should' work, I didn't do the math. Try out the provided values, they should work.
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4539
  • Country: gb
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #7 on: March 19, 2016, 02:25:30 am »
Here's a more robust one with no MOSFETs but diodes instead of resistors.
When one or more switches are activated, the 2nd from the right LED is ON.
When all the switches are OFF the rightmost LED is ON.

Nice circuit, but...
You MAY have forgotten a diode on the left hand side (low down), and something on the right hand side, to make the rightmost transistor, an inverter ?
I.e. a "NOT in use", rather than another "in use", as shown.
It is "sort of " configured as an inverter, but is missing pull up and isolation features.

EDIT:
It will sort of work, but would tend to dimly light D3 (even when D3 should be off), as shown.
« Last Edit: March 19, 2016, 02:36:53 am by MK14 »
 

Offline michaeliv

  • Frequent Contributor
  • **
  • Posts: 260
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #8 on: March 19, 2016, 02:50:31 am »
Nice circuit, but...
You MAY have forgotten a diode on the left hand side (low down), and something on the right hand side, to make the rightmost transistor, an inverter ?
I.e. a "NOT in use", rather than another "in use", as shown.
It is "sort of " configured as an inverter, but is missing pull up and isolation features.

EDIT:
It will sort of work, but would tend to dimly light D3 (even when D3 should be off), as shown.
Yes you're right, the diode for the bottom LED on the left is missing(fixed). And D3 will be dimly lit :( .. I didn't think it would turn on with 10k in series.
All should be OK now.
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4539
  • Country: gb
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #9 on: March 19, 2016, 02:59:03 am »
Nice circuit, but...
You MAY have forgotten a diode on the left hand side (low down), and something on the right hand side, to make the rightmost transistor, an inverter ?
I.e. a "NOT in use", rather than another "in use", as shown.
It is "sort of " configured as an inverter, but is missing pull up and isolation features.

EDIT:
It will sort of work, but would tend to dimly light D3 (even when D3 should be off), as shown.
Yes you're right, the diode for the bottom LED on the left is missing(fixed). And D3 will be dimly lit :( .. I didn't think it would turn on with 10k in series.
All should be OK now.

It looks good now!

I think your original circuit would have worked, just great, with the older generation (original) LEDs, which would have tended to NOT light up with a 10K. Or only VERY dimly.

But the modern ones, are MUCH more sensitive these days. (If I remember correctly, I can get them to light, just with the resistance of my hand/fingers(around 100K) + 9V battery).
 

Offline barfdoggTopic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #10 on: March 19, 2016, 03:30:16 am »
This page is about what R2 & R4 does :
http://www.petervis.com/GCSE_Design_and_Technology_Electronic_Products/transistor_base_resistor_calculator/transistor_base_resistor_calculator.html

It's not necessary to change the base resistors if you're going to change the 220R resistors. They do depend on the 220R, but not by much. They depend more on the transistor that you'll be using.
I just placed values that 'should' work, I didn't do the math. Try out the provided values, they should work.

Thanks!

I have a good collection of resisters and LEDs, so I can mess with them once I get it set up. Just need to pick up some diodes and transistors.

 

Offline barfdoggTopic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #11 on: March 20, 2016, 07:18:08 pm »
OK, well I have certainly learned a few things, but I can't say I've found success.

I feel like I have two problems and I'm not sure how to address them. after a couple hours of messing with it I'm at a loss.

Once voltage is applied to the gate, I will find that the "IN USE" LED will get power. This is great, but once power is removed from the gate (Q3) by switching off the LED circuit that triggered it (D2), the gate seems to stay in the same state which continues to power the "IN USE" LED (D3). I have done some reading today and see mention of " transistor speed" and the use of diodes to drain the transistor. I don't know if I am using the wrong parts, or if it is something else.

My next problem, is it seems that once I cut the power to the switch, being that the "IN USE" LED stays on, there still is about half the voltage getting pushed back into the switched LED. I have checked the orientation of the diodes and they are fine.

For components, the resistors are the same as in the last drawing with the exception of the LED resistors which are 150 ohms. I bought NTE5656 transistors and NTE5066 diodes. Did I buy the wrong parts or what?
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4539
  • Country: gb
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #12 on: March 20, 2016, 07:39:37 pm »
I bought NTE5656 transistors and NTE5066 diodes. Did I buy the wrong parts or what?

The NTE5656's are NOT transistors (apparently), sorry!
They seem to be triacs.

It is VERY easy to buy the wrong parts, don't worry!

You need to get some transistors.

EDIT:
Also the NTE5066 diodes, are actually ZENER diodes, which are something else. (Similar though).
You really needed standard signal diodes, such as 1N4148's or something.
Such as the 2N2222's in the original circuit, if they are still readily available to you.
« Last Edit: March 20, 2016, 07:44:13 pm by MK14 »
 

Offline barfdoggTopic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #13 on: March 20, 2016, 07:43:43 pm »
I bought NTE5656 transistors and NTE5066 diodes. Did I buy the wrong parts or what?

The NTE5656's are NOT transistors (apparently), sorry!
They seem to be triacs.

It is VERY easy to buy the wrong parts, don't worry!

You need to get some transistors.

Such as the 2N2222's in the original circuit, if they are still readily available to you.

Man, that's what I get for hurrying. I looked for 2N2222's when I was at Fry's but had no luck. I'll just order them online.

Thanks!
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4539
  • Country: gb
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #14 on: March 20, 2016, 07:46:26 pm »
I bought NTE5656 transistors and NTE5066 diodes. Did I buy the wrong parts or what?

The NTE5656's are NOT transistors (apparently), sorry!
They seem to be triacs.

It is VERY easy to buy the wrong parts, don't worry!

You need to get some transistors.

Such as the 2N2222's in the original circuit, if they are still readily available to you.

Man, that's what I get for hurrying. I looked for 2N2222's when I was at Fry's but had no luck. I'll just order them online.

Thanks!

Also I edited my post. You need to get diodes as well.
The ones you bought are a special type of diode, called zeners. These are somewhat different, and NOT what you want, for this application. (They limit the voltage to 3.3V).
 

Offline barfdoggTopic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: Adding basic switching/transistors to a simple LED circuit
« Reply #15 on: March 20, 2016, 07:57:34 pm »
I bought NTE5656 transistors and NTE5066 diodes. Did I buy the wrong parts or what?

The NTE5656's are NOT transistors (apparently), sorry!
They seem to be triacs.

It is VERY easy to buy the wrong parts, don't worry!

You need to get some transistors.

EDIT:
Also the NTE5066 diodes, are actually ZENER diodes, which are something else. (Similar though).
You really needed standard signal diodes, such as 1N4148's or something.
Such as the 2N2222's in the original circuit, if they are still readily available to you.

Haha. Today I learned that going on looks alone when identifying semiconductors is a bad idea.

I have purchased the correct items online.

Thanks!



 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf