Strobe Lightbar to Led

by chart W in Workshop > Lighting

2655 Views, 12 Favorites, 0 Comments

Strobe Lightbar to Led

20170926_200400_001.jpg

to convert an old light bar to led with a custom flash pattern. Using Arduino , board prototyping and 3d printing anything is possible!

Retrofit Led Circut Boards Into a Whelen 9000 Edge Light Bar

20170930_124819.jpg
20170930_124756.jpg
20170930_124841.jpg
20170930_124656.jpg
20170930_124645.jpg

The prices of strobe bulbs keep going up , they don't seem to last very long. And on my tow truck they never seemed to look as cool as the ones the law enforcement have. I've been working with some Arduino programing and I've used every bulb and power supply I could get reasonably for the strobes , so why not try something different.

the idea I chose was a 9 led array using 1w white leds. At first I soldered them on to heatsinks and made a power supply for each array. Then I decided to attach them on the board itself, I designed and etched the board. I realized after I made the board I had set the leds in parallel instead of in series, but I was still able to run the tests I needed to check for heat and over voltage. the control board consists of an Arduino Nano, 5v voltage regulator, power in connectors and multiple output connectors. I used every output available to run the lights.

Protoype Boards Ordered

20170930_124737.jpg
20170930_124724.jpg
led paralle.jpg
ledboard.jpg
cntrl board issues.jpg
ctrl board.bmp
led board.bmp

after making a series of power supply boards I decided it would be easier to order the boards from online after I had found what I wanted them to look like and designed them in Eagle. I ordered the boards from pcbgogo.com.

this is the first time I ever sent out to have boards made. what you get is nothing short of professional. they will email you if they find any issues and make corrections before they manufacture the boards. ( getting another batch of boards for some other projects next week ) .

I found I had made some mistakes with the boards. I was still able to use these for my first light bar, while noting the issues I need to fix for my next retrofit. some of the issues I made were , a power lead too close to the output on the Led board and a hole in the control board.

Connector From the Board to the Housing

20170926_200326.jpg
20170926_195724.jpg
set VR.jpg

to make the circuit board slides I used Sketchup and my (no Name, Pruisa wannabe) 3d Printer. the slides are 60 mm in length and I would probably make them longer on my next go round. the Control Board slides are shorter in length, but taller to make up for the difference in the board size. the led end mount I will offset it some on the next one I do. I did decide the glue the boards to the slides using Gorilla glue, just to keep down on vibration and the possibility of the board falling out of the slides.

Nano Code

20170930_124756.jpg
code is as follows, I originally wrote is as each individual write on and write off, found an article on Port Manipulation ... So much easier..



// light 1
/* not needed when using port manniputlation. left this in here to show what pin each light hooks up to int lt1a = 1; int lt1b = 0; int lt1c = 2; // light 2 int lt2a = 3; int lt2b = 4; int lt2c = 5; // light 3 int lt3a = 6; int lt3b = 7; int lt3c = 8; //light4 & 5 int lt4a = 12; int lt5a = 13; // light 6 int lt6a = 9; int lt6b = 10; int lt6c = 11; // light 7 int lt7a = 14; int lt7b = 15; int lt7c = 16; //light 8 int lt8a = 17; int lt8b = 18; int lt8c = 19; */ int A = 75; // for short delay int B = 250; // for long delay int C = 125; // chase delay int D = 200; // up and down falling time void setup() { // set all digital pins output // port register attempt DDRB = B11111111; // DIGITAL OUT 8 TO 13 DDRC = B00111111; // ANALOG OUT 0 TO 5 DDRD = B11111111; // DIGITAL OUT 0 TO 7 } void loop() { // CROSS FLASH PORTB = B00000000; PORTC = B00000000; PORTD = B00000000; // ALL LOW PORTD = B00000111; // DIGITAL WRITE high 1,2,3 LT1 PORTB = B00001110; // LT6 delay(A); PORTD = B00000000; // write low PORTB = B00000000; delay(A); PORTD = B00000111; // DIGITAL WRITE PINS 1,2,3 LT1 PORTB = B00001110; // LT6 delay(A); PORTD = B00000000; // write low PORTB = B00000000; delay(A); PORTD = B00000111; // DIGITAL WRITE PINS 1,2,3 LT1 PORTB = B00001110; // LT6 delay(A); PORTD = B00000000; // write low PORTB = B00000000; delay(B); PORTD = B11000000; // LT3 , ON PORTB = B00000001; // LT3 C PORTC = B00111000; // LT8 delay(A); PORTD = B00000000; // OFF PORTB = B00000000; PORTC = B00000000; delay(A); PORTD = B11000000; // LT3 , ON PORTB = B00000001; // LT3 C PORTC = B00111000; // LT8 delay(A); PORTD = B00000000; // OFF PORTB = B00000000; PORTC = B00000000; delay(A); PORTD = B11000000; // LT3 , ON PORTB = B00000001; // LT3 C PORTC = B00111000; // LT8 delay(A); PORTD = B00000000; // OFF PORTB = B00000000; PORTC = B00000000; delay(A); PORTD = B00111000; // LT2 ON PORTC = B00000111; // LT7 ON PORTB = B00110000; // LT4 AND LT5 delay(A); PORTD = B00000000; PORTC = B00000000; PORTB = B00000000; delay(A); PORTD = B00111000; // LT2 ON PORTC = B00000111; // LT7 ON PORTB = B00110000; // LT4 AND LT5 delay(A); PORTD = B00000000; PORTC = B00000000; PORTB = B00000000; delay(A); PORTD = B00111000; // LT2 ON PORTC = B00000111; // LT7 ON PORTB = B00110000; // LT4 AND LT5 delay(A); PORTD = B00000000; PORTC = B00000000; PORTB = B00000000; delay(B); //2ND TIME PORTD = B00000111; // DIGITAL WRITE high 1,2,3 LT1 PORTB = B00001110; // LT6 delay(A); PORTD = B00000000; // write low PORTB = B00000000; delay(A); PORTD = B00000111; // DIGITAL WRITE PINS 1,2,3 LT1 PORTB = B00001110; // LT6 delay(A); PORTD = B00000000; // write low PORTB = B00000000; delay(A); PORTD = B00000111; // DIGITAL WRITE PINS 1,2,3 LT1 PORTB = B00001110; // LT6 delay(A); PORTD = B00000000; // write low PORTB = B00000000; delay(B); PORTD = B11000000; // LT3 , ON PORTB = B00000001; // LT3 C PORTC = B00111000; // LT8 delay(A); PORTD = B00000000; // OFF PORTB = B00000000; PORTC = B00000000; delay(A); PORTD = B11000000; // LT3 , ON PORTB = B00000001; // LT3 C PORTC = B00111000; // LT8 delay(A); PORTD = B00000000; // OFF PORTB = B00000000; PORTC = B00000000; delay(A); PORTD = B11000000; // LT3 , ON PORTB = B00000001; // LT3 C PORTC = B00111000; // LT8 delay(A); PORTD = B00000000; // OFF PORTB = B00000000; PORTC = B00000000; delay(B); PORTD = B00111000; // LT2 ON PORTC = B00000111; // LT7 ON PORTB = B00110000; // LT4 AND LT5 delay(A); PORTD = B00000000; PORTC = B00000000; PORTB = B00000000; delay(A); PORTD = B00111000; // LT2 ON PORTC = B00000111; // LT7 ON PORTB = B00110000; // LT4 AND LT5 delay(A); PORTD = B00000000; PORTC = B00000000; PORTB = B00000000; delay(A); PORTD = B00111000; // LT2 ON PORTC = B00000111; // LT7 ON PORTB = B00110000; // LT4 AND LT5 delay(A); PORTD = B00000000; PORTC = B00000000; PORTB = B00000000; delay(B); // CHASE FLASH PORTC = B00000000; // TURNS OFF WHEN REPEATS PORTD = B00000111; //LT1 ON delay(C); PORTD = B00000000; PORTD = B00111000; //LT2 delay(C); PORTD = B11000000; //LT3 PORTB = B00000001; // LT3A delay(C); PORTD = B00000000; PORTB = B00010000; // LT4 delay(C); PORTB = B00100000; // LT5 ON , 4 OFF delay(C); PORTB = B00001110; // LT6 ON , 5 OFF delay(C); PORTB = B00000000; PORTC = B00000111; // LT7 ON delay(C); PORTC = B00111000; // LT8 ON delay(C); // 2ND TIME AROUND PORTC = B00000000; // TURNS OFF WHEN REPEATS PORTD = B00000111; //LT1 ON delay(C); PORTD = B00000000; PORTD = B00111000; //LT2 delay(C); PORTD = B11000000; //LT3 PORTB = B00000001; // LT3A delay(C); PORTD = B00000000; PORTB = B00010000; // LT4 delay(C); PORTB = B00100000; // LT5 ON , 4 OFF delay(C); PORTB = B00001110; // LT6 ON , 5 OFF delay(C); PORTB = B00000000; PORTC = B00000111;// LT7 ON delay(C); PORTC = B00111000;// LT8 ON delay(C); // THIRD PORTC = B00000000; // TURNS OFF WHEN REPEATS PORTD = B00000111; //LT1 ON delay(C); PORTD = B00000000; PORTD = B00111000; //LT2 delay(C); PORTD = B11000000; //LT3 PORTB = B00000001; // LT3A delay(C); PORTD = B00000000; PORTB = B00010000; // LT4 delay(C); PORTB = B00100000; // LT5 ON , 4 OFF delay(C); PORTB = B00001110; // LT6 ON , 5 OFF delay(C); PORTB = B00000000; PORTC = B00000111; // LT7 ON delay(C); PORTC = B00111000; // LT8 ON delay(C); // CLEAR LT8 PORTC = B00000000; // LT8 OFF // // UP AND DOWN FALLING PORTD = B01001010; // LT1A LT2A LT3A PORTB = B00000010; // LT6A PORTC = B00001001; // LT7A AND LT8A delay(D); PORTD = B10010001; // LT1B LT2B LT3B PORTB = B00000100; // LT6B PORTC = B00010010; // LT7B LT8B delay(D); PORTD = B00100100; // LT1C 2C PORTB = B00001001; // LT 3C LT 6C PORTC = B00100100; // LT7C LT8C delay(D); // REPEAT 3 TIMES PORTD = B01001010; // LT1A LT2A LT3A PORTB = B00000010; // LT6A PORTC = B00001001; // LT7A AND LT8A delay(D); PORTD = B10010001; // LT1B LT2B LT3B PORTB = B00000100; // LT6B PORTC = B00010010; // LT7B LT8B delay(D); PORTD = B00100100; // LT1C 2C PORTB = B00001001; // LT 3C LT 6C PORTC = B00100100; // LT7C LT8C delay(D); PORTD = B01001010; // LT1A LT2A LT3A PORTB = B00000010; // LT6A PORTC = B00001001; // LT7A AND LT8A delay(D); PORTD = B10010001; // LT1B LT2B LT3B PORTB = B00000100; // LT6B PORTC = B00010010; // LT7B LT8B delay(D); PORTD = B00100100; // LT1C 2C PORTB = B00001001; // LT 3C LT 6C PORTC = B00100100; // LT7C LT8C delay(D); PORTD = B01001010; // LT1A LT2A LT3A PORTB = B00000010; // LT6A PORTC = B00001001; // LT7A AND LT8A delay(D); PORTD = B10010001; // LT1B LT2B LT3B PORTB = B00000100; // LT6B PORTC = B00010010; // LT7B LT8B delay(D); PORTD = B00100100; // LT1C 2C PORTB = B00001001; // LT 3C LT 6C PORTC = B00100100; // LT7C LT8C delay(D); // // CLEAR ALL HIGHS PORTD = B00000000; PORTB = B00000000; PORTC = B00000000; // }

Downloads

Sequence

sequence.jpg
ctrl brd sequence.jpg

the illustration kind of speaks for itself here, the numbers correspond to the light positon which corresponds to the pins which go back to the port within the code.