Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 9th March 2008, 09:28 AM   (permalink)
Default RGB Controller

Hi Everyone,

I've designed a PWM controller using a PIC18F series uC. The problem is however, I have had no luck in writing the program as I've never written a PIC program before and it never does what I want it to, not on the simulations anyway. So... I would love it if someone would be able to do it for me (Or give me exceptional directions so a complete PIC noob like myself would be able to do it)

I've attached the schematic, so you can see which ports are being used for what. I apologise for the rather crude quality.

What I was after is... All three PWM running at the same time, as i'm pretty sure the PIC is able to do that, according to the data sheet.
The '*' button on the keypad would be used to cycle through the 3 pwms, the numbers used to enter a value from 0-255 and then the '#' button would be used as an 'enter' key. Once the '#' is pressed, all three values displayed on the LCD. For example, R:xxx, G:yyy, B:zzz.

This is a personal project, and won't be used for commercial or educational purposes - I am willing to give full credit to the programmer for the coding.

If you think there are any hardware issues, any feedback is appreciated. The LEDs are common cathode RGBs. They are arranged in a 7*7 matrix - i.e. a row of 7 in series * 7 of these in parallel. I thought this was the most efficient way, but any feedback on this is also appreciated.

I thank you all for all your assistance.
Attached Images
File Type: gif Schematic Prints0001.gif (94.4 KB, 27 views)
__________________
What is a joule per second?
erosennin is offline  
Reply With Quote
Old 9th March 2008, 01:03 PM   (permalink)
Default

Questions about your LED drive.
U1, when on will dump a large amount of current into Q4 base. Why D12 it will never see more than 0.6 volts.
Why use an opto-isolator?
Q4+Q1 are a little slow. I assume you PWM is running slow. 100hz?

Suggestion: Switch the cold side of the LEDs not the hot side. Use a logic level FET, 100k resistor gate to ground, gate to PIC.

Suggestion: You use a 5 watt resistor for current limit. Use 7 small resistors. The current will divide up better between the 7 strings of LEDs.

Suggestion: You could use 7 (1watt LEDs).

Why R1,R8?
Need capacitor on +12 volts.
MCLR needs connection dot on schematic.
ronsimpson is offline  
Reply With Quote
Old 9th March 2008, 02:59 PM   (permalink)
Default

As ron pointed out plus
move your keypad to PORTB and use its built in pullups, adding diodes to the matrix would also help.
The reset button resistors are backwards and the cap is unnessary, take a look at the reset on either my Firefly or Junebug tutors for suggestions.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Reply With Quote
Old 9th March 2008, 06:19 PM   (permalink)
Default

Another question about the opto, Are you using 32V, if so I don't know if having a 15V zener without a current limiting resistor is a good idea.
Super_voip is offline  
Reply With Quote
Old 10th March 2008, 06:52 AM   (permalink)
Default

RE Ron:
D12 is there to drop voltage, no other purpose - albeit 0.6V
I'm using an opto isolator as the PIC output is only 5V and it wont switch the FET or Transistor. I'm having trouble find PNP logic level FETs.
I can't switch the cold side because it's a common cathode led, There are 3Leds in the one package with one 'ground'. Thus if I switch the cold side I can't have my dimming.
I was hoping to run it around 4kHz... this might be audible on cheap Transistors/FETs though so I'll make sure to get good ones...
R1 and R8 are there to extend the Time Constant of the caps to get better smoothing...

RE Blueroom:
I didn't want to use PORTB because that's the inbuilt PWM port...
Thanks for the reset, I'll deal with that during construction.

RE Supervoip:
Yes I'm using 32V on the opto, and I will add current limiting resistor to the 15V Zener. Assuming I can't find decent Logic Level P-Channel FETs. Then the output stage will obviously change. As Ron suggested.

Thank you everyone.
__________________
What is a joule per second?
erosennin is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Xbox 360 Tilt Controller adamthole Electronic Projects Design/Ideas/Reviews 0 20th January 2007 05:24 PM
closed loop controller that receives set point updates TXRX usacanbiteme Electronic Projects Design/Ideas/Reviews 5 28th September 2005 09:02 PM
Help With Temperature Controller bryan Electronic Projects Design/Ideas/Reviews 4 30th June 2003 12:18 PM
Monitoring PIns of controller at the same time waqar Micro Controllers 9 12th May 2003 10:12 AM
PBX question waqar Electronic Projects Design/Ideas/Reviews 0 30th March 2003 06:21 PM



All times are GMT. The time now is 10:00 PM.


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