WB2812B Vehicle Suplimental light project
redheadedrod
Posts: 78
There are a few good threads about how to control these lights but I thought I would start a new one because my first project using these lights is intended to get my feet wet with the whole idea of the Prop.
I will likely write this in Spin for the experience more than anything else.
For those familiar with the "Line of fire" lighting some trucks have under the tail gate I want to make something similar but will likely buy some 144led/meter or 96led/meter strips.
This is intended as a fun project and see how it turns out.
At this time for developing purposes I have some Project boards and some Parallax WB2812B LED modules.
I will likely mount the project board and all related electronics in a weather proof box a couple feet from the light strips.
I have an automotive to 5 volt 25 watt power supply to power this with.
So from reading threads such as this one:
http://forums.parallax.com/showthread.php/149456-WS2811-WS2812-driver-for-the-Propeller/page5?highlight=ws2812b
If I understand these strings correctly I really need to run a 5 volt supply to them and the data in line should also be 5 volts. In the above thread there is a diagram in message #87 using a TC4427 chip. I am a software guy so I am not sure what I am reading with the schematic.
The INA and INB lines look like they have 10k resistors going to ground with the ground having a .1 microfarad capacitor to 3.3 volts. VDD is the 5 volts I want to supply to the LED modules.
So if I am looking at this right do I Ground both the Propeller board and the light strip to the same ground? And then my input line can go to EITHER INA or INB so this could actually be used to drive two strips?
If I wanted to feed the last data line back to the propeller could I then just use a resistor to drop the 5 volts to the 3.3 for the I/O line? This would be used solely to count the number of LED's in the strip by sending ever longer string of commands until the command came back to the prop.
And lastly, I will want to actually be able to accept inputs into the prop for triggering the lighting that I want. What would be the best way to drop the automotive voltage to be able to read a simple on off as well as protect the IO pin?
I will be tapping off the Brake light, turn signals and reverse lights to trigger the intended operation of the string of lights as well as a possible additional input for alarm notification and possibly running lights depending on the brightness of the strip.
For running light I would have the strip on red but only half luminance. For reverse the strip would go white. Brake light would go all red. Turn signal would be one side yellow with progressive flash (an out chase pattern towards side turning to.). Hazards would be indicated if both turn signals were flashing. I would have a different flash pattern for hazards. Alarm flash would be a status flash.. Depending on energy usage could possibly run a "knight rider" type chase pattern for the alarm indication. I would guess with the use of the 25 watt supply though that I would quickly kill my battery though even if I am only lighting a couple of the LED's in the strip.
So the big thing I am trying to sort out is the hardware to run this thing... I have more than enough IO pins...
So to reiterate what I understand I power the Prop and the strip from the 5 volt supply. The prop will use a voltage regulator to drop to the 3.3 volts it needs and I can maintain the 5 volts to drive the strip directly. Both use same ground. Use the TC4427 chip to power up to 2 Data inputs into the strips. ( I only need one so one would go unused.) So I need a total of 4 wires to go to my strips... DI, DO (For counting purposes from last LED), GND, +5V
I want to be able to read in the 5 volt data "out" line as well as multiple 12volt Automotive lighting inputs. Not sure how to do this... Guessing I can use a simple resistor setup for the 5 volt in line since it will only be 5 volts or off. For the automotive input since it could be anywhere from 12 volts to 30 volts(in spikes) I am guessing I want to use a voltage divider circuit. My only experience with voltage dividers was almost 30 years ago when we were taking 5 volts and dropping it to 4-20 milivolt DAC inputs. I would then need a trigger value for the on and off.. Anything say 10 volts and over would be considered an 'on'.
Reading in the data out line to count would only need to be done as a first time calibration but could be forced if necessary.
As to persistence, will I be able to save the program and the length to non volatile memory on chip or do I need to add something to the board to do this?
This will be my first actual project with this so I am not sure.. I probably will find some of my answers in the documentation I have with the learning kit I bought a year ago when they were on sale that came with a board of education, book on spin and book on the propeller operation but I haven't really read it too far yet. I am a computer science major with about 5 semesters worth of work left but am taking the summer off to try doing some of my projects...
I will likely write this in Spin for the experience more than anything else.
For those familiar with the "Line of fire" lighting some trucks have under the tail gate I want to make something similar but will likely buy some 144led/meter or 96led/meter strips.
This is intended as a fun project and see how it turns out.
At this time for developing purposes I have some Project boards and some Parallax WB2812B LED modules.
I will likely mount the project board and all related electronics in a weather proof box a couple feet from the light strips.
I have an automotive to 5 volt 25 watt power supply to power this with.
So from reading threads such as this one:
http://forums.parallax.com/showthread.php/149456-WS2811-WS2812-driver-for-the-Propeller/page5?highlight=ws2812b
If I understand these strings correctly I really need to run a 5 volt supply to them and the data in line should also be 5 volts. In the above thread there is a diagram in message #87 using a TC4427 chip. I am a software guy so I am not sure what I am reading with the schematic.
The INA and INB lines look like they have 10k resistors going to ground with the ground having a .1 microfarad capacitor to 3.3 volts. VDD is the 5 volts I want to supply to the LED modules.
So if I am looking at this right do I Ground both the Propeller board and the light strip to the same ground? And then my input line can go to EITHER INA or INB so this could actually be used to drive two strips?
If I wanted to feed the last data line back to the propeller could I then just use a resistor to drop the 5 volts to the 3.3 for the I/O line? This would be used solely to count the number of LED's in the strip by sending ever longer string of commands until the command came back to the prop.
And lastly, I will want to actually be able to accept inputs into the prop for triggering the lighting that I want. What would be the best way to drop the automotive voltage to be able to read a simple on off as well as protect the IO pin?
I will be tapping off the Brake light, turn signals and reverse lights to trigger the intended operation of the string of lights as well as a possible additional input for alarm notification and possibly running lights depending on the brightness of the strip.
For running light I would have the strip on red but only half luminance. For reverse the strip would go white. Brake light would go all red. Turn signal would be one side yellow with progressive flash (an out chase pattern towards side turning to.). Hazards would be indicated if both turn signals were flashing. I would have a different flash pattern for hazards. Alarm flash would be a status flash.. Depending on energy usage could possibly run a "knight rider" type chase pattern for the alarm indication. I would guess with the use of the 25 watt supply though that I would quickly kill my battery though even if I am only lighting a couple of the LED's in the strip.
So the big thing I am trying to sort out is the hardware to run this thing... I have more than enough IO pins...
So to reiterate what I understand I power the Prop and the strip from the 5 volt supply. The prop will use a voltage regulator to drop to the 3.3 volts it needs and I can maintain the 5 volts to drive the strip directly. Both use same ground. Use the TC4427 chip to power up to 2 Data inputs into the strips. ( I only need one so one would go unused.) So I need a total of 4 wires to go to my strips... DI, DO (For counting purposes from last LED), GND, +5V
I want to be able to read in the 5 volt data "out" line as well as multiple 12volt Automotive lighting inputs. Not sure how to do this... Guessing I can use a simple resistor setup for the 5 volt in line since it will only be 5 volts or off. For the automotive input since it could be anywhere from 12 volts to 30 volts(in spikes) I am guessing I want to use a voltage divider circuit. My only experience with voltage dividers was almost 30 years ago when we were taking 5 volts and dropping it to 4-20 milivolt DAC inputs. I would then need a trigger value for the on and off.. Anything say 10 volts and over would be considered an 'on'.
Reading in the data out line to count would only need to be done as a first time calibration but could be forced if necessary.
As to persistence, will I be able to save the program and the length to non volatile memory on chip or do I need to add something to the board to do this?
This will be my first actual project with this so I am not sure.. I probably will find some of my answers in the documentation I have with the learning kit I bought a year ago when they were on sale that came with a board of education, book on spin and book on the propeller operation but I haven't really read it too far yet. I am a computer science major with about 5 semesters worth of work left but am taking the summer off to try doing some of my projects...
Comments
Do you want the whole thing to turn on at once, or do you want it to start in the middle, and turn on more then longer the brakes are applied?
I'm not sure about all the options to monitor 12V lines but it might be possible to just use a series resistor. A 60K ohm resistor should keep the Prop safe from up to 30V.
You might want to consider 74HC165 parallel to serial shift registers for reading the inputs. These are available in 16-pin DIP packages and could be used in a socket to make them easier to replace. This would allow you to monitor 8 switches per chip. One or more chips could be monitored with three Propeller I/O pins.
Most Propeller boards include an EEPROM. This would be used to store both the program and the data. EEPROM is non-volatile.
They are fine for use in Traffic in any area...
I am calling it Vehicle supplemental lighting because it is in addition to the current lighting not replacing any of it.
And yes line of fire is the red light under the tailgate.
The lighting patterns will be different according to the intended end.
For instance, the brake lights would be all red and full brightness.
Turn signal would be amber with chasing lights pointing to direction of turn starting from middle unless the brake light is on then only outter 1/3rd.
I am looking to use RGB LED's because I have lots of options. For on road use it will only use red and amber.
There are "fire and ice" lights for trucks where red is for brakes, turn signals for the "fire" and white when in reverse for "ice".
As long as I don't use colors to the rear other than red or amber and don't have any "strobe" to it then I am fine with this for legal reasons. Yes if I was showing blue, green or white from the rear or had a strobe then there would be an issue.
I will likely just use series resistors if I can be sure they will protect the inputs.
Have to figure out the right size then to drop the 5 volts from the LED strip to feed into the prop as well.