jvcastel
Newbie
Offline
Posts: 16
Thank You
-Given: 21
-Receive: 7
|
|
« on: October 07, 2009, 06:17:51 18:17 » |
|
Dear friends of the Sonsivri community, Have any of you got the source code for the Eightcubed project? You can find more information about it at this address: www.lumisense.comAccording to this site the source code for V1.0 of the cube is released to anyone who ask for it by email. I did, but up to now I haven't received anything yet. Since they are developing V2.1 of the project it appears that they are not releasing V1.0 information any longer. I have the schematics which you can still download from the web page mentioned above. But there is no source code for the PIC and the dsPic used on this project Any help will be greatly appreciated. Kind regards, jvcastel
|
|
|
Logged
|
|
|
|
DarkClover
Active Member
Offline
Posts: 167
Thank You
-Given: 37
-Receive: 60
Still alive...
|
|
« Reply #1 on: October 27, 2009, 11:37:31 23:37 » |
|
Cool thingy! I have to build one by myself but with AVR.
Software(µC and PC) is no big problem but I wonder how they control the current with the Shift-Registers. Are they shifting them so fast that there exist a PWM effect ? Has anybody an Idea ?
|
|
« Last Edit: October 27, 2009, 11:41:31 23:41 by DarkClover »
|
Logged
|
Not thinking means to believe what others say! TRY & ERROR... the fundamental principle our existence is based on
|
|
|
LabVIEWguru
Senior Member
Offline
Posts: 300
Thank You
-Given: 273
-Receive: 593
|
|
« Reply #2 on: October 28, 2009, 04:26:48 04:26 » |
|
Two ideas - if you used a few(?) bytes for each LED, you could use a "pattern byte" and update all LEDS at the same time via the timer. So at milliseconds + 0 the timer runs out, LED1 is always on because the "pattern byte" reads "1111111111111111" (or whatever) and LED2 is at 50% because the "pattern byte" reads "1010101010101010" so it's sort of PWM without all the timers. I think that may work - just make all entries in the data table the same width and one pointer byte to keep track of the point in the bytes you are outputting. I'm going to try this (when I get time!) If you want to go all hardware, Maxim makes some display drivers and I think you can address the brightness of each LED. I've got one here for a project and it will address 128 individual LEDs using an SPI and an enable line. Cool stuff. Posted on: October 28, 2009, 04:16:08 04:16 - Automerged
Here's your source files: http://rapidshare.com/files/298894137/8cubed.rar.htmlI don't recognize the extension. I'm sure it's some compiler, but if you figure it out, kindly let me know.
|
|
|
Logged
|
|
|
|
Gorgus
Senior Member
Offline
Posts: 398
Thank You
-Given: 1793
-Receive: 4246
|
|
« Reply #3 on: October 28, 2009, 06:51:43 06:51 » |
|
.zm9 appears to be an archival format (in this case, can also be a file for zonealarm). I renamed the files to .zip and extracted them with WinRAR. If that won't work, download AllZIP from http://www.altools.com/ which support the zm9-format directly...
|
|
« Last Edit: October 28, 2009, 06:56:08 06:56 by Gorgus »
|
Logged
|
|
|
|
DarkClover
Active Member
Offline
Posts: 167
Thank You
-Given: 37
-Receive: 60
Still alive...
|
|
« Reply #4 on: October 28, 2009, 12:27:16 12:27 » |
|
Two ideas - if you used a few(?) bytes for each LED, you could use a "pattern byte" and update all LEDS at the same time via the timer. So at milliseconds + 0 the timer runs out, LED1 is always on because the "pattern byte" reads "1111111111111111" (or whatever) and LED2 is at 50% because the "pattern byte" reads "1010101010101010" so it's sort of PWM without all the timers.
Okay that means I can control them through these bytes from 0...0 to 1...1. But what's with the ENABLE pin (e.g. at 74HC595) ? If you switch the 3-state register ON/OFF you can reach a PWM too or am I false ? The Maxim driver sounds good but I don't want to use some very special components. It should be easy to build and rebuild.
|
|
|
Logged
|
Not thinking means to believe what others say! TRY & ERROR... the fundamental principle our existence is based on
|
|
|
LabVIEWguru
Senior Member
Offline
Posts: 300
Thank You
-Given: 273
-Receive: 593
|
|
« Reply #5 on: October 29, 2009, 04:36:18 16:36 » |
|
I think it would be worth experimentation, you'd have to have your timing right. I think it could work like this:
LED# "Pattern byte" 1 1111111111111111 2 1111000011110000 3 1010101010101010 4 (whatever) 5 (whatever)
So, count = 0 get the 1st bit of the pattern byte for the 1st LED output it to whatever x,y location for the 1st LED
get the 1st bit of the pattern byte for the 2nd LED output it to whatever x,y location for the 2nd LED
continue until all LEDs are updated
now increment count is count > number of pattern bits? if yes, set count to 0 and go restart
if no, use count to reference position of pattern byte (in this case, 2)
get the 2nd bit of the pattern byte for the 1st LED output it to whatever x,y location for the 1st LED
get the 2nd bit of the pattern byte for the 2nd LED output it to whatever x,y location for the 2nd LED
I'm sure there will be a bit more to it than my example, but I think it will work with a bit of experimentation
|
|
|
Logged
|
|
|
|
DarkClover
Active Member
Offline
Posts: 167
Thank You
-Given: 37
-Receive: 60
Still alive...
|
|
« Reply #6 on: October 29, 2009, 04:54:20 16:54 » |
|
Okay I'll try it tomorrow when I got my 74HC595 ShiftRegisters. I'll report my experiences and maybe some pictures or a clip on youtube if it works well.
|
|
|
Logged
|
Not thinking means to believe what others say! TRY & ERROR... the fundamental principle our existence is based on
|
|
|
DarkClover
Active Member
Offline
Posts: 167
Thank You
-Given: 37
-Receive: 60
Still alive...
|
|
« Reply #7 on: October 30, 2009, 11:51:07 23:51 » |
|
I tested it just with simple red LEDs and it works pretty good. Now I can imagine how it lokks like with RGB-LEDs.
There is a minimum of 32bit to creat a really dark phase maybe 64 ar better. To get different brightnes levels the pwm byte pattern have to be increased/decreased by one position.
10000.... /inc 11000.... /inc 11100....
I'll make some pictures and a video soon. It looks like this is going to be a very interesting project with the cube.
and so on. The same at decreasing.
|
|
|
Logged
|
Not thinking means to believe what others say! TRY & ERROR... the fundamental principle our existence is based on
|
|
|
LabVIEWguru
Senior Member
Offline
Posts: 300
Thank You
-Given: 273
-Receive: 593
|
|
« Reply #8 on: November 01, 2009, 06:33:53 18:33 » |
|
I'm glad it works - some of my ideas are not so good! For the RGB you have to switch anode and cathode on the LED. If you are only driving a few LEDS for experimentation you could use small MOSFETS. Or maybe better would be a open collector device like the (I think) 7406 or whatever the CMOS device is. I will look up some ideas when I get time. You can't run too many LEDs out of the microcontroller without frying the micro. have fun.
|
|
|
Logged
|
|
|
|
OscarH
Junior Member
Offline
Posts: 50
Thank You
-Given: 158
-Receive: 18
|
|
« Reply #9 on: November 02, 2009, 08:55:51 20:55 » |
|
Hi LabVIEWguru, Could you please be nice to repost 8cubed source file, previous one had been removed from Rapidfile. Thanks. OscarH
|
|
|
Logged
|
All mushrooms are edible. At least once...
|
|
|
DarkClover
Active Member
Offline
Posts: 167
Thank You
-Given: 37
-Receive: 60
Still alive...
|
|
« Reply #10 on: November 03, 2009, 05:21:33 17:21 » |
|
Here is the video link of my ShiftRegister-PWM-Test: http://www.youtube.com/watch?v=o8lFZj7FHcgThe fluctuation of the second LED pair (from left) comes from interference with the camera. This is very interesting. I plan to build my own "8cubed" maybe just a 5cubed because the LED's are very expensive.
|
|
« Last Edit: November 03, 2009, 07:10:56 19:10 by DarkClover »
|
Logged
|
Not thinking means to believe what others say! TRY & ERROR... the fundamental principle our existence is based on
|
|
|
LabVIEWguru
Senior Member
Offline
Posts: 300
Thank You
-Given: 273
-Receive: 593
|
|
« Reply #11 on: November 04, 2009, 05:49:25 05:49 » |
|
|
|
|
Logged
|
|
|
|
LabVIEWguru
Senior Member
Offline
Posts: 300
Thank You
-Given: 273
-Receive: 593
|
|
« Reply #12 on: November 12, 2009, 06:29:59 06:29 » |
|
Ok. Man, I can't believe I missed this - The two 8-cubed files, when extracted have the file extension .zm9 This is a ZIP file renamed by Zone Alarm! It's not a compiler extension at all. Simply change the filename extension to .zip (as in filename.zip) and you'll be good to go with the source code.
|
|
|
Logged
|
|
|
|
|