Simple transistor question

Hi All,

I’m new to transistors - does the attached fritz look correct? (eg: digital pin 7 set high turns the led on)

Also, if I replace the led and resistor with the power leads to an LCD will it work just the same?

I look forward to comments!

J

Looks the wrong way round to me. Emitter to ground collector to load.

Grumpy_Mike:
Looks the wrong way round to me. Emitter to ground collector to load.

Thanks for the reply. Here is the schematic view of the same fritz.

J

edit: better placement of object names

Still backwards.
5V to resistor to LED to Collector, Emitter to ground.

If you want to keep it the way you have it, you need a PNP transistor instead.

Dear CrossRoads...

Ah! At last!

I'm rubbish at transistors, but think I finally have a chance to make progress.

When you said that using a PNP would fix things, did you mean that with a PNP in that circuit, making the Arduino output high would turn the LED on? If so... thank you... made me just that little bit less ignorant!

===
Re- posts so far about the circuit being "wrong"... I think... but please someone who KNOWS comment... that the circuits would "work". They would turn the LED on and off... BUT: the operation would be a little counter-intuitive. Setting the Arduino output high would turn the LED off, setting it low would turn the LED on?

===
Besides the issues of getting the connections right, you also have to "worry" about how much current would flow. With the right LED, the right resistor, and right transistor, all would be well. (For an LED, this is not likely to go wrong, as long as you don't get greedy for super-brightness. See....

... for information on choosing the resistor)

But if you replace the resistor with something else, something which lets more current flow, then you may have to be more careful. Especially if it is using the Arduino's 5v to power it.

===
And lastly, going back to the original post...

Yes, you might get away with turning an LCD on and off by the means you propose... but remember that if you do that, you will re-set the device each time. You might want to consider, if your LCD allows it, turning just the backlight on and off. This can sometimes be done with a command sent to the module, i.e. done "in software"... and if it can't, maybe buying one that has the feature is worth it!

$14
Backlight powered by separate pins. N.B. voltage for the backlight supposed to be between 4.2 and 4.6 volts... what do you think, experts? Voltage divider? Use a diode to shed a few deci-volts?
AND you can blank display with a command in software, if "hiding" something is your objective, rather than power saving. (Power demand, excluding backlight, if left powered: 1.5mA typ, 2.5 max
Oh... after all that... the bad news: "You will need ~11 general I/O pins to interface to this LCD screen". Sigh. Perhaps better to go with something like...

... 4 lines x 20 characters, backlight can be turned off with software command.

====
Forgive me, and PLEASE don't start discussing THIS, in this thread about LCD control, but along the way of collecting the above, I saw the following at Sparkfun's site, which I thought might amuse others...

"Todd hacked the "Siri" function of the iPhone 4S to turn his phone into a speech controlled universal remote. Not only does it change the channel, but it kinda insults you at the same time! Now that's innovation! How did he do it? Well, Todd created a box that is outfitted with an Arduino and a WiFly shield. It is set up with an IR LED facing the TV to act as the control. By using SiriProxy, you can change the channel by the network's name or by calling out the channel number."

(The "kinda insults you" bit is rude remarks "made by the controller" after you issue commands. Maiden aunts: Don't visit the page. Timid teachers: You have been warned. Children might hear things in the classroom that they say in the playground.)

j514:
Hi All,

I'm new to transistors - does the attached fritz look correct? (eg: digital pin 7 set high turns the led on)

Also, if I replace the led and resistor with the power leads to an LCD will it work just the same?

I look forward to comments!

J

Dumb question but on the Fritz it looks like you have a wire going straight to ground from the same leg of the transistor going to the resistor to the led.

If you want to keep it the way you have it, you need a PNP transistor instead.

Q1 is a 9014 NPN transistor, I should have mentioned that. Thanks for the help!

It looks like you are trying to use an emitter-follower circuit for power-switching - that's not normally done because its inefficient and the common-emitter circuit is used. With a PNP transistor the common-emitter circuit switches on the high-side which is probably what you need for controlling the LCD power? Its worth looking up "common emitter" and "emitter follower" to learn a bit more.

Yes, you might get away with turning an LCD on and off by the means you propose... but remember that if you do that, you will re-set the device each time. You might want to consider, if your LCD allows it, turning just the backlight on and off. This can sometimes be done with a command sent to the module, i.e. done "in software"... and if it can't, maybe buying one that has the feature is worth it!

I had the screen turning on and off via a relay, popping back on with a button keypress. I'm looking at transistor control now as there was a side-effect of the I2C lines getting messed up after the relay would flip the screen on. Relevant link:

Its worth looking up "common emitter" and "emitter follower" to learn a bit more

I definitely will, thanks for the tip.