MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

DIY 4ms SMR
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next [all]
Author DIY 4ms SMR
webboy
nicdro wrote:
there are a couple of questions left for me:
- which lightpipe size is correct? 5mm?
- what are these pads called "AGND, AGND-OPT, DGND, PG2, PG3, PG5, PG6"
so to speak what do i do with them?
thanks for all your posts! we're not worthy

Edit: And are the Kingbright LEDs the same as the Hebeil? There is a 13$ difference...


Altitude909 linked to the correct pipes - after he linked to the wrong ones. So look for the post in this thread where he says "crap I linked to the wrong ones...." The correct ones are there, I think they are 3mm, but it's up there. wink
d.simon
nicdro wrote:
d.simon wrote:
agnd and dgnd are where analog and digial ground are connected.
analog ground is used on the analog side of the codec, and possibly some of the I/O buffering on that side

so nothing to place here as koerby mentioned?


yes nothing to place. Have a look the 4ms page for SMR. They have a very good shot of the back of the board (showing blank pads on the PG and agnd/dgnd). If you notice, they don't place the boot switch or usb port either. Up to you on those.
webboy
nicdro wrote:
d.simon wrote:
agnd and dgnd are where analog and digial ground are connected.
analog ground is used on the analog side of the codec, and possibly some of the I/O buffering on that side

so nothing to place here as koerby mentioned?


You could also do "show agnd" etc. in Eagle and have a look at the signal path to see what's connected to it. (too lazy to turn off al the layers, sorry for the busy image.)

[/img]
d.simon
I like that long trace on agnd...has to be there to get to the output section on the "left" side of the board. The input and codec are on the right...
(either that...or not exactly sure why agnd was used on those particular left side connections., but the stereo outs have to follow a similar path from the codec to the panel jacks.)

I think agnd-opt is the pad in the lower right of that pic (just kind of sitting there).

The agnd/dgnd connection is in the upper right of that pic (above IC7) - theres a trace between the two agnd/dgnd pads. That's the only tie in AFAIK between the analog ground and the "proper" digital ground.

On the physical picture, you'll notice agnd/dgnd also in between the back side of one of the slider pots solder points.

Of course, the PGX pads are on the right side of the MCU.
Altitude909
webboy wrote:
nicdro wrote:
there are a couple of questions left for me:
- which lightpipe size is correct? 5mm?
- what are these pads called "AGND, AGND-OPT, DGND, PG2, PG3, PG5, PG6"
so to speak what do i do with them?
thanks for all your posts! we're not worthy

Edit: And are the Kingbright LEDs the same as the Hebeil? There is a 13$ difference...


Altitude909 linked to the correct pipes - after he linked to the wrong ones. So look for the post in this thread where he says "crap I linked to the wrong ones...." The correct ones are there, I think they are 3mm, but it's up there. wink


I fixed my original post to the right ones. 3mm is what you want
nicdro
Thanks to all of you guys!
Preparing the BOM based on Altitude909.

Still curious if the kingbright leds will work...
d.simon
nicdro wrote:
Thanks to all of you guys!
Preparing the BOM based on Altitude909.

Still curious if the kingbright leds will work...


Knightbright leds should work. They use the "HEBEI" package (pin 1 is red, pin 2 is anode, etc) . there are at least two mfg's with different pinouts for common annode leds - Cree mfg use a different pinout and would not be too great for the SMR.

nicdro
d.simon wrote:
nicdro wrote:
Thanks to all of you guys!
Preparing the BOM based on Altitude909.

Still curious if the kingbright leds will work...


Knightbright leds should work. They use the "HEBEI" package (pin 1 is red, pin 2 is anode, etc) . there are at least two mfg's with different pinouts for common annode leds - Cree mfg use a different pinout and would not be too great for the SMR.


Thanks!
So these would do the job right?
http://www.ebay.com/itm/290848637808
Altitude909
^
Pretty sure those are the ones I used
NV
nicdro wrote:
d.simon wrote:
nicdro wrote:
Thanks to all of you guys!
Preparing the BOM based on Altitude909.

Still curious if the kingbright leds will work...


Knightbright leds should work. They use the "HEBEI" package (pin 1 is red, pin 2 is anode, etc) . there are at least two mfg's with different pinouts for common annode leds - Cree mfg use a different pinout and would not be too great for the SMR.


Thanks!
So these would do the job right?
http://www.ebay.com/itm/290848637808


Those shouldn't work as is - while pin 2 is the anode for those, the pinout footprint does not match the SMR footprint. The common anode routing on the SMR board would instead land on the red cathode for those.

However if you're deep enough into DIY to attempt this project you could also just manually swap the traces on the Eagle file to match whichever LED footprint you choose. While the PLCC4 pinout is not universal, the sizing is and there is a good deal of empty estate around the SMR LEDs to route the traces differently if needed.
nicdro
NV wrote:
nicdro wrote:
d.simon wrote:
nicdro wrote:
Thanks to all of you guys!
Preparing the BOM based on Altitude909.

Still curious if the kingbright leds will work...


Knightbright leds should work. They use the "HEBEI" package (pin 1 is red, pin 2 is anode, etc) . there are at least two mfg's with different pinouts for common annode leds - Cree mfg use a different pinout and would not be too great for the SMR.


Thanks!
So these would do the job right?
http://www.ebay.com/itm/290848637808


Those shouldn't work as is - while pin 2 is the anode for those, the pinout footprint does not match the SMR footprint. The common anode routing on the SMR board would instead land on the red cathode for those.

However if you're deep enough into DIY to attempt this project you could also just manually swap the traces on the Eagle file to match whichever LED footprint you choose. While the PLCC4 pinout is not universal, the sizing is and there is a good deal of empty estate around the SMR LEDs to route the traces differently if needed.

ok now i get it. thanks!
d.simon
Let me double check the .brd again. Trying to figure out the right pinout on these RGB leds is like an optical illusion. At least in my case, I know the Cree footprint is not good. (it can work, but requires a lot of buss wire). On the good side : increase your ECO skills!

If people are having success with the ebay ones then great. So far I've seen at least 3 pinouts for that plcc4 package (Cree, Knightbright, and the Ebay ones)

I think in theory there's 4!/2 different pinouts for a rectangular, 4-pin device.
So that would be 4*3*2*1 / 2 = 12 different permutations. I divide by 2 because of rotation.
av500
just put a wall of jumpers around the LEDs, then you can adapt to any LED pinout...

been there, done that:

nicdro


the hebei should be right as you mentioned, b.simon
as far as i can tell..
very confusing as there is always another orientation hmmm.....
d.simon
nicdro - you flipped the image correct? Because the 4ms .brd has the LED's on the back side. Just FYI.

its funny though if you look at the ebay "device photo", it looks like the common node is at a different location then their schematic. According to the schematic, the common node is catty-corrner to the cathode mark. But the physical photo shows it on the same "long side" as the cathode mark. Also, it doesn't look very rectangular in the photo. Are these actually square?

also, FYI I researched the actual mfg "Hebei" and their data sheet is a little different from the Knightbright one (anode looks like its in the right spot, but some colors are swapped. I think G<->B)
nicdro
i think i figured it out!





according to this 1 is RED.
nicdro
d.simon wrote:
nicdro - you flipped the image correct? Because the 4ms .brd has the LED's on the back side. Just FYI.


yes i did!

According to the schematics of the SMR (i did not flipped the board):



So...the kingbright do have the B and G switched in comparison to the SMR.
d.simon
Yep...that's what I got...but here's with the image flipped for reference.



so clockwise from the upper left pin : R + B G

I also checked the source code to verify that's in fact how 4ms is using those outputs of the pwm controllers.

What I figured for anyone sourcing LED parts: if you don't care about color, there's about a 50% chance you'll get the anode in the right spot. assuming either:
a. you randomly pick a mfg'r without studying the datasheets
b. you take a gamble on ebay

Besides the anode, there's the color. If any color(s) is in the wrong spot, you either live with it, or modify the driver in the code. It didn't seem to be that big of a deal to do, but it is a hassle.

I also learned both Cree and Kingbright sell different packages with the anode in either spot, so it is possible to go "right" or "wrong" with either of those mfgr's.

also : I just bought about 100 of those led's on ebay for about $8 USD.
compared to some sites selling like kingbrights 2 for $30 or some huge amount.
nicdro
d.simon wrote:
Yep...that's what I got...but here's with the image flipped for reference.



so clockwise from the upper left pin : R + B G

I also checked the source code to verify that's in fact how 4ms is using those outputs of the pwm controllers.

What I figured for anyone sourcing LED parts: if you don't care about color, there's about a 50% chance you'll get the anode in the right spot. assuming either:
a. you randomly pick a mfg'r without studying the datasheets
b. you take a gamble on ebay

Besides the anode, there's the color. If any color(s) is in the wrong spot, you either live with it, or modify the driver in the code. It didn't seem to be that big of a deal to do, but it is a hassle.

I also learned both Cree and Kingbright sell different packages with the anode in either spot, so it is possible to go "right" or "wrong" with either of those mfgr's.

also : I just bought about 100 of those led's on ebay for about $8 USD.
compared to some sites selling like kingbrights 2 for $30 or some huge amount.

Unfortunately i couldn't figure out how to switch blue and green codewise in the driver... so i'll go for trial and error i guess...
even the musical scales wont be as the manual reads hmmm.....
nicdro
Quote:
void LEDDriver_set_LED_ring(uint16_t ring[20][3], uint16_t env_out[6][3]){
uint8_t i,driverAddr;

for (driverAddr=0;driverAddr<4;driverAddr++){
LEDDriver_startxfer(driverAddr);
LEDDriver_senddata(PCA9685_LED0);

for (i=driverAddr*5;i<(5+(driverAddr*5));i++){
LEDDriver_senddata(0); //on-time = 0
LEDDriver_senddata(0);
LEDDriver_senddata(ring[i][0] & 0xFF); //off-time = brightness
LEDDriver_senddata((ring[i][0] >> 8) & 0xFF);

LEDDriver_senddata(0); //on-time = 0
LEDDriver_senddata(0);
LEDDriver_senddata(ring[i][1] & 0xFF); //off-time = brightness
LEDDriver_senddata((ring[i][1] >> 8) & 0xFF);

LEDDriver_senddata(0); //on-time = 0
LEDDriver_senddata(0);
LEDDriver_senddata(ring[i][2] & 0xFF); //off-time = brightness
LEDDriver_senddata((ring[i][2] >> 8) & 0xFF);

}

//Channel 6 ENVOUT LED: Blue
if (driverAddr==2){
LEDDriver_senddata(0);
LEDDriver_senddata(0);
LEDDriver_senddata(env_out[5][2] & 0xFF);
LEDDriver_senddata((env_out[5][2] >> 8) & 0xFF);
}

//Channel 6 ENVOUT LED: Green
if (driverAddr==3){
LEDDriver_senddata(0);
LEDDriver_senddata(0);
LEDDriver_senddata(env_out[5][1] & 0xFF);
LEDDriver_senddata((env_out[5][1] >> 8) & 0xFF);
}

LEDDriver_endxfer();
}

driverAddr=4;
LEDDriver_startxfer(driverAddr);
LEDDriver_senddata(PCA9685_LED0);

for (i=0;i<5;i++){
LEDDriver_senddata(0); //on-time = 0
LEDDriver_senddata(0);
LEDDriver_senddata(env_out[i][0] & 0xFF); //off-time = brightness
LEDDriver_senddata((env_out[i][0] >> 8) & 0xFF);

LEDDriver_senddata(0); //on-time = 0
LEDDriver_senddata(0);
LEDDriver_senddata(env_out[i][1] & 0xFF); //off-time = brightness
LEDDriver_senddata((env_out[i][1] >> 8) & 0xFF);

LEDDriver_senddata(0); //on-time = 0
LEDDriver_senddata(0);
LEDDriver_senddata(env_out[i][2] & 0xFF); //off-time = brightness
LEDDriver_senddata((env_out[i][2] >> 8) & 0xFF);

}

//Channel 6 ENVOUT LED: Red
LEDDriver_senddata(0); //on-time = 0
LEDDriver_senddata(0);
LEDDriver_senddata(env_out[5][0] & 0xFF); //off-time = brightness
LEDDriver_senddata((env_out[5][0] >> 8) & 0xFF);

LEDDriver_endxfer();

}


this is the passage i guess in pca9685_driver.c

0 is RED
1 is GREEN
2 is BLUE

right?

ENV_OUT Channel 6 is connected to another chip for each color according to the schematics.
nicdro
Does flashing work with a FDTI Friend or do I need the STM32F4 Discovery board?
Thanks!
Altitude909
nicdro wrote:
Does flashing work with a FDTI Friend or do I need the STM32F4 Discovery board?
Thanks!

SWD only, there is no serial header
d.simon
nicdro wrote:

this is the passage i guess in pca9685_driver.c

0 is RED
1 is GREEN
2 is BLUE

right?

ENV_OUT Channel 6 is connected to another chip for each color according to the schematics.


yes that looks correct. Do you need to change the code because you have the kingbrights? It could be the ones from ebay are okay.

the second dimension for each reference to "ring" and "env_out" can be swapped - instead of hard-coding it, you could add defines in that file to make it easier to swap (or just for fun).

The are two structures : ring and env_out. "ring" is for the 20 led's in the ring and env_out are for the "envelope out" for the six channels.

As you see, the 16 channels of each pca9685 are divided amongst the ring and env_out. The ring is divided into 4 sets of 5 (for i2c addrs 0-3). The env_out for ch 1-5 are on the pca9685 with address 4. env_out for ch 6 is split on i2c addrs 2,3,and 4. Its also possible on the .brd to verify those addrs if desired.
nicdro
d.simon wrote:
nicdro wrote:

this is the passage i guess in pca9685_driver.c

0 is RED
1 is GREEN
2 is BLUE

right?

ENV_OUT Channel 6 is connected to another chip for each color according to the schematics.


yes that looks correct. Do you need to change the code because you have the kingbrights? It could be the ones from ebay are okay.

the second dimension for each reference to "ring" and "env_out" can be swapped - instead of hard-coding it, you could add defines in that file to make it easier to swap (or just for fun).

The are two structures : ring and env_out. "ring" is for the 20 led's in the ring and env_out are for the "envelope out" for the six channels.

As you see, the 16 channels of each pca9685 are divided amongst the ring and env_out. The ring is divided into 4 sets of 5 (for i2c addrs 0-3). The env_out for ch 1-5 are on the pca9685 with address 4. env_out for ch 6 is split on i2c addrs 2,3,and 4. Its also possible on the .brd to verify those addrs if desired.

i thought those on ebay do not have the right place of the anode thogh - referring to their schematics!?

adding defines would exceed my coding knowledge (its actually near to zero) - haha. My main goal is to provide the files adjusted to the common leds (such as kingbright and the hebei led) for wigglers who dont know where to change it in the sourcecode.
can anyone try switching the numbers and see if it works?
d.simon
nicdro wrote:

i thought those on ebay do not have the right place of the anode thogh - referring to their schematics!?


I'm not so sure those ebay schematics are correct. plus it sounds like altitude909 used those ones. If you check that seller, they have other auctions for those led's and it appears they changed the schematic at some point. That same seller even has an auction with two different schematics for the same product. I don't think there's any guarantee they'll work. But they might...just "buyer beware".
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next [all]
Page 7 of 10
Powered by phpBB © phpBB Group