color organ help...

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
sghioto
Posts: 326
Joined: Wed Dec 26, 2007 5:16 pm
Location: Colorado
Contact:

Re: color organ help...

Post by sghioto »

Order from PHAnderson http://www.phanderson.com/picaxe/index.html

$7.95 for three of the 08M2 chips, shipping is mostly flat rate at $1.95

They don't sell the serial download cable anymore but you can easily make one yourself

Steve G
User avatar
dacflyer
Posts: 4748
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: color organ help...

Post by dacflyer »

excellent :D
i am already making the serial cable as well.
thanks..
User avatar
dacflyer
Posts: 4748
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: color organ help...

Post by dacflyer »

i got my chips in today, will start breadboarding it this weekend i hope... :)
sghioto
Posts: 326
Joined: Wed Dec 26, 2007 5:16 pm
Location: Colorado
Contact:

Re: color organ help...

Post by sghioto »

Fantastic! If you have any problems I'm here to help.

Steve G.
User avatar
dacflyer
Posts: 4748
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: color organ help...

Post by dacflyer »

thanks, i'll keep you posted..
User avatar
dacflyer
Posts: 4748
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: color organ help...

Post by dacflyer »

ok,, i got things together.. programmed the picaxe successfully the 1st time :D yay.
i got the color organ breadboarded everything is right.
but i cannot get it to work :( i have my audio connected to the headphone jack of a portable cd player. i saw 1-2 led blink once, maybe 2x, but that was all..
is there something more i need to do to the code ? i am still fuzzy on that.
sghioto
Posts: 326
Joined: Wed Dec 26, 2007 5:16 pm
Location: Colorado
Contact:

Re: color organ help...

Post by sghioto »

dac,

Could be the audio signal is too low. Check the audio level at the Picaxe input, you need at least 1 volt rms for good response.

Steve G
User avatar
dacflyer
Posts: 4748
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: color organ help...

Post by dacflyer »

will double check when i get home this afternoon,,i had it plugged into headphone jack and almost at full volume..
User avatar
dacflyer
Posts: 4748
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: color organ help...

Post by dacflyer »

ok, i double checked things.. i upped the audio a lil more, i get a bit more reaction if i do not have the 10K resistor to ground at the audio input.

i played with a audio tone disk i have..and get mixed results.. in your code is it programed for a exact frequency or a range of frequencies per channel.
if i get a channel to work it is not steady lit.. it fluctuates.
it all looks promising so far,,but maybe needs tweaking..

i want to have like...

low freq............ 30hz - 60hz
med low freq..... 80hz - 350hz
med high freq.... 500hz - 700hz
high freq ......... 10khz - 15khz

just as a starter platform..then i should be able to figure it out from there.
tweak it as i go on.
sghioto
Posts: 326
Joined: Wed Dec 26, 2007 5:16 pm
Location: Colorado
Contact:

Re: color organ help...

Post by sghioto »

Each LED is driven by a band of frequencies, somewhere in this neighborhood if the signal is a sine wave

Red: 20 to 600hz
Green: 600 to 1350hz
Yellow: 1350 to 3500hz
Blue: 3500 to 19000hz

It's normal for the LEDs to fluctuate. The way the code is written the chip is acting like a scanner. It checks each band Red, Green, Yellow and Blue and if the number is in the range then the appropriate LED turns on. Then after a delay set by the value of w0 all the LEDs turn off and the cycle is repeated.

I found it works better if you change the line: pause w0 to pause 100 that sets the on time of the LEDs to .1 second.

Steve G
User avatar
dacflyer
Posts: 4748
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: color organ help...

Post by dacflyer »

ok, i'll try that and see what happens..
User avatar
dacflyer
Posts: 4748
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: color organ help...

Post by dacflyer »

hello again and happy new year.. i just had time to get back onto this..
i did change the pause wo to 100.. there is a little change but the leds still do not seem to sync to the music.
i know you said that it needs 1v p-p, i am using a portable cd player, this should be a 1v p-p i'd think.
anything stronger would cause the audio to be badly distorted...wouldn't you think ?
sghioto
Posts: 326
Joined: Wed Dec 26, 2007 5:16 pm
Location: Colorado
Contact:

Re: color organ help...

Post by sghioto »

anything stronger would cause the audio to be badly distorted
The pulsin command is actually better suited for square waves so any audio signal that's over driven or distorted should not make any difference. Go ahead and crank up the volume but do not exceed the value of power supply voltage.

Happy New Year!

Steve G.
User avatar
dacflyer
Posts: 4748
Joined: Fri Feb 08, 2002 1:01 am
Location: USA / North Carolina / Fayetteville
Contact:

Re: color organ help...

Post by dacflyer »

i did that, way past into distortion. and it just does not do right..
i even used one of them cd's full of test tones, from 20hz up to 20khz. ( choose one at a time )
even sound sweeps ( goes thru all frequencies at one time )
it is just erratic.. i even tried another chip, just in case this one was flaky. but if it was,,would it still program ? i'd think not..but what do i know..lol
i checked made sure all is wired up correctly also.. it is :)
sghioto
Posts: 326
Joined: Wed Dec 26, 2007 5:16 pm
Location: Colorado
Contact:

Re: color organ help...

Post by sghioto »

Dac, first of all download this new program. then try the test mode below.

red: pulsin C.3, 1,w0
if w0 > 68 then
high C.0
endif

green:
if w0 > 27 and w0 < 69 then
high C.1
endif

blue:
if w0 > 11 and w0 < 27 then
high C.2
endif

yellow:
if w0 < 12 and w0 > 1 then
high C.4
endif
pause 100
let pinsC = %00000000
goto red

Set up your signal generator to the specs below.
sine wave at 3 volt pp
At a frequency of: 300 Hz only the red LED should stay lit.
1000 Hz only the green LED
2000 Hz only the blue LED
4000 Hz only the yellow LED

The LEDs will have a slight flicker in this test mode because the outputs all go low at the end of the program before it returns to "red". If you are not getting these results then we have a problem.

Steve G.
Post Reply

Who is online

Users browsing this forum: No registered users and 55 guests