I'm trying to display some sensor informations into an LCD display, because i don't want to fill the car with gauges. I will buy some sensors, like temperature sensor, turbo boost sensor (Pressure Sensor MPX4250AP), and other sensors in the future (oil temperature and pressure), etc.
Here is a little "mock up" i've made without any sensors yet.
My two main problems for now are, reading the voltage of a car battery, and power up the device with the car battery.
For the first problem, i've read about voltage divider, with R1 (33k ohm) and R2 (15k ohm), and them read the value to an analog input of the arduino.
Should that be enough ? Should i add more components to protect the system ?
For the second problem, i'm thinking in buy this DC-DC Boost Converter to send 5V to power up the arduino from the 12-14V of the car battery, instead of using the 7805 transistor that probably will dissipate a lot of heat. With all the sensors i think i will use 500mA for this device.
Is my logic correct ? What advices can you give me ?
Those resistors should be OK
i.e the ratio of 15 / (15+33) = 0.3125
This will let you read voltages up to 5 / 0.3125 = 16V
BTW. Cars are electrically noisy, you may need to put some sort of ove rvoltage / spike protection in place
Re: Buck converters
Yes. They are more efficient than the linear 7805 regulator. However don't trust the specs on the modules from eBay. I blew up a "2A" module when only taking 1A
hey mate, i have a similar set up in my 4wd.
i have Gps (location, speed etc),
aux battery voltage,
Air temp inside and out.
I got a lot of useful information from this person setup for his scooter and has a circuit diagram, including the setup for the resistor divider and filtering.
i used a seperate 5v step down circuit to power the GPS etc instead of getting it from the arduino.
i hope it helps
Yeti_Monster, for what i understand, he just plug the battery with the arduino, just using the arduino protection ? That it's safe ? Should i have a better protection before reach arduino ?
I've read in put in parallel some capacitors, diodes, but i didn't understand yet what is the best scheme.
I am working on a similar project for my old GMC Yukon. Visually there is about 2 inches of space just above the rim of the drivers side dashboard above the existing instrument panel, that does not block any view of the road. I plan to put a horizontal row of 4x20 character LCD's across there.. probably 4 of them. That's 16 lines of data fulltime, and of course changeable with menu / events etc.
LCD's like THIS:
he just plug the battery with the arduino, just using the arduino protection ? That it's safe ? Should i have a better protection before reach arduino ?
I plan to use one of the 12 to 5V at 2 Amps buck regulators with a series diode in the input to remove any reverse-voltage spikes from engine starter etc.
I'm just starting on this and researching sensors. I'll post some stuff as I go along if this thread continues for a while...
terryking228, thanks for you reply.
I've found this article, but i didn't have much time to read it with focus.
Don't know the year or model of your car, but you could get a lot of information digitally from the car's CAN bus (if it has one), including RPM, MPH, temperatures, O2 levels, etc. There's even a few CAN bus shields out there.
It's a 1992 Nissan 200SX, i don't think the car have that.
hey SpeedDragon, yeah you are right. he has just used the 12v from the battery to his Vin pin. and also used the resistor divider to read that voltage. For mine i used an adjustable step down transformer similar to this.. http://www.ebay.com.au/itm/like/251078483263?limghlpsr=true&hlpv=2&ops=true&viphx=1&hlpht=true&lpid=107
and set the the output to about 9v. also use fuse protection as well.
Yeti_Monster, you put the fuse before the DC-DC Step down or after ?.
After some talk with a electro eng. he said that this module should solve the problems/protections to the arduino.
DC-DC Boost Converter Step-Up Power Module Output 5V-35V
This is a DC-DC boost converter step-up power module with high-precision potentiometer, and it uses XL6009E1 with the second generation of high-frequency switching technology as core chip, so that its performance is much higher than the first-generation technology LM2577. With high switching frequency of 400KHz, even small-capacity filter capacitors can bring with very nice results, while the ripple is less and the size is smaller.
Input voltage range: 3V-32V (the best working voltage range is 5-32V)
Output voltage range: 5V-35V
With built-in 4A MOSFET switch tube, the efficiency can reach up to 94% (current of LM2577 is 3A only)
Ultra-high switching frequency up to 400KH. A small-capacity filter capacitor can achieve very good results, while with smaller ripple and size. (frequency of LM2577 is 50KHz only)
Dimensions: L * W * H= 43mm x 21mm x 14mm
I think this can handle good the battery voltage spikes/problems to the arduino.
For the second thing … reading the voltage into the arduino. I will try to make the schematics with my friend and test it. I will provide feedback when it works
i have just put a fuse on the cable from the battery, (fuse size depends on what size cable you use. but using a 5A fuse should be ok). and the capacitors on the resistor divider as shown in the link i posted earlier should sort out any noise. i don't think you would get an spikes from your car that would cause an issue.
ive had mine set up like the one in the link for almost a year and i havnt had any issues.
Your 33k 15k potential divider looks just about ok. I'd add two green LED in series between a_in and GND so that will light up instead of going over 5V if for some reason your car is more than 16V ( very unlikely. 15V is likely to happen very ocassionally)
Don't get a boost converter. That is the wrong way around ( 5V in 12V out ).
The arduino is rated to work directly from 7 to about 19V in, so even a very overfilled car battrey at 14V can be directly connected.
The arduino already contains its built-in 14V (7 to 20) to 5.0V buck converter & regulator.
My nano v.3.0 was working the other day off 13V car battery.
ad2049q, the boost converter isn't the best way to downgrade from 12v to 5v ? Because transistor like 7805 would dissipate not used energy in thermal, and that's bad. The arduino convert from higher voltages to 5v using something like 7805 right ?
Here is the circuit, i've tested at it works good. I didn't integrated yet with arduino.
And the diagram:
I will update when interface with the arduino and add the turbo boost sensor
I had a quick look at your circuit and don’t like the 220uF capacitor and diode.
If you are aiming to record the peak voltage in your car, that will do it but I’d swap the 15kOhm for abut 8kOhm as it might be more than 17V at instants during the revolution of the alternator, topping up C2, and then the diode stops it from falling while the alternator is at a gap in its generating revolution.
If you wanted to measure average battery voltage not peak then remove the diode and possibly remove C2 or replace it with <=100nF.
I still don’t like the “boost” component. Though the quoted voltage range looks ok, it is implied by the word “boost” that it is step-up only. Therefore 5-32V Vin can only give output in the range Vin+1 to 35V, which in a car is about 15 to 35 Volts. Most LCD displays need 5V, so an arduino is much better to take the 5V from than the boost converter. You can still use your 220uF to make sure that input to arduino Vin is somewhat smoothed. I’d go like
—Car +12V —======------- Arduino Vin power supply socket
—Car 0V --------------------- Arduino 0V
with C2 220uF and R1 anything in the 5 Ohm to 100 Ohm range which you have to hand.
even a scrap indicator bulb would do for that R1 as its only function is to make sure that C2 never gets instantaneously charged to more than the 19V max for powering the 5V electronics via the arduino with its built in buck converter.
That might be protection enough, though since you have a fuse in place that is nice to have.
Your earlier post saying buck was much closer to correct than whomever advised boost.
There is one more thing which I don’t know about, and that is what your turbo pressure sensor needs for its supply.
I want to read the average voltage, but with less delay as possible, like 1 second. I've switched the 220uF to 10uF, but i think i will buy the 30 or 40uF.
I will take your advice and replace the 15kOhm and put a smaller one, thanks
I've tested the DC-DC BOOST CONVERTER STEP-UP POWER MODULE OUTPUT 5V-35V, but i think it only get higher voltage of the input. For example, if i provide 12v+ it will allow 12-35v and not 5v+
What should be the best way to do this ? Only use the 7805 with big passive cooler, or just connect the v12+ to the arduino directly ?
The turbo pressure, need 5v+, ground, and the analog read. I've tested and i think it's fine, but i didn't yet install on the car.
What you mean by "Your earlier post saying buck was much closer to correct than whomever advised boost." ?
This is what the prototype looks like, i will try to do the same in a metal plate to connect to the car.
I have open the console near the radio, and i have these two plugs that i can use. I need to find what are v12+ and the ground and find a socket to plug-in.
Thanks for all of your opinions and i hope have this finished until the end of the month
Little video with all the sensors i plan to use, i still need to know how to tap into the water sensor wires ...
EDIT: I think what i need is a step down (Módulo Conversor DC-DC Step-Down LM2596 | Alimentação)