Help with Emergency brake light

Hello, i'm new to this forum because i need some help.

I dont no anything about scripting etc, i have knowledge of car electronics. My car 1994 Mazda MX-5 is equipped with full keyless entry, coming home lights, heated mirrors and seats, cruise control, fully programmable engine management system etc.

I Want to build a system with arduino called emergency brake lights, it is used for attention on traffic in the rear. So when you make an emergency brake the brake lights will flash rappidly, and in some cases blinkers

Is anybody willing to help me?

Here is an example, how exactly i wanna it to be. On a emergency brake, brake lights will flash rappidly and the blinkers will blink on a normal rate until i release the brake pedal http://www.youtube.com/watch?v=H9Nww7iBIrM

I have an arduino UNO and an GY-45 MMA8452 Three Axis Accelerator. Relais should be no problem

The first thing you need to think about is the legality of modifying the brake light system on your car.

The second thing that you need to think about is the advisability of modifying the brake light system on your car when you "dont no anything about scripting etc".

I can't recommend that we help you in this project.

I already had some sort of system but only brake lights and not the way i want it

It is a safety systems they also sell as aftermarket systems. But they cost over 200 dollar.

And also read that new cars after 2014 must be equipped with some sort of brake alert, alot of manufacturs already using some sort of system as standard.

Is it legal for your lights to work the way you describe? It will depend which jurisdiction you're in, but in the UK for example this would not be road legal.

If the behaviour is legal, you also have to consider whether modifying the car [u]yourself[/u] to provide that behaviour is legal or sensible. It's the sort of modification which I would expect insurers to be very interested in and I suspect would cause the insurers to load the premium or decline to cover the vehicle. Even assuming it's legal and will be accepted by your insurers you have to consider whether it's sensible to DIY. The modifications will require inhibiting the normal operation of the brake lamps (to make the brake lamps flash under braking the lamps have to be turned off while the brakes are applied) and so I don't see how the modification could be made fail-safe. Since you'd be introducing DIY hardware, firmware and wiring into the braking system there are obviously lots of new failure modes. The brake lamps are a part of the car that you really want to be reliable and you will be certainly be making them less reliable.

Apart from all those concerns about whether it's a sensible project and setting aside the consequences if you're wrong, then in simple functional terms it does not sound very difficult. But I wouldn't put it on my car.

It will only be flashing when you make an emergency brake. If normal brake the lights will work normal.

Mercedes, audi etc equip there cars with this system as standard today all around the world even in the uk. It is a proven safety feature. And soon to be standard in every new car

Vincentmiata: It will only be flashing when you make an emergency brake. If normal brake the lights will work normal.

That is what you're hoping for, but in fact any fault in your solution could prevent the brake lights from working at all, even in the 'non-emergency' case.

Have you asked your insurers whether they would continue to cover you if you fitted a DIY flashing brake light system?

Mercedes, audi etc equip there cars with this system as standard today all around the world even in the uk. It is a proven safety feature. And soon to be standard in every new car

Mercedes, Audi etc also spend millions of dollars on research and development test labs and external testing and certification to ensure their hardware and software is reliable. What's your budget? ;)

Vincentmiata: It will only be flashing when you make an emergency brake. If normal brake the lights will work normal.

Unfortunately, That is not a supportable assertion in the real world. Nobody builds hardware failures or software errors into their products on purpose, but somehow they seem to crop up anyway (ask Toyota).

To be fair, I have no doubt that a hobbyist can make a reasonably failsafe brake light modulator without millions of dollars of R&D using an Arduino and some bits from Radio Shack. But, it does require engineering in failsafes from the get-go, serious thought to risk mitigation, and careful attention to implementation details.

For example, if it were me, I might modulate only the center brake light and let the other two remain factory. I would also arrange my circuit such that the factory circuit is uninterrupted until my modulator decides to intervene, for example through the normally closed contacts of a relay. Or if I wanted to use transistors, I'd default them to "on" with a strong pullup or pulldown resistor on the base. In the event the Arduino goes out to lunch, the lights still work as intended via the switch on the foot pedal.

I'd also wire the Arduino's digital pin through an RC time delay circuit so that software can't turn the brake lights off for more than a couple hundred ms. In case the Arduino happens to go to lunch while in the middle of an off-blink, the lights will shortly come back on and stay on as long as the foot pedal is depressed.

Don't put the Arduino between the brake pedal and the brake lights with full authority.

Hey, This sounds like a cool and simple project. I never knew something like this existed until now, and I understand the point, if you have to make a quick emergency stop you want the guy behind you to know your stopping fast.

If you are "computer savvy" and can pick up code very quickly, like myself, just play around with the included arduino examples sketches. These can give you help on how to do almost anything that the bare arduino board can do. For me to spend 45 minutes writing you a sample code would be great but It would let you learn anything. As you said relays would be required to use the arduino's 5v dc to switch the lights. And as some other people said, you need to check the legality of this kind of system first. If you live in an area where one state/province allows it and another doesn't you could add another switch to deactivate the system.

Also, as you said you are new to this, I would recommend doing extensive testing before installing and using the system, if something goes wrong and all your brake lights stop working your going to have a hard time explaining to the state trooper that your Arduino malfunctioned...

But done drop the idea, everything I know if from trial and error and other peoples projects. Look at YouTube for help on specific problems.