Making a POV led Globe

Post here to let others know of a project you're working on.

Moderators: Chuckt, Garth, bitfogav

aliw
decided to stick around...
decided to stick around...
Posts: 29
Joined: Sun Mar 28, 2010 1:46 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

pic 18f4520

Post by aliw » Thu Apr 01, 2010 2:43 am

Ok I´ve found this on the web but how do I know what each pin is?
Image
For example pin1 = MCLR/Vpp/RE3 but I have no idea what that means.
hope you can explain a little to me about this pic 18f4520.
Digg wrote:Ok first of you have quite a bit of confusion about what it is that is going on with this project. I will try to help you to the best of my abilities but I can not teach you everything you will need to do some more research on your own so that this will make more since to you.

Ok first of a rgb led is three leds in one. There are four pins that come out of it. A common cathode or '-' and an anode or '+' for each color: red, green, and blue. You can turn each one on individual or mix them for more colors. For instance you can turn the red and blue leds on you get a purple color.

Your next question is how to expand your design so that you can have more leds than you have pins. This can be done easily with latches. Latches are useful for many things and can be configured in several ways. The best way I can explain this to you is to tell you to think of them as memory. You can write data to them and it will hold those values until you tell it to change them. So with this in mind lets take a generic 8-bit latch. It will have a data bus which will consist of 8 lines, an enable and a clock. We will ignore the clock function of the latch to make things simple. Most enables are active low, which means that the latch is selected when logic '0' is on that pin. So when the latch is enabled whatever is on the data bus is stored in the latch. Whenever logic '1' is returned to the enable whatever was on the data bus is now stored on the latch and will stay there until you change it. I can go more in depth on this but it would be best if you found a good tutorial about exactly how this works.

You also have a problem with your microcontroller idea. A pic is a brand of microcontroller which is very common and easy to use. There is no such thing as an 8-bit it is a description of the microcontroller. It means that it works on 8-bit at a time. I cant think of a good way to explain this to you at this moment.

So lets look at your project...

You want to make an led globe with lets say 16 rgb leds. You have chosen to use a pic MC for the project. The pic I use most is the 18f4520. It has 4 8-bit ports and 1 4-bit port. Each led needs three lines to control it so 16x3=48. You will only have 36 I/O pins so you will need to use latches to expand your design. You then choose to use 6 8-bit latches to do this. You link all the data lines to one data bus. This will only take up one port, or 8 of your I/O pins. Now you need to address each latch to be able to write to it. There are many ways to do this but I will do it the easiest way possible. You will just use another port for this and connect the enables to the first six pins on that port. To write to any latch you drop the enable pin to logic '0' set the data to whatever you want the return it to '1'.

This is not complicated once you understand how all of the pieces fit together. You should really read brads 8x85 pov project as this will be a great help to you. His project is a bit more complicated than the one that I just explained but the circuit diagram is very helpful for an explanation of what i just explained.

I know I left some things out so please feel free to add to explanation.

Hope I was of some help

aliw
decided to stick around...
decided to stick around...
Posts: 29
Joined: Sun Mar 28, 2010 1:46 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by aliw » Thu Apr 01, 2010 2:59 am

brad wrote:
aliw wrote:Thanks for the information you gave me.

However I don't understand the latch bit. When I send '0' to the enable everything is stored and when I send '1' to the enable it sends the data to the led's. I guess the enable is the (OC) pin on the datasheed Brad send me. So when I send '1' to the OC pin all that I stored to it goes to the Q outputs. Is this corect?

so lets say I use 3 latches: (one for red one for green and for blue)

red data green data blue data

00000000 - led1 00000000 - led1 00000000 - led1

00000000 - led2 00000000 - led2 00000000 - led2

00000000 - led3 00000000 - led3 00000000 - led3

00000000 - led4 00000000 - led4 00000000 - led4

00000000 - led5 00000000 - led5 00000000 - led5

00000000 - led6 00000000 - led6 00000000 - led6

00000000 - led7 00000000 - led7 00000000 - led7

00000000 - led8 00000000 - led8 00000000 - led8

does this mean that I will need 3 8-bit latche to control 8 rgb leds? (and 6 8 bit latches to control 16 rgb leds?)

does each line have 8 '0' or just 1 '0'?
Yes what you have said there is correct, although you actually send a logic 0 to the output enable line to send all eight bits to the LED's. If you keep the output enable as a logic 1, then you will get nothing on the LED's it is a logic low enable pin.

Also, yes you do need three 74373 chips to control eight RGB LED's and six to control 16 RGB LED's and so on.

how is the project coming along?
Ok as I understand I don't have to use the D pins. All I need are the Q and OC pins right?
What do pin 20 (Vcc) and pin 11(C+) actually do?

My project:
For now I am just figuring out how everything works and doing lots of research. as soon as I figure everything out I will make a schematic of my project. After that I am going to buy the parts and build it. It has no sence to buy wrong things that you actually don't need. I'm looking forward to solder it all together and uploading some pictures as it is finished.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: pic 18f4520

Post by brad » Thu Apr 01, 2010 1:08 pm

aliw wrote:Ok I´ve found this on the web but how do I know what each pin is?
Image
For example pin1 = MCLR/Vpp/RE3 but I have no idea what that means.
hope you can explain a little to me about this pic 18f4520.
That is a good question.

Most pins if not all pins on a microcontroller can be assigned to perform different functions at any one time.

The top left pin you are talking about is actually one pin that we use when connecting our pickit programmer. Vpp is our programming voltage to write code to the device when programming from the computer. RE3 means that it is PIN 3 of PORTE.

take for example PORTB pin 1. This pin can be any one of a number of functions. we can assign it to be just a straight digital pin (which we would then call it PORTB pin 1 or RB1. We could choose to assign this pin to be an analogue pin in which case we would call it AN10. The third option would be to assign this pin as an external interupt which we would then call INT1.

All the pinout is showing you is all the possibilities that these pins could be. if you want to assign them all to be just digital pins (which is probably most common) you need to send the required data to the applicable register.

For example if we send the hex number 0F to the ADCON1 register, this will set the port pins to perform as digital pins. we do this before we start our main piece of code like this:

Code: Select all

movlw h'0F'
movwf ADCON1
If you have a look through the datasheet you will find that the adcon register controls which pins to perform as analog pins. we can select an individual pin at a time to be analog / digital or we can select multiple or all of them.

in the above case, it is setting all of them to digital.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by brad » Thu Apr 01, 2010 1:17 pm

aliw wrote: Ok as I understand I don't have to use the D pins. All I need are the Q and OC pins right? What do pin 20 (Vcc) and pin 11(C+) actually do?
Take a look at this pinout:
Image

You definitely do need the D0 - D7 pins, otherwise you don't have any data coming in!

Here is what you do:

You have 8 bits coming from the microcontroller to the 8 D input pins of the 74373 chip. you then send a logic 1 to pin 11 of the 74373 to grab onto those 8 bits and store it in the 74373.

This data will now be stored in the 74373 but it will not be shown at the output pins (Q0 - Q7) until you send a logic 0 to pin 1 of the 74373. I.E. a logic 1 on pin 1 means the output is DISABLED. A logic 0 means the output is ENABLED.

and thats it! thats how they work :D

aliw
decided to stick around...
decided to stick around...
Posts: 29
Joined: Sun Mar 28, 2010 1:46 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by aliw » Fri Apr 09, 2010 4:35 am

Take a look at this pinout:
Image

Ok that was actually very useful. Everything about the 74373 is clear to me right now.
As for the pic microcontroller I am going to use your tutorials you are going to be posting on your amazing site. Hope they come soon.

aliw
decided to stick around...
decided to stick around...
Posts: 29
Joined: Sun Mar 28, 2010 1:46 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by aliw » Sat Apr 10, 2010 8:00 am

I have actually a question about the motor. How many RPM (revolutions per minute) it needs to make?

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by brad » Sat Apr 10, 2010 8:13 am

aliw wrote:I have actually a question about the motor. How many RPM (revolutions per minute) it needs to make?
That's a good question, and to be honest I don't know :)

I just turn my motor on and speed it up so that it has basically no flicker. (or very little flicker) then if the image stretches out too much, I simply adjust my delay so that it is shorter between drawing each column.

It's all a bit of trial and error.

aliw
decided to stick around...
decided to stick around...
Posts: 29
Joined: Sun Mar 28, 2010 1:46 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by aliw » Tue Apr 13, 2010 11:31 pm

Ok, I'm going to use the motor of my ventilator. I think that will do the job just well.

Do 3mm rgb leds exist?
And does someone know a good website to buy rgb led's? I've noticed that they aren't very cheap. :wink:

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Wed Apr 14, 2010 5:34 am

aliw wrote:Ok, I'm going to use the motor of my ventilator. I think that will do the job just well.

Do 3mm rgb leds exist?
And does someone know a good website to buy rgb led's? I've noticed that they aren't very cheap. :wink:

There are 3mm RGB leds but they only seem to come in slow changing colour or flashing.. so there not controllable? your best bet would be 5mm RGB :)

the best place probably would be 'EBAY' :)

aliw
decided to stick around...
decided to stick around...
Posts: 29
Joined: Sun Mar 28, 2010 1:46 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by aliw » Wed Apr 14, 2010 5:51 am

the best place probably would be 'EBAY' :)

Ok, Thanks :D

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by brad » Wed Apr 14, 2010 6:11 am

I'd be keen to know this aswell, because I can only find 5mm RGB LED's in the 'manual control' variety. manual control is what they are calling them when they have the common anode / cathode and then the three colour legs (R,G,B)

Image


the flashing ones you can get in 5mm and 3mm but they only have two legs (anode and cathode) and have a little microchip in them that just makes them cycle through the colours at a certain rate. Which is useless for trying to make a pov unfortunately.

If anyone does find any manual control 3mm led's or small SMD leds then be sure to let us all know.

aliw
decided to stick around...
decided to stick around...
Posts: 29
Joined: Sun Mar 28, 2010 1:46 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by aliw » Fri Apr 16, 2010 12:44 am

Thanks,
I haven't thought about ebay. Best prices so far seen. :D
But what is the best choise? diffused or not diffused? And what does "mcd" actually mean? for example 4000mcd

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by brad » Fri Apr 16, 2010 6:00 am

aliw wrote:Thanks,
I haven't thought about ebay. Best prices so far seen. :D
But what is the best choise? diffused or not diffused? And what does "mcd" actually mean? for example 4000mcd
ebay have the best prices that I have seen :)

I highly recommend getting the diffused LED's, because they mix the colours together to give you a very nice looking resultant colour.

Clear lens LED's really don't mix the colours, they still appear seperate unless you put some sort of filter over them or as someone else has pointed out - you could sandpaper the lens to make them diffused.

The 8x8 RGB matrix that I use in my LEDBOY project does not have diffused LED"s, that is why I have that masking tape over it.

If you want to know just about all there is to know about LED's then check out this link:

http://www.gizmology.net/LEDs.htm

aliw
decided to stick around...
decided to stick around...
Posts: 29
Joined: Sun Mar 28, 2010 1:46 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by aliw » Fri Apr 23, 2010 10:35 pm

http://www.gizmology.net/LEDs.htm

very useful link :D

I have a question about how to connect the 74373 with the pic microcontroller because I have 8-bits comming out of one pin. How do I separate those bits because the 8D pins of the 74373 need to grab only one bit.

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Sat Apr 24, 2010 2:44 am

I think you will find that you cant do it that way? you need to connect 8 outputs from your microchip and use 8 inputs to the Dpins of the 74373

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 1 guest