View Full Version : Rear Foglamp Controller


OverLOAD
02-21-2004, 08:49 PM
After getting my rear fog-lamp installed a few weeks back, I got the itch to make it do more than just turn off and on when you pushed the button, and I got a few cheap and simple microcontrollers that would have a few spare IO lines even after I did just the simple push button, so what I did, was made a controller that does Pulse Width Modulation on the power line of the lamp.

I wanted a bit more than the basic setup, I connected an IO line to each of the parking, reverse, and brake lights, so that I could duty cycle the lamp depending on the situation:

Here's the before picture:

OverLOAD
02-21-2004, 08:50 PM
And here's after, which the parking lights on:
Lamp @ 25% power

OverLOAD
02-21-2004, 08:50 PM
And here'swith the brake on:
Lamp @ 50% power

OverLOAD
02-21-2004, 08:51 PM
And here's the override with the dash button turned on:
Lamp @ 100% power

OverLOAD
02-21-2004, 08:54 PM
Here's a picture of the controller box in the trunk just before installation:

The trunks got all the innards pulled out so I could run the power and control + lamp lines to the dash button, you might pick out the brightly colored wires running from left to right, and the vampire clips/wire taps next to the brake/revers lamp holders:

OverLOAD
02-21-2004, 08:55 PM
Here's a pic of the rear wiring running between the seat and the door channel (with the molding and the seat removed)

chinx
02-21-2004, 08:55 PM
nifty

was the fog lamp expensive and hard to wire/install?

OverLOAD
02-21-2004, 08:56 PM
And heres a picture of the front fuse box, where I tapped in for power, and ran the switch and switch lamp lines up to the dash.

I tapped in to power from the 'cigar' fuse line, Since I don't plan on putting much on this line, and it's rated for 15A.. The rear bulb and control box only draws about 1A at full power.

p.s. I soldered the bright wires together afterwards where they were taped together ;)

OverLOAD
02-21-2004, 08:58 PM
Here's a picture of the control unit circuit board outside of the box :

OverLOAD
02-21-2004, 09:00 PM
Here's a picture of the back of the circuit board, please excuse the burning and scarring on this board. I had originally used this board for a different purpse, and pulled everything off quickly with my 100W soldering iron ;)

OverLOAD
02-21-2004, 09:02 PM
Here's a picture of the switch on the dash.... Whoops, no picture of this yet..

It's the two part Lamp/DCS switch that I ordered from CanZoomer. It's illumination is powered from the rear lamp, so that it shows up at the same relative brightness level as the rear fog lamp, so it's a neat indicator. I can actually tell when my brake lights come on now.

RotorGeek
02-21-2004, 09:08 PM
This should be in the new DIY forum. Great work

OverLOAD
02-21-2004, 09:11 PM
The fog lamp originally came from Canzoomer, and it's listed on his price list for US$89? I didn't get the complete kit, because I didn't think it would do all this, and it was more than $200.

It took me about 2-3 hours to do all the circuit board design, another 3 hours to build the board, and probably about 5 hours to write the software for the microcontroller, since my partner is the microcontroller expert, I needed a small project to raise my awareness of programming microcontrollers.

The total cost of the parts for the controller ran somewhere around $15, with me re-using some old computer connectors I had around, and about half of that cost being the wiring from the trunk to the fusebox/switch plus the wire taps, plus the two-way switch (about $32? also from CanZoomer).

So, all told, about 10 hours, plus $150 and I have a very unique and functional rear fog light, which doubles as a low running lamp, and brake lamp, that automatically comes on in reverse, or when I push the override button.. ;)

OverLOAD

StealthTL
02-21-2004, 09:16 PM
That is amazing.

I am humbled....I bought the lamp and the two-part switch from 'Zoomer, but I thought cutting the HOLE was the hard part! I just installed it, tapped into the rear light circuit so it would be always on (unless switched off) then decided it was too bright with the stock bulb, and put some L.E.D's in instead....

You take on the problem is awesome, and I really like the indicator light being on the same circuit, hence the same relative output! Brilliant!!

S

brothervoodoo
02-21-2004, 09:17 PM
Have you written or do you plan to write a simple DIY on setting up the rear Fog via the on/off switch. I assume a fuse and and switch will need to be installed?

OverLOAD
02-21-2004, 09:22 PM
Originally posted by brothervoodoo
Have you written or do you plan to write a simple DIY on setting up the rear Fog via the on/off switch. I assume a fuse and and switch will need to be installed?

Nope, I didn't do this, presume that you mean StealtTL...

I pulled power off the post-fuse side of the drivers door side fuse box, so it's already fused, plus if you look at the picture of the top of the circuit board, you'll see a honking big glass tube fuse, hard to believe that was the smallest fust I could get. Like $1.50 from radio shack for two holders, I put a 3.5A fuse in it and fuses from local auto store are dirt cheap, like $0.50 for 5..

The wiring for the switch was easy, but still no pics of that yet either, I'll get out into the garage tomorrow and post the rest of the shots later, ;)

OverLOAD

OverLOAD
02-22-2004, 08:06 AM
Here's a picture of the switch, with the parking lights on:

OverLOAD
02-22-2004, 08:07 AM
And here's the pic with the brake on:

OverLOAD
02-22-2004, 08:08 AM
And here's with the 100% switch override/reverse on:

OverLOAD
02-22-2004, 08:10 AM
Here's the picture of the wiring for the switch:

The wiring goes from the bottom, like this: Lamp power, Ground, ground, upper switch, lower switch.

I wired the two grounds together with my green wire, the blue wire is the power for the lamp connected to the bottom pin, and the yellow wire goes to the on contact for the upper switch to turn the override on.

This leaves me one unused position on the switch, where it currently says DCS off..

OverLOAD

93rdcurrent
02-22-2004, 10:39 AM
It looks very nice. I think I will P/M you about this.

Omicron
02-22-2004, 05:21 PM
Damn OverLOAD, that is freakin AWESOME. You are DA MAN, I'm impressed - that's EXACTLY what I ultimately wanted to do with my rear fog, which is why I haven't hooked it up yet. You've got MY nomination for the "Coolest mod of the year" for this one!

A PM is on the way to you... :D

Omicron
02-22-2004, 05:25 PM
Just noticed something else: You left your other DSC Off switch in place. Is it still doing the DSC? If so, why didn't you use the new switch and free up a switch position? Inquiring minds wanta know... ;)

OverLOAD
02-22-2004, 05:36 PM
Originally posted by Omicron
Just noticed something else: You left your other DSC Off switch in place. Is it still doing the DSC? If so, why didn't you use the new switch and free up a switch position? Inquiring minds wanta know... ;)

You know how hard those switches are to get out? Dang... Plus, the normal DCS OFF switch has regular illumination. Plus I figured that I might come up with a use for the other switch some time down the road and I might regret tying the two together.

I didn't even pull the other switch out, I don't know if the harness is the same, but it probably is, I suppose you could use it for that if you preferred.

Regards,

OverLOAD

Omicron
02-22-2004, 06:30 PM
Logical. You can always hook it up later if you need that switch position for something... and I have a feeling you will. ;)

zyran
02-22-2004, 07:51 PM
I think what OverLOAD has been doing is a bit far more complicated that I want. I wouldn't mind having the fog light as my fourth brake light. Without any microcontrollers and what not.
I'm not experienced in electronics at all, but could it just be as simple as connecting the fog light wiring to the brake light wiring?
That's pretty much what I want. :D

OverLOAD
02-22-2004, 08:04 PM
Originally posted by zyran
I think what OverLOAD has been doing is a bit far more complicated that I want. I wouldn't mind having the fog light as my fourth brake light. Without any microcontrollers and what not.
I'm not experienced in electronics at all, but could it just be as simple as connecting the fog light wiring to the brake light wiring?
That's pretty much what I want. :D

Yup, it works, only problem is that the 4th lamp is too bright if you do that.. you could wire up some series resistors (BIG resistors to dissipate about 10Watts) to reduce the brightness.. Kind of innefficient, but it works.. If you want to do that, a better choice would be a 25Watt resistor, of about 15 Ohms.. it would work well and have enough reserve power handling to not catch stuff on fire.. ;)



Regards,

OverLOAD

Omicron
02-22-2004, 09:46 PM
Yeah, catching stuff on fire is baaaad. ;)

zyran
02-23-2004, 04:36 AM
Oooh cool.. thanks a lot. Maybe I could find a guy in this part world to help me out. ;)

broose
02-26-2004, 07:14 PM
I love what you've done Overload! I also bought just the light and the dash switch (I got the specific fog light switch and not the dual switch) from Canzoomer. My car's in storage and it's been too cold to really do anything with it yet.

I have a mechanic friend who is trying to find me the correct harnesses to connect to the light and the switch. Where were you able to find those? Do you think you can help me find them?

I look forward to learning more about what you've done. This is exactly what I want to do. I didn't want to just add it as another brake light, but I figured that if it was strictly a fog light, it would see very limited use. Your idea makes the best use of this cool mod.

Congrats on your ingenuity. You are a true asset to this forum.

OverLOAD
02-26-2004, 08:03 PM
Thanks for the kind words.

I did most of my work on my unheated garage floor installing that lamp. It's not too warm, but the car is fun, what can I say?

I wish I had gotten the correct connectors, I know that it'll be about the biggest pain in the butt though. Mazda doesn't sell spare parts like that. You can only get connectors as part of harness, and that's usually $$$. My budget for the fog lamp was already getting up there, so I just bought a couple of round pin connectors, bent them flat, shoved them in the fog lamp harness pins, hot-melt sealed the whole shebang closed and hoped for the best. If water gets in there and shorts my connection, I've got a fuse in the controller box to replace when it dries out, no big deal.

On the switch end, I got even less patient. I clipped off the exposed side of the switch and soldered my connector wires directly to the switch. It's pretty reliable, but not very pretty. I'm sure that the connectors can be sourced, but probably only in lots of 1000 or something rediculous like that. I'll save hard work like that for bigger and better projects that are more than 2 or 3 wire connection points.

If you really are set on having those connectors, your local Mazda dealer will be able to get you the whole harness assembly, just be prepared to be shocked by the cost. The fog lamp connector may not be so difficult to get, since those connectors might be more common. I didn't check but it's probably the same as the brake lamp connectors.

Thanks again, and good luck!

OverLOAD

Originally posted by broose
I love what you've done Overload! I also bought just the light and the dash switch (I got the specific fog light switch and not the dual switch) from Canzoomer. My car's in storage and it's been too cold to really do anything with it yet.

I have a mechanic friend who is trying to find me the correct harnesses to connect to the light and the switch. Where were you able to find those? Do you think you can help me find them?

I look forward to learning more about what you've done. This is exactly what I want to do. I didn't want to just add it as another brake light, but I figured that if it was strictly a fog light, it would see very limited use. Your idea makes the best use of this cool mod.

Congrats on your ingenuity. You are a true asset to this forum.

Lock & Load
02-27-2004, 09:46 PM
Overload

Great mod you are a bright sparky , talented and modest he he he .

Have you changed your car battery to get one with extra ampage?????

Our current battery i believe only puts our 360 amp.

cheers
michael

OverLOAD
02-28-2004, 08:10 AM
Originally posted by Lock & Load
Overload

Great mod you are a bright sparky , talented and modest he he he .

Have you changed your car battery to get one with extra ampage?????

Our current battery i believe only puts our 360 amp.

cheers
michael

Not yet, but I looked at a smokin' optima red top the other day. 900 cold cranking Amps? That'd start up the 8 in half the time.. ;)

And, with flattery like that, you have me suspicious that you want one of these lamp controllers.. ;)

Regards,

OverLOAD

Lock & Load
02-28-2004, 03:41 PM
Overload

As soon as i get my stage 1 and 2 plus my exhaust mods done and have the energy left i certainly will look at doing your mod .

I am not pissing in your pocket ( old Australian saying similar to crawling up your ass .

You deserve the KUDOS for a innovative and excellent mod great to see that some people still think outside the square .ha ha ha .

cheers
michael