It is currently Thu May 23, 2013 2:23 am

All times are UTC + 10 hours




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: What leds do you use on your pov projects
PostPosted: Thu Nov 25, 2010 10:00 pm 
Online
Moderator
Moderator
User avatar

Joined: Sun Mar 28, 2010 9:03 pm
Posts: 699
Location: United Kingdom
Not sure if your ones are diffused though Brad? :)

Here are some Diffused RGB 5mm Leds (50pcs) that are still quite cheap.
http://cgi.ebay.co.uk/50-Pcs-5mm-tri-color-RGB-diffused-LED-common-Cathode-/110439830732?pt=LH_DefaultDomain_0&hash=item19b6ba14cc

Attachment:
led5mmrgb.jpg
led5mmrgb.jpg [ 14.65 KiB | Viewed 705 times ]


Top
 Profile  
 
 Post subject: Re: What leds do you use on your pov projects
PostPosted: Sat Nov 27, 2010 7:17 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:30 pm
Posts: 1863
Yes you're right!

The diffused ones are the ones you really want to go for :)


Top
 Profile  
 
 Post subject: Re: What leds do you use on your pov projects
PostPosted: Tue Nov 30, 2010 12:55 pm 
Offline
semi-newbie
semi-newbie

Joined: Wed Nov 24, 2010 5:01 am
Posts: 10
thanks alot for the info brad :]] i think im going to get some of those.....

in the meantime i bought one of the ones from radioshack just to play around with and i found out that this full color led has a common anode instead of cathode like i was hoping. well i was wondering how would i go about setting this led with a common anode to cycle through the rgb colors? i could figure a way to do it if it had a common cathode but im a little stumped with the common anode


Top
 Profile E-mail  
 
 Post subject: Re: What leds do you use on your pov projects
PostPosted: Tue Nov 30, 2010 8:49 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:30 pm
Posts: 1863
If you just wanted to test it out without using a microcontroller or any other hardware, then just connect the common anode straight to your power supply (most commonly 5volts if you are working with microcontroller circuits)

Then you will need three resistors. One for each cathode.

Connect each cathode to ground and you will light up that corresponding color. you can also mix the colors by lighting up more than one at a time.

If you are connecting it to a microcontroller then again just connect the common anode to your power rail (VCC) and then the other three connections (through your resistors) to three port pins of the microcontroller. The easiest way to work with it now is to just pretend they are common cathodes but before you send the data out to the LED pins, you just need to invert the data.

so if you wanted to cycle through the colors and you connect the LED to PORTA pins 0, 1 and 2 and you're programming in basic, you would do this:

Code:
while true
inc(leds)
leds = leds xor 255 ; this inverts the data in leds and stores it back in leds
porta = leds
leds = leds xor 255 ; invert back to original
delayms(500)
wend


If you ever are dealing with common anode (rather than common cathode) then you just need to invert the data before sending it to your port. Remember we are only dealing with the first three port pins of porta so if we started at 000 and sent that data to a common anode RGB LED, it would actually light them all up, so before we send the data out, we invert it using the xor instruction.

we xor our 8-bit variable with 255 (which is binary 11111111)

if we had the number 00000101 (which means that we wanted the first and third color to be lit) then putting it through the xor instruction we get:

Code:
      00000101
xor 11111111
=    11111010


Hopefully that helps!


Top
 Profile  
 
 Post subject: Re: What leds do you use on your pov projects
PostPosted: Sat Mar 26, 2011 9:54 am 
Offline
newbie
newbie

Joined: Fri Mar 25, 2011 12:33 pm
Posts: 3
To diffuse LEDs I have used fine wet/dry sandpaper...600+ grit
A very light sanding works well.


Top
 Profile E-mail  
 
 Post subject: Re: What leds do you use on your pov projects
PostPosted: Sat Mar 26, 2011 10:00 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:30 pm
Posts: 1863
22hertz wrote:
To diffuse LEDs I have used fine wet/dry sandpaper...600+ grit
A very light sanding works well.


Thanks for the tip!

clear LED's are often quite a bit cheaper than diffused, so it would be a good way to save money.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme made by Keenen Wheeler