Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Automatically blink signal light

Automatically blink signal light

This is a circuit to automatically blink the turn signal lights of a car a number of times after a short tap of the turn signal handle. When you tap the turn signal handle shorter than a configurable time, the turn signal lights will automatically blink a configurable number of times.
This feature is often found in newer cars these days, but not in my 2000 Volkswagen Passat. Instead of buying a new car, I decided to upgraded it with an Atmel ATtiny12.

When you tap the turn signal handle shorter than a configurable time (around 300 msec by default), the turn signal lights will automatically blink a configurable number of times (3 times by default). This will not occur when you hold the handle for a longer time. Apart from this automatic mode, every blink period will always be completed, even when the handle is returned during a blink.

Usage

The behavior of the software can be controlled by a push button and a LED on the dashboard. You can change the blink count, blink interval, maximum activation pulse width, and the behavior of the LED. These settings are stored in EEPROM.

The circuit is connected to the emergency flasher relay that is integrated in the emergency flasher button in the middle of the dashboard. No existing connections had to be cut. The state of the turn signal lights is monitored by connecting the hot sides via 47K resistors to ATtiny12 inputs. I did not bother to clip the voltage to 5V, but relied on the internal protection diodes of the tiny12.

The signal lights are switched on with MOSFETs, driven by a transistor. An indicator LED lights when a MOSFET is switched on. The dashboard LED and button are controlled by the same two I/O pins that monitor the state of the signal lights by periodically changing the direction of these pins.

The software uses a timer that generates an interrupt every 4 msec. Most of the work is done in the interrupt handler. It takes care of debouncing the inputs, and controlling the MOSFETs and the LED. The main loop only monitors the (debounced) state of the pushbutton, to interpret the button presses.

PB0 and BP1 are normally configured as outputs, to drive the dashboard LED. When the state of the signal lights is polled in the interrupt handler, these pins are switched to inputs for a short time. And when the state of the button is polled, PB0 is configured as input and BP1 is configured as output with a high level.

Visit Here for more.







 

More Articles to Read

Blinking Christmas Lights
Blinking Christmas Lights
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adding an “extra sense” with rangefinders
Adding an “extra sense” with rangefinders
This wireless game controller looks like a rug
This wireless game controller looks like a rug
How to run your ESP8266 for years on a battery
How to run your ESP8266 for years on a battery
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Making beats on a tiny Arduino DJ controller
Making beats on a tiny Arduino DJ controller
Qinsi-QS5100 Sn63Pb37 solder profile
Qinsi-QS5100 Sn63Pb37 solder profile
Water Detection System
Water Detection System
Professional Hi-Fi 15W Tube Amplifier circuit
Professional Hi-Fi 15W Tube Amplifier circuit
This Arduino machine will judge how sick your ollies are
This Arduino machine will judge how sick your ollies are
Turn an old payphone into a boombox for ’90s hits
Turn an old payphone into a boombox for ’90s hits
Big F’n 3D printer build
Big F’n 3D printer build
Temperature alarm for boiling milk
Temperature alarm for boiling milk
QuadBot is a 3D-printable walking robot for everyone
QuadBot is a 3D-printable walking robot for everyone
MicroConverter I2C Compatible Interface
MicroConverter I2C Compatible Interface
An Arduino tachometer for your older vehicle
An Arduino tachometer for your older vehicle

Top


Shares