Ford Escape Automobiles Forum banner

Microcontroller controlled lighting system.

6933 Views 24 Replies 7 Participants Last post by  Crimson13
My newest project: Arduino controlled led system.

I'm cross posting this on a few sites so please let me know if something doesn't make sense.

Arduino is an open-source electronics prototyping platform, designed to make the process of using electronics in multidisciplinary projects more accessible. The hardware consists of a simple open hardware design for the Arduino board with an Atmel AVR processor and on-board I/O support. The software consists of a standard programming language and the boot loader that runs on the board.

What I am hoping to accomplish is a multi "zoned" led system for my car.
I participate in various things that allow me to use warning lights on my vehicle, some things are for a local government agency and some is for other things that involve police escorts. Currently I have a cheap led flasher from China that I bought off of ebay before the foreign sellers started jacking their shipping charges. The flasher came with 2 sets of lights with each set having 3 pods of 3 leds. The flasher has 3 patterns, mode A is side 1 flashes 4x then side 2 flashes 4x, mode B is alternating flash (1,2,1,2,1,2,1,2,1,2,1,2…..), mode C is both sides at the same time. These leds are amber and are mounted in the rear window. Since getting the flasher I have added some white led strips in the grill and tied them into the wires for the other lights.
So I don't have many lights and would like to add more. But real warning leds are expensive and I don't have a few hundred to drop into that. What I would like to do is have an arduino control all the leds around the car independently. Attached is a map of the different "zones" that I would like to control. The front and rear have two zones so the leds can have alternating flash patterns.
There are a few goals I have for this project to be able to do.
1. Individual zone control. (on, off, strobe, etc…)
2. Preset patterns or modes. (zones 11+12 alternate, zones 21,22,23,24 on, etc…)
3. Use a LCD display to scroll through the zones and modes.
Bonus Goals!!
4. Use RGB leds and control each color channel in the zones.
5. Have an additional zone for a traffic advisor (arrow stick).

Light zone map. Zone 24 would be the cargo area.

Possible RGB Leds to use. Each led has a chip which makes each led individually addressable with only using 2 pins from the arduino for the whole strand.

I was going to use a playstation controller joystick for navigation of the menu, but I recently saw that someone has figured out a library for a wii nun-chuck so I can use the joystick, button, and accelerometers with only 2 pins and power.

My whole deal with the number of pins I use is because the Arduino only has so many output pins and the less I use for somethings means the more zones I can have without getting into shift registers, which is a bit over my head atm.
See less See more
21 - 25 of 25 Posts
This is by far one of the coolest electrical mods I've heard of... I may have to look into doing a zoned LED system based on my stereos equalizer... :D Can't wait to see how yours turns out!
Crimson13 said:
When I tried to test the mosfets I was having some issues. They would only have the leds stay on and not switch off and on like they should.

So with some help I figured out the problem with the mosfets. Well the problem was more of how I was testing them. The gate of the mosfet needs to be able to "drain" the charge that's on that pin so it can go "low" and then when you send a signal (5v) to it, it goes "high". So to fix this I put ground on the gate and the leds turned off, and as soon as I hit it with 5v they turned on. So I'll have to add a 10k pull down resistor on the gate to gnd.
Yes, the gate capacitance of an IRL510 or the like is only a few tens of pF, but the MOSFET requires so little gate current (picoamperes) that it will stay "on" for minutes when the input is disconnected.

I am surprised, though, that the Arduino outputs did not do the pulldown themselves. Most logic outputs are complementary MOS and pull down as well as up. Which Arduino output pins were you using, and which model of Arduino?

One other thing. With 5-volt gate drive, you need to use IRL and not IRF series MOSFETS. The IRF series will appear to work but will not turn quite fully "on" with +5 volts on the gate. As a result, their resistance does not go as low as it should, and they get hotter than they should.

You are inspiring me to complete my fog light pulse width modulator. No microprocessors, but I want to be able to turn the fog lights on by themselves with variable brightness, including very low brightness. This is for use at astronomy events when I need to move the car a short distance but don't want to blind people with bright lights. Naturally, before driving with dim lights, I carefully inspect the space in front of the car.
See less See more
I just realized I was in this thread back in November! At the time I wasn't familiar with Arduino. Now I am, at least somewhat.
Thanks guys! I'm still working on this but slowly. I'm redoing some of it as I'm changing the way I talk to the lcd screen (changing to i2c) This will free-up a bunch of pins on the arduino for more lights!

@astro, I'm using an Ardunio Uno. I know when I didn't have the pulldown resistors there were times things got stuck on. I may pickup some IRL mosfets instead but we'll see, I can get this working as a proof of concept first and then worry about getting it to be as efficient as possible.

I'll try to update the worklog later today if I get the time.
So finally got a chance to work on this some more.

I tried to talk to the LCD via I2C but the lcd and the nunchuck (also using I2C) didn't play well with each other. Soooo, I'm using SPI instead. I was also able to use some of the analog pins for this. I2C would have freed up the most amount of pins, SPI still frees up a bunch.

I think next up will be getting the RGB pixels working for the interior lighting.

Thanks for watching!
21 - 25 of 25 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.