Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 8th May 2006, 10:49 AM   (permalink)
Default LED PWM brightness control - transistor value and Piezo buzzer volum control

Hi,

I'm trying to build an LED brightness control and I'm basing it on the LED flasher at http://www.wrighthobbies.net/bots/lamp/index.htm.

I've looked at the schematic (http://www.wrighthobbies.net/bots/lamp/lampschem1.jpg), but there are no values given for transistor Q1 which is regulating the LED brightness by pulse width modulating the LED common ground of the Darlington transistor array.

I would be very grateful if someone could suggest a suitable value for Q1 and also which diodes D6-D10 I should use (are the diodes necessary). I'm using an Atmel AVR Mega16 which can source and sink 20mA. I can drive the ULN2003 from 5V or 12V.

I'm also trying to regulate the volume of a piezo buzzer - all I can think of at the moment is connecting the buzzer to the Mega16 via two different value resistors to control the PWM level, giving me two volume levels. Is there any more elegant way I can do this?

The piezo buzzer sounds fairly horrible - without going to a full blown sound synthesis IC, are there any other low cost methods I could use for generating a more pleasing beep?

Many thanks,
Richard
llrjt100 is offline  
Old 8th May 2006, 11:52 AM   (permalink)
Default

u can use general purpose diodes like 1N4148 for the diodes , and a transistor with some power handling capacity like BD139 for Q1-3
__________________
Gods own Country
Incredible !ndia

www.flickr.com/photos/_akg/

"Give a man a fish, and he will eat for a day. Teach that man to fish, and he will eat for a lifetime."
akg is offline  
Old 9th May 2006, 01:26 PM   (permalink)
Default

Thanks AKG - this works great.

Richard
llrjt100 is offline  
Old 9th May 2006, 04:28 PM   (permalink)
Default

You don't need the diodes.
__________________
Ron

Roff is offline  
Old 9th May 2006, 08:10 PM   (permalink)
Default

You should have a look at this thread. PWM by switching the GND pin on an IC is a very bad idea.
__________________
Ron

Roff is offline  
Old 10th May 2006, 06:42 AM   (permalink)
Default

oops missed that
__________________
Gods own Country
Incredible !ndia

www.flickr.com/photos/_akg/

"Give a man a fish, and he will eat for a day. Teach that man to fish, and he will eat for a lifetime."
akg is offline  
Old 10th May 2006, 10:04 AM   (permalink)
Default

I would be grateful for any suggestions about a better way - I need to vary the brightness of the the three LEDs together, using a single PWM output from the microcontroller.
llrjt100 is offline  
Old 10th May 2006, 10:24 AM   (permalink)
Default

If you switch to a Micrel MIC5821 or MIC5841 (Allegro A6821 or A6841) you can feed the <OE> pin with an inverted PWM signal...

Good luck... Have fun... Regards, Mike
Attached Images
File Type: jpg PWM LED.JPG (9.9 KB, 33 views)
Mike, K8LH is online now  
Old 10th May 2006, 12:39 PM   (permalink)
Default

PWM'ing the GND of the ULN2003A does seem to work nicely, without any ill effects - it does need diodes on the input lines though.

The Micrel or Allegro solution looks more elegant - I might give this a go as well.
llrjt100 is offline  
Old 10th May 2006, 12:57 PM   (permalink)
Default

Quote:
Originally Posted by llrjt100
PWM'ing the GND of the ULN2003A does seem to work nicely, without any ill effects - it does need diodes on the input lines though.

The Micrel or Allegro solution looks more elegant - I might give this a go as well.
Why not PWM the supply line instead?, a FAR nicer solution!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 10th May 2006, 01:45 PM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
Why not PWM the supply line instead?, a FAR nicer solution!.
I've given this a go with the 2N2222 which I was using to switch the GND before but placing it to switch the +5v supply to the LEDs instead.

I've got three normal LEDs and the LED backlight for an LCD dispay. When I was PWM'ing the GND, I had a good brightness match between the normal LEDs and the LED backlight, but now I PWM'ing the supply, the LED backlight is too dim. Is this because the 2N2222 can't pass enough current? If so, could you suggest a transistor choice that would do the job - the LEDs are 20mA each and the LED backlight 140mA giving a total of 200mA.

Thanks,
Richard
llrjt100 is offline  
Old 10th May 2006, 02:28 PM   (permalink)
Default

Probably best to use a reasonably rated MOSFET instead, to avoid a voltage drop to the chip. The IRF530 should do it, something smaller might be more suitable though, look for low "rds on" figures.
__________________
Angry!? I'm absolutely electrolytic!

Will have to make do with myspace now I guess...
Dr.EM is offline  
Old 10th May 2006, 02:35 PM   (permalink)
Default

Quote:
Originally Posted by Dr.EM
Probably best to use a reasonably rated MOSFET instead, to avoid a voltage drop to the chip. The IRF530 should do it, something smaller might be more suitable though, look for low "rds on" figures.
How about a BSP295 (maplin do these) with VDS = 50 V and ID = 1.8 A?
llrjt100 is offline  
Old 10th May 2006, 03:07 PM   (permalink)
Default

Quote:
Originally Posted by llrjt100
I've given this a go with the 2N2222 which I was using to switch the GND before but placing it to switch the +5v supply to the LEDs instead.

I've got three normal LEDs and the LED backlight for an LCD dispay. When I was PWM'ing the GND, I had a good brightness match between the normal LEDs and the LED backlight, but now I PWM'ing the supply, the LED backlight is too dim. Is this because the 2N2222 can't pass enough current? If so, could you suggest a transistor choice that would do the job - the LEDs are 20mA each and the LED backlight 140mA giving a total of 200mA.
A 2N2222 is NPN, you should use a PNP for the much lower voltage drop in common-emitter mode, check my tutorial Hardware Extras at http://www.winpicprog.co.uk/pic_tutorial_extras.htm, the 'source' examples.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 10th May 2006, 03:21 PM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
A 2N2222 is NPN, you should use a PNP for the much lower voltage drop in common-emitter mode, check my tutorial Hardware Extras at http://www.winpicprog.co.uk/pic_tutorial_extras.htm, the 'source' examples.
I've just had a read of your excellent tutorial and this has helped me understand what is going on - my background is software, not electronics (as you can see!), so well laid out tutorials like this help a great deal.

Many thanks,
Richard
llrjt100 is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 12:13 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker