Simple deceleration gauge using MMA7361L accelerometer and LM3914 Dot/Bar Display Driver

Thread Starter

Navras5.11

Joined Feb 4, 2021
5
I want to build third brake light which will be indicating the level of deceleration during the braking using LED bar display and which will be blinking when it reaches the maximum value. I want to use MMA7361L as a signal source for two LM3914 Bar Display Driver. My goal is to use only 7 LED's on each LM3914 what gives me the total number of 14 LED's driven by analog acceleration / deceleration signal (this is the number of LED's in Audi A4 B7 third brake light).
Deceleration during braking from 100 km/h to 0 km/h ranges for different car types between 0 and 1,21 g (Audi RS5).
Although MMA7361L has a range of plus/minus 1.5g or plus/minus 6g I want to use only the range 0-1g (pin 10 NC). To measure deceleration instead of acceleration I only need to place the accelerometer in opposite direction on chosen axis. That gives me the range of voltages between 1,65V for 0g and 2,45V for 1g.
Is it possible to use a LM3914 bar display driver to indicate the level of deceleration when input signal is between 1,65V and 2,45V? What circuit should I build to do so?
According to my calculations LED's should light up as fallows:
L1 - 1,76V
L2 - 1,88V
L3 - 1,99V
L4 - 2,11V
L5 - 2,22V
L6 - 2,33V
L7 - 2,45V.
Could anyone help me with designing the proper circuit?
 

sghioto

Joined Dec 31, 2017
5,102
Is it possible to use a LM3914 bar display driver to indicate the level of deceleration when input signal is between 1,65V and 2,45V? What circuit should I build to do so?
It's possible since the range of voltages is fairly linear but I would recommend a micro using an ADC input driven by the accelerometer.
What type of LEDs for the display?
The MMA7361 is obsolete, do you have one on hand?
 
Last edited:

Thread Starter

Navras5.11

Joined Feb 4, 2021
5
I want to build in deceleration gauge into a third brake light. There is not much space there so I want to use as simple as possible circuit. Using MMA7361L and LM3914 seams easy to me because I can understand how they work. I bought simple MMA7361 circuit to test it (https://www.aliexpress.com/item/4000085476036.html).
I want to use https://allegro.pl/oferta/wyswietlacz-led-linijka-osx10201-ggr1-10911367461 as a deceleration indicator in a prototype.
At this moment I don't know what type of LED's I will use for display. Ultimately I hope to use those inside https://www.ebay.co.uk/itm/124265297607. Probably this is some kind of bright red LED's.
 

sghioto

Joined Dec 31, 2017
5,102
Using MMA7361L and LM3914 seams easy to me because I can understand how they work. I bought simple MMA7361 circuit to test it
Here's a demo circuit I tested on a breadboard. Rv1 is adjusted so LED 1 lights up when the output of the MMA7361 is 1.70 volts. Range is closer 1.70 to 2.6 volts for 7 LEDs. Notice the MMA7361 requires a max voltage of 3.6 volts and recommended to operate at 3.3 volts.
Will also require driver circuits for the LEDs as the LM3914 has limited output.
1689545016799.png
EDIT: Power circuit with 3.3 volt supply
 
Last edited:

LowQCab

Joined Nov 6, 2012
3,584
The Cars following You can't determine the number of LEDs that are illuminated.

A better plan is one where the "Third-Brake-Light" operates as normal with low-G Braking,
and starts Flashing Super-Bright above a preset G-Level.
.
.
.
 

Thread Starter

Navras5.11

Joined Feb 4, 2021
5
@sghioto Thank you very much. I appreciate your help. Could you explain why do you use OPAMP in your circuit?
@LowQCab Thank you for your suggestion. I will think about it espetially it is used by Audi in A4 B8 model. What circuit should I use so that third stop light would work normally when G is lover that 0,8G and blink when G is above that value? I have know idea how to build „trigger” circuit that will be transparent for G values lover than 0,8G and work as a breaker for values closer to 1G.
 

LowQCab

Joined Nov 6, 2012
3,584
Please supply the Data-Sheet for the High-Power-LEDs that You intend to use,
and the quantity of LEDs.

Is your Third-Brake-Light operated by a "Switched-Ground ?, or a Switched-Hot ?
How many Wires are connected to your Third-Brake-Light ?
Do You have a Wiring Diagram for your Car ?, ( please post it ).
Many Cars are more complex than You might imagine.

I would not suggest that You attempt to install any kind of Electronics inside the
Third-Brake-Light-Housing, unless it's unusually large and empty.
Most Cars have little, to zero, spare room for anything else other than the LEDs.
The Circuit may have to be placed in the Headliner, or in the Trunk, or under the Dash.
.
.
.
 

sghioto

Joined Dec 31, 2017
5,102
The op amp is needed to convert the voltage output of the MMA7361 to be inline with the reference voltage of the LM3914 which is 1.25 volts.
 

sghioto

Joined Dec 31, 2017
5,102
What circuit should I use so that third stop light would work normally when G is lover that 0,8G and blink when G is above that value?
A couple of suggestions.
If the brake pedal is switching to ground:
1689866006473.pngEDIT: Added D2 to brake switching to ground circuit.


Positive brake switching:
1689630388591.png
 
Last edited:

Thread Starter

Navras5.11

Joined Feb 4, 2021
5
I found some wiring diagram for brake lights in my car. Could you tell me is it positive or negative brake switching (numbers from 127 to 140 means connection to ground (negative pole of the battery)?

Brake light wiring diagram.png
 

LowQCab

Joined Nov 6, 2012
3,584
And it's likely that all those Light-Outputs are PWM, not straight DC.
If You add more LEDs, 2 things could happen ..........

1) If the Outputs are Current-Limiting-Outputs, ( which they should be ),
then both the original Lights, and the "new" added Lights,
will have to share the same fixed amount of Current, and they will both be too dim.

2) The Outputs will be overloaded and smoke your extremely expensive Body-Control-Module.

The only "safe" solution is to create an additional LED-Controller-Circuit
with High-Impedance-Inputs, that can be directly connected to the existing factory LED-Outputs.

This is NOT simple.

The same problems will arise when connecting directly to the Brake-Light-Switch.

Another option would be to control the new Brake-Lights exclusively with
an Accelerometer-Chip and a Current-Limiting-Circuit.
A Flashing-Function could easily be added to this new Circuit.
.
.
.
 
Top