Blurred Talon 4 Posted April 11, 2014 Share Posted April 11, 2014 I'm in the process of making some LED tail lights for my car. I'd like to use an MSP430/TLC5940NT combo to control not only PWM brightness but also some interesting sequencing for show purposes. I'll will do my best to explain everything. I'm not sure where to start in designing what I want so I hope posting this will get someone interested in helping me out. I already have some MSP430G2331s and a ton of TLC5940NTs for this project. The LED strings already have an inline resistor and will be powered by a voltage regulator (Sharp 9V LDO). Car has seperate brake/turn signals on the rear so the rear signals do not need PWM brightness control. First let's start with the brake lights. Here's a picture of the tail light boards, I'm still working on finalizing the final board so there is 5 in total. Back of a board. There's 3 LEDs per string, so I was thinking of having each of these being 1 channel on the sequencer. I could however tie two (on above the other) together with a jumper if it will make things easer. Using my current idea for the channels I'm looking at this for a channel break down. Board 1 - 34 Channels Board 2 - 18 Channels Board 3 - 16 Channels Board 4 - 10 Channels Board 5 - 16 Channels Total of 94 channels so 6 TLC5940s per side. There is also a center section which I want to light up, I'm in the process of redesigning the boards for this part. Here's a picture of my previous design of the boards to give you an idea. Channel break down for this. Board 1 - 12 Board 2 - 9 Board 3 - 5 Board 4 - 5 Board 5 - 5 Board 6 - 9 Board 7 - 12 TLC5940NT count - 4 Uc Functions for the Brake Lights - All uCs of the brake light must communicate with each other for the sequencing - Must take brake and marker signals from the OEM wiring. - PWM brightness control for the marker lights - Multiple show sequences (Cylon scan, Knight Rider, Strobe, etc) - Possible - G sensor for strobe before solid on under panic braking - Possible - Bluetooth connection to change between sequences - Some sort of display up front so I know what the tails are doing Rear Turn Signals Channel count Board 1 - 13 Board 2 - 11 Board 3 - 16 Total of 40 channels, 3 TLC5940s. uC Functions for Rear Tails - must take turn signal input from OEM wiring - sequencial turn signals - No marker so they operate at full brightness - Multiple show funcntions - Possible - Bluetooth connection to change between sequences - Some sort of display up front so I know what the tails are doing Front Turn Signals/Markers (Headlight and bumper) Bumper markers Board 1 - 13 Channels 1 TLC5940 per side Headlight boards Board 1 - 15 channels 1 TLC5940 per side uC Functions for Front Markers/Turns - Must take turn and marker signals from the OEM wiring. - PWM brightness control for the marker lights - Multiple show sequences (Cylon scan, Knight Rider, Strobe, etc) - Possible - Bluetooth connection to change between sequences - Some sort of display up front so I know what the boards are doing Last set of boards Name Plate boards The car says the name across the back (Talon). I've made these boards to light up these letters. I want 1 board to be 1 channel, again inline resistors and powered by a seperate voltage regulator. uC functions for name plate boards - PWM brightness control - Take factory marker input - Fade on/off - Multiple Show functions (Spell name, Flicker before them come on, etc) I think that is it. I hope someone is able to help me out in figuring out/designing this, I realize it's quite the under taking but I want to make it work. Thanks in advance. pine, StupidPig and RobG 3 Quote Link to post Share on other sites
RobG 1,892 Posted April 11, 2014 Share Posted April 11, 2014 Very ambitious project. There are few TLC5940 code examples on this forum (here are some) and I think there was another tail light project as well (can't remember if it was using TLC5940 or not.) Quote Link to post Share on other sites
StupidPig 10 Posted April 12, 2014 Share Posted April 12, 2014 Hi @@Blurred Talon, welcome! even thought I'm also a pretty new member here. RobG's sample code definately a good start for you. For bluetooth connection, take a look about the HC-06 module and the breakout board on here. I'm playing with that with my LED sequencer project except I'm going to using my own breakout board. Have fun! Quote Link to post Share on other sites
Blurred Talon 4 Posted April 12, 2014 Author Share Posted April 12, 2014 Very ambitious project. There are few TLC5940 code examples on this forum (here are some) and I think there was another tail light project as well (can't remember if it was using TLC5940 or not.) Thanks RobG, I'm likely in way over my head but if I am doing this I want to do in once with everything I need. Hi @@Blurred Talon, welcome! even thought I'm also a pretty new member here. RobG's sample code definately a good start for you. For bluetooth connection, take a look about the HC-06 module and the breakout board on here. I'm playing with that with my LED sequencer project except I'm going to using my own breakout board. Have fun! Thanks! My big issue is knowing what components to put together to get the MSP430 and TLC5940NT working together. I'd like to do this on a breadboard first before I design anything in Eagle but I have no idea what components/parts I need (apart from the obvious uC and LED Driver). Is there a wiring diagram, BOM or something I can used to get started? Quote Link to post Share on other sites
RobG 1,892 Posted April 12, 2014 Share Posted April 12, 2014 You can use this (MCU)or this (BP) board for testing. Quote Link to post Share on other sites
Blurred Talon 4 Posted April 15, 2014 Author Share Posted April 15, 2014 What needs to be done with the TLC if you are not using the IREF pin? I've got an inline resistor and the LEDs powered by an external source with the TLC5940 providing ground. I've got everything done up on a bread board, just need to load a program to the MSP430 to try it out. Edit: Also when the data sheet talks about 120mA per channel is this the max period or does this not apply when using an external power source and inline resistor to the LEDs. Quote Link to post Share on other sites
RobG 1,892 Posted April 15, 2014 Share Posted April 15, 2014 Why use serial resistor and not TLC5940's constant current drivers? How much current do you need to drive your LEDs? I am not sure if 5940 will work without the resistor, you will probably have to GND the pin or use 330ohm resistor for max current. Keep in mind that 120mA is for Vcc >3.6V, so you will have to power it from 5V supply. Also, make sure you do not exceed 5940's power dissipation rating. Quote Link to post Share on other sites
Blurred Talon 4 Posted April 16, 2014 Author Share Posted April 16, 2014 3 LEDs, 9V source, 2.19Vf, 70mA diode forward current. I've already got the boards built/designed with the inline resistors. I've got controller I bought using the MSP430/TLC5940 that uses a resistor on the boards, just not sure how to set it up. I will have to look up that power dissipation rating. Quote Link to post Share on other sites
RobG 1,892 Posted April 16, 2014 Share Posted April 16, 2014 You can still use series resistors or just short them. TLC's resistor would be 560ohm, which would limit the current to 70mA. Quote Link to post Share on other sites
Blurred Talon 4 Posted April 16, 2014 Author Share Posted April 16, 2014 Alright, I'll have to see if I have one of those to try it out on my breadboard. Thanks for all the help Rob. Slowly slowly progressing forward in this. Now, should I have 1 MSP430 controlling all 3 seperate tail lights with all of the TLC5940 (20 in total) daisy chained together or break them into 3 seperate controllers and the TLC5940s for that tail light. I assume more code for the communication side with 3 controllers. Quote Link to post Share on other sites
RobG 1,892 Posted April 16, 2014 Share Posted April 16, 2014 I would make them separate (TLCs require several control signals.) This way, each MSP could monitor OEM wiring and could take commands from other sources. For example, you could have one MSP master, either one tail light or dedicated controller, which would communicate with other MSPs using UART (9600.) You could then connect all lights with just a pair of wires, you could use a simple addressing mechanism to control individual lights, and you could also test your lights using PC and USB->UART dongle. You could have commands that trigger sequences, turn individual channels on and off, turn all on and off, you could even save your last used sequence to EEPROM, so the next time the light is powered on, it uses the same one and not the default. Implementing such thing would be very easy, see UART->TLC example. Your software would be something like: main loop takes care of light sequence timer ISR refreshes TLCs port ISR monitors OEM wiring and triggers sequence (in addition it could send commands to other lights via UART) USCI ISR receives UART commands and triggers sequence Quote Link to post Share on other sites
D69 3 Posted April 17, 2014 Share Posted April 17, 2014 You may need more than 3 MSPs, TLCs will daisy chain but to many in a chain and you start getting timing and brightness issues, I seem to recall 6 or 9 being a reliable number but worth a test. You will need a resistor either way, it may seem largely irrelevant but it could cause a lot of heat issues if you don't. I have a project using 3tlc and 12v led strips, I had to keep each of the strips under 100ma or the tlc got too hot. The chip is still sinking current, even if you think you're providing the leds with exactly what they need. Also remember to add some decoupling capacitors to keep your signals smooth. I've ended up going back to the duino for my tlc projects as I can't find a decent implementation for the msp yet, which is a massive shame! I don't read my own signature! Quote Link to post Share on other sites
RobG 1,892 Posted April 17, 2014 Share Posted April 17, 2014 ...I can't find a decent implementation for the msp yet, which is a massive shame! What would be a decent implementation? Quote Link to post Share on other sites
D69 3 Posted April 17, 2014 Share Posted April 17, 2014 For me, an Energia library :-) I don't read my own signature! Quote Link to post Share on other sites
Blurred Talon 4 Posted April 17, 2014 Author Share Posted April 17, 2014 I would make them separate (TLCs require several control signals.) This way, each MSP could monitor OEM wiring and could take commands from other sources. For example, you could have one MSP master, either one tail light or dedicated controller, which would communicate with other MSPs using UART (9600.) You could then connect all lights with just a pair of wires, you could use a simple addressing mechanism to control individual lights, and you could also test your lights using PC and USB->UART dongle. You could have commands that trigger sequences, turn individual channels on and off, turn all on and off, you could even save your last used sequence to EEPROM, so the next time the light is powered on, it uses the same one and not the default. Implementing such thing would be very easy, see UART->TLC example. Your software would be something like: main loop takes care of light sequence timer ISR refreshes TLCs port ISR monitors OEM wiring and triggers sequence (in addition it could send commands to other lights via UART) USCI ISR receives UART commands and triggers sequence Thanks again for all the help Rob! I've got quite a bit of reading to do. I forgot to note that my boards are series parallel, common power, seperate grounds. You may need more than 3 MSPs, TLCs will daisy chain but to many in a chain and you start getting timing and brightness issues, I seem to recall 6 or 9 being a reliable number but worth a test. You will need a resistor either way, it may seem largely irrelevant but it could cause a lot of heat issues if you don't. I have a project using 3tlc and 12v led strips, I had to keep each of the strips under 100ma or the tlc got too hot. The chip is still sinking current, even if you think you're providing the leds with exactly what they need. Also remember to add some decoupling capacitors to keep your signals smooth. I've ended up going back to the duino for my tlc projects as I can't find a decent implementation for the msp yet, which is a massive shame! I don't read my own signature! The previous controller I bought from StupidPig worked good for what I wanted at the time but now I want something more complex (sequencing). There's 3 tail lights sections on my car, seperate brake/turn signals. I'm thinking of breaking it down like this: 1 brake light, either side will be 1 MSP430 and 9 TLCs Center brake light - 1 MSP and 4 TLCs I don't need the signals to communicate as I don't need them to do intricate sequencing like the brake lights. This video gives an idea of what I am doing (sequencing): RobG 1 Quote Link to post Share on other sites
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.