jumper2high
Full Member level 3
Hello,
I've been making a car blinker control device using a digital microcontroller from Microchip. The transistor's (BD241) Emitter is the "output" that connects through switch in the steering wheel, to the lights. The 1N4007 diode (connected to BD241's collector) is used to make a .7V drop used to detect current flow through the transistor. If the switch in the steering wheel is open - there's no voltage drop. Once it's closed, and current starts flowing through the diode and transistor, the PNP transistor pulls one of the microcontroller's pins to high, which signals that the switch was closed and that it should start 'blinking' and 'beeping' the right stuff.
Now, the problem is: Every time I turn OFF some of the "inductive" loads on the car (cooler fan relay, rear window heat relay....) the MCU detects as if the blinker switch was closed and beeps once. I originally thought it was just a case of some inducted current being fed through GND and making it go just above the threshold for the microcontroller. I added a diode to the GND connector as well, thinking that would stop it, but it didn't.
The program code on the MCU waits until pin GP2 (GP3 on schematic, by mistake) goes high, and once it does, it beeps and blinks, then checks again and so on.
I've been making a car blinker control device using a digital microcontroller from Microchip. The transistor's (BD241) Emitter is the "output" that connects through switch in the steering wheel, to the lights. The 1N4007 diode (connected to BD241's collector) is used to make a .7V drop used to detect current flow through the transistor. If the switch in the steering wheel is open - there's no voltage drop. Once it's closed, and current starts flowing through the diode and transistor, the PNP transistor pulls one of the microcontroller's pins to high, which signals that the switch was closed and that it should start 'blinking' and 'beeping' the right stuff.
Now, the problem is: Every time I turn OFF some of the "inductive" loads on the car (cooler fan relay, rear window heat relay....) the MCU detects as if the blinker switch was closed and beeps once. I originally thought it was just a case of some inducted current being fed through GND and making it go just above the threshold for the microcontroller. I added a diode to the GND connector as well, thinking that would stop it, but it didn't.
The program code on the MCU waits until pin GP2 (GP3 on schematic, by mistake) goes high, and once it does, it beeps and blinks, then checks again and so on.