intellijel Posted December 4, 2007 Report Share Posted December 4, 2007 I have been toiying with whether to use the dout module or make my own using a max7219 led driver. The reason for using the max7219 is the built in dimming control of the whole matrix (built in pwm). How can I modify the DOUT module for this behaviour? Build a square wave generator and modulate on/off the connection between the cathodes and ground? Must be a simpler way?cheers, Danjel Quote Link to comment Share on other sites More sharing options...
DragonMaster Posted December 4, 2007 Report Share Posted December 4, 2007 Dim the whole matrix?The LEDs are connected to shift registers, you can disconnect the /OE (Output Enable, active-low) pin from ground and connect an oscillator there. Maybe the PWM source could come from software using an unused DOUT pin, but I'm not sure if software performance would suffer from this. I think it depends of which MIDIbox you're building. I can't tell you what can be done there though...There are other possible PWM sources. Custom-tasked chips like the one you're talking about, a 555 timer circuit controlled by a potentiometer, or even an AOUT module, etc.You'll need to tell more about what you're already planning to run from the core module and/or wait the reply from someone else to see if the PWM could be done in software. If it works, it's a matter of cutting a pin, soldering a wire and modifying the software. If it doesn't, it's going to be an oscillator. Controlling the brightness from software could be done from a menu, an encoder or a potentiometer. Quote Link to comment Share on other sites More sharing options...
intellijel Posted December 4, 2007 Author Report Share Posted December 4, 2007 Hi there,I am building this functionality into a big controller with lot's of buttons and leds (button/led matrix). The leds are rgb with the anodes of each colour connected to a single SR. So if I need to balance the different colours, I would adjust the pwm of the SRs that drive that particular colour.If I set up an oscillator to pulse the OE pin of the SR that should work. If I can find a suitable simple DCO that can receive control signals from spare dout pins (or pins on the core) then I can write a routine that will allow me to control dimming via software without having to send a constant stream of data. Quote Link to comment Share on other sites More sharing options...
DragonMaster Posted December 4, 2007 Report Share Posted December 4, 2007 I wonder if one of those serial-controlled LED drivers could be connected to /OE... I just found the PCA9635, that one really does just brightness control over I2C, and they claim an external driver can be connected to the outputs (It can invert the output as well, so there's no signal to invert between it and the SR.) There's a problem called TSSOP28-only with this chip though. (But a TSSOP package doesn't look too much like a PITA to solder compared to changing the complete DOUT module for an other controller.) Quote Link to comment Share on other sites More sharing options...
intellijel Posted December 4, 2007 Author Report Share Posted December 4, 2007 there should be PWM ICs you can buy that can have there duty cycle set by either databits or a DC voltage. If I use the ones that are set by DC voltage then I can just use a spare DAC pin on the PIC. I have found chips that do this but they seem to be obsolete. There must be something I cna use but to be honest I haven't looked too hard yet ;)Also, maybe I do not need digital control. I can have a few small pots on my controller that I use to adjust the brightness of each colour with. If this is the case, there are some simple 555 based circuits that should work.cheers, danjel Quote Link to comment Share on other sites More sharing options...
DragonMaster Posted December 4, 2007 Report Share Posted December 4, 2007 If I use the ones that are set by DC voltage then I can just use a spare DAC pin on the PIC. I have found chips that do this but they seem to be obsolete.The 555 could be controlled by this IIRC. Quote Link to comment Share on other sites More sharing options...
SLP Posted December 4, 2007 Report Share Posted December 4, 2007 The 555 could be controlled by this IIRC.yep, that's right. The NE555 my #2 favourite chip. Quote Link to comment Share on other sites More sharing options...
Goblinz Posted December 4, 2007 Report Share Posted December 4, 2007 Sorry if i'm being ignorant here, but could a set of pots be used to DIM the various LEDS? I'm mainly thinking of the modulation matrix here. G Quote Link to comment Share on other sites More sharing options...
TK. Posted December 4, 2007 Report Share Posted December 4, 2007 Note that the PIC has two PWM outputs as well.However, controlling the brightness of individual LEDs is not possible with the MIOS concept, as it would load the CPU so much, that no other tasks could be executed in parallel. Problem is, that you need a PWM period of 10 kHz and more if brightness should be controlled with a resolution higher than 3bit. Thats the reason, why normaly dedicated chips (or microcontrollers with special integrated PWM peripherals) are used - they keep the load of the main CPU low.Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
intellijel Posted December 4, 2007 Author Report Share Posted December 4, 2007 Yeah I only want to modify the brightness of a 3 seperate banks of LEDS (e.g. need 3 pwm sources).Each bank may have 64 leds or more spread out over many 74hc595. Each SR will only be connected to one colour so that all like coloured SR can have the OE pin connected to the same PWM source. cheers, Danjel Quote Link to comment Share on other sites More sharing options...
DragonMaster Posted December 5, 2007 Report Share Posted December 5, 2007 The PIC has only two PWM, and I checked the PIC datasheet, and it looks like there's only A/D pins, no D/A.It looks like a serially-controlled LED PWM driver or an analog solution would work the best.I don't know how hard it would be to program the feature in software, but those little serially-controlled LED drivers cost only around $2.50. Quote Link to comment Share on other sites More sharing options...
intellijel Posted December 5, 2007 Author Report Share Posted December 5, 2007 do you mean use the led drivers (e.g. maxim7219) in lieu of the 74HC595 shift registers or in addition (use them only for the pwm)?If they are used instead of the DOUT SR, the difference is that they are 16 bit so the code that normally communicates with the 8bit SR would obviously have to be modified to deal with this. I assume this is not too difficult?The max7219 can also be chained like the SR but I can't remember what the limit is. The result will be more compact Dout boards with increased functionality! Only one resistor per chip to set the led current limit. Maybe a darlignton array would still need to be employed if building an rgb matrix with common cathodes.I remember TK opposing this before since he wanted to make sure that all the components in the Midibox were readily and universally available unlike specialized maxim chips. I still think it would be very useful to the community to develop (and layout) an alternative DOUT that uses enough maxim chips to drive a 64x64 matrix of rgb leds (that's only three IC's, one per each colour and with a dedicate dimming circuit for each ). Anyone quick with layouts who can do this? Maybe put together a bulk order to purchase boards? I know I would buy at least 10 Quote Link to comment Share on other sites More sharing options...
TK. Posted December 5, 2007 Report Share Posted December 5, 2007 Maybe Ralf's implementation will give you some additional inspirations:http://www.suckow.de/ralf/ledmatrix4x20/It has been used in Monodeck II:http://www.monolake.de/monodeck/index.htmlYes, I prefer 74HC595 only because it will still be available in 10 years and more, and it can be purchased worldwide. Maxim chips are coming and going... sometimes they are out of stock, and you will have to wait some months for the next production run. Or they will be discontinued, and you will have to search for a replacement part. No issue if only a small circle of people is interested for a short term...Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
intellijel Posted December 5, 2007 Author Report Share Posted December 5, 2007 I have been talking with Ralf and he was kind enough to send me the files and details of the monodeck construction (modified code, problems they encountered and mods to the standard midibox stuff).The example of the 4x20RGB matrix was modfied to a 4x8 = 32 rgb matrix. Each colour was driven by a single SR so 4 SR's could control 3 colours and the column switching.The trouble is that they needed to create a special circuit to do the dimming of each colour. From what I have read, many people are trying to implement similar things. Look how popular the monome has been! There is even a standard library for using the max7219 with the arduino/wiring board.So either I find a simple way to dim the 74HC595's or else I will design something to use the max7219 (which i am sure can be easily adapted in the future for better chips).Electronics is progressing to quickly to make designs expected to last 10 years! If it stays current for a year I will be happy :p Quote Link to comment Share on other sites More sharing options...
DragonMaster Posted December 5, 2007 Report Share Posted December 5, 2007 do you mean use the led drivers (e.g. maxim7219) in lieu of the 74HC595 shift registers or in addition (use them only for the pwm)?Using a serially-controlled LED PWM conencted to /OE pins of the shift registers.There are a few reasons:-The PIC doesn't seem to have D/A pins.-A software-generated signal would overload the core.-There are only two PWM pins on the PIC.-Almost no modifications to do to the existing DOUT module.-Cheap (Chip costs less than $3).-The PWM is optimized for LEDs.I looked a bit at NXP's PCA9635(second result I found on Google), it has an I2C input, and 16 independent outputs which seem quite flexible (Overall and independant PWM control, "blink" feature, etc.) It can drive a LED directly or drive a controller (The SR in this case) and even invert the output signal (No need for an inverting transistor)The good:-There's only a 5V source, the I2C serial port + address pins and the PWM outputs to connect, there are no other pins on the chip.-Does everything you need (Over 3 PWM sources, can drive the /OE pins directly), there are no other components to buy.Problems:-Only available at Digikey (probably not from a local store)-Surface mount (But TSSOP looks quite easy to solder), needs a PCB.-Software to write.If you can deal with these problems, it could be quite simple to use. I'd personally prefer this chip vs. making three 555-based circuits, but that's my opinion, you could have another one. Quote Link to comment Share on other sites More sharing options...
Spandex Posted March 4, 2008 Report Share Posted March 4, 2008 Yes, I prefer 74HC595 only because it will still be available in 10 years and more, and it can be purchased worldwide.I'm appreciating this point more and more.Anybody have any recommendations over the PCA9635? I'm pretty new to soldering and would prefer not to have to deal with SMD.The maxim7219 seems to support dimming of ALL connected LEDs. I'm looking for an IC that will do them individually. I found an ST2226a which seems to be exactly what I want, but, like TK says, I can't actually buy the thing anywhere :/ Quote Link to comment Share on other sites More sharing options...
ptitjes Posted March 4, 2008 Report Share Posted March 4, 2008 TLC5940 seems to be available from Mouser and Digikey (minimum quantity: 1 - price: 4$27)http://findchips.com/avail?part=TLC5940Best regards, Didier. Quote Link to comment Share on other sites More sharing options...
Spandex Posted March 4, 2008 Report Share Posted March 4, 2008 TLC5940 seems to be available from Mouser and Digikey (minimum quantity: 1 - price: 4$27)http://findchips.com/avail?part=TLC5940Best regards, Didier.That looks perfect. Thanks. Quote Link to comment Share on other sites More sharing options...
wsimard Posted January 21, 2011 Report Share Posted January 21, 2011 Does anyone finally got the TLC5940 working with the software ? I've been looking all around and it seems that there's no further development in this way. Is there anyone reason ? Will Quote Link to comment Share on other sites More sharing options...
levon Posted January 22, 2011 Report Share Posted January 22, 2011 I have some TLC5940's but im still working out how to get them to talk to midibox, im not that experienced at programing so it might take some time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.