![]() | ![]() | ![]() |
| | |||||||
| 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? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| 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 | |
| |
| | (permalink) |
| 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." | |
| |
| | (permalink) |
| Thanks AKG - this works great. Richard | |
| |
| | (permalink) |
| You don't need the diodes. | |
| |
| | (permalink) |
| You should have a look at this thread. PWM by switching the GND pin on an IC is a very bad idea. | |
| |
| | (permalink) |
| oops
__________________ 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." | |
| |
| | (permalink) |
| 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. | |
| |
| | (permalink) |
| 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 | |
| |
| | (permalink) |
| 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. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
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 | ||
| |
| | (permalink) |
| 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... | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
Many thanks, Richard | ||
| |