Tuesday 28 May 2019

led - Constructing a simple emergency light kit


This is my first adventure in the electronics world and, as I'm a CS student, you can expect a lot of associations that maybe aren't that right.


The main feature of my circuit is:


If there isn't energy coming from the transformer (220v to 9v), turn on the leds (using a 6v battery), else, let the leds off.


Recently I met transistors and it seems to me that a pnp transistor would do the job. You can see a diagram that I'm going to use to explain what I thought (to make it simple, I'm not showing the transformer and the rectifier bridge):



enter image description here


So, if there isn't energy coming from the transformer part and, as I'm (trying to, actually) reducing the voltage from the battery in the base of the TIP127. The voltage in the base will be lower than the emitter, which will turn the leds on.


Doubt



  • Unfortunately, I discovered that the idea of using a resistor to reduce the voltage from the battery won't work. Do you have any suggestion to put me in the right direction?


This is my first circuit. I'm pretty sure that it have a lot of design problems. Any kind of suggestion or critic will be appreciated!



Answer



For your first circuit, you did pretty good. However, as it is, the left side of the circuit is not electrically connected to the right side of the circuit (using the transistor base as the dividing line). They need to share a ground connection, or they will not interact appropriately. The negative terminal of the battery should be connected to the common return of the transformer circuit (the 9V side).


Secondly, you are using a PNP BJT. This type of transistor is current controlled, meaning you typically need a resistor connecting the voltage source to the transistor base to control the current - a 1k resistor is appropriate here. Also, you are right in thinking that a LO voltage would saturate the PNP transistor to turn it on; however, you have it "pulled high" with the resistor R2. So if the main power goes out, the base will be pulled HI by R2 because I'm not sure as though the main power going off will do anything to the transistor. Lack of power does not usually equal zero volts; more commonly it equals high impedance. You should use R2 to pull the transistor base LO to the negative battery terminal - a 10k or even 100k resistor is more appropriate here. That way, when the main power is ON, the base will see the 9V (through a 1k resistor) and be OFF. When the power goes out, the "weak pull down resistor" R2 will pull the base LO, turning the transistor ON. More commonly, you would do as you did - use R2 to pull the base up to ensure it is turned off. To turn it on, you would connect it directly to 0V, but you aren't doing that.



Lastly, I know you purposely didn't show it, but if you are using a transformer and a bridge rectifier, this will convert the AC voltage to a pulse, not a DC voltage. It will also need a capacitor to smooth the pulse out. Otherwise, the voltage will still be returning to 0 with every cycle of the AC line, hence, the circuit would pulse on and off repeatedly (50 or 60Hz, depending on your main power frequency) - seen as the LED on, but dimmed. This is explained well in the other answer.


Be careful with that high of a power source - it can really do some damage to you! Otherwise, the best way for you to learn how these things work is to play around with the circuit. If something doesn't work quite right, turn off the power, move a resistor somewhere else or replace it with a different value, and turn it back on to see if it does what you want it to do. Have fun with it!


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...