1

I'm doing a really simple project with an Arduino Nano and found a problem. The circuit is a simple temperature sensor and a tension read from an analog pin everything showed on a Nokia 5110 LCD.

When the Nano is connected to the USB everything works and the reads are perfect.

When I install the circuit on my car taking the 12V to the Vin and the GND from the centraline everything goes bad: I certainly know that the 12V is obviously not stable and oscillates a lot (between 12V and 14V).

What can be the solution? Should I add some ref or should I regulate the input tension to maintain it stable to a certain quantity?

sa_leinad
  • 3,118
  • 1
  • 20
  • 49
  • Car power is incredibly noisy. You need lots of filtering to get it to work right. Either that or get a proper automotive grade power supply. The simplest is a "cigarette lighter" USB charger... – Majenko Aug 04 '20 at 20:11
  • Thanks. Unfortunately I'm taking the readings from the cables that go to the lpg commuter. If the problem is the stability of the input does exist some (cheap) circuit that I can use to stabilize it to 12V? – Roberto Aureli Aug 04 '20 at 20:14
  • Why is that "unfortunate"? What does where you're taking readings from have to do with how you're powering the board? – Majenko Aug 04 '20 at 20:18
  • To keep everything compact I take power and readings from the same part. To use the cigarette lighter usb charger I should keep it plugged in and pass a cable along all the front part of the car – Roberto Aureli Aug 04 '20 at 20:19
  • You're thinking too literal. A "cigarette lighter" style power supply doesn't have to be plugged into a cigarette lighter socket. Take a screwdriver to it. Pull it apart. Solder wires to it. Think outside the plastic shell it comes in. – Majenko Aug 04 '20 at 20:24
  • Thanks, I will give it a try. Can I ask you if this cheap product https://a.aliexpress.com/_BPIybF (A DC-DC regulator) can do the work? Thanks – Roberto Aureli Aug 04 '20 at 20:28
  • Since the Arduino uses the power input as the reference for the ADC, taking power and readings from the same source is a recipe for disaster. If you want really stable readings divide your signal down to 1v1 and use the internal reference on the Arduino. – Delta_G Aug 04 '20 at 20:38
  • Can the DC-DC help with that? I don't need perfect readings but actually the temperature readings jump from 20°C to 40°C in a matter of seconds. (I take the average of some readings) – Roberto Aureli Aug 04 '20 at 20:40
  • No. Like I said, you need automotive grade. That means it can cope with spikes in excess of 65V or so. – Majenko Aug 04 '20 at 21:04
  • Really? An old car centraline can reach 65V? I didn't know that thanks – Roberto Aureli Aug 04 '20 at 21:07
  • Like I said: noisy. – Majenko Aug 04 '20 at 21:15
  • Yes but I tough less noisy. Using the usb charger I will get 5V. Since the VIN pin wants at least 7V can I connect the 5V from the charger to the 5V pin even if the LCD and the temperature sensor are already connected there? – Roberto Aureli Aug 04 '20 at 21:17
  • Yes. Of course you can. – Majenko Aug 05 '20 at 10:26
  • Thank you for your help, I thin that the question is resolved. I've a last doubt: can I trust the car charger or should I put something between the 5V pin and the output of it? Thanks – Roberto Aureli Aug 05 '20 at 10:27

1 Answers1

2

You can use a branded 5 V charger made for cars. You can directly connect this to 5 V pin of the Arduino.

By doing this:

  1. you are protecting the Arduino from the noise as well as high voltage spikes coming from the car 12 V supply
  2. protecting yourself and others coming in contact with the Arduino or the sensors connected to the Arduino.

You can also

  1. consider filtering the analog data read
  2. protection circuits such as surge protection diodes or a 5.7 V Zener across 5 V and Ground of Arduino
ArduinoFan
  • 984
  • 5
  • 11