Hello everyone, I am pretty new to arduino but have some experience. I am using my arduino to read tachometer data from my miata and I am using a 5K and 2.1K ohm resistor voltage divider. I have the resistors hard wires with very short lengths of wire to help reduce the noise. Using a multimeter, the car ideals around .17 volts, however, my arduino code will read the analog pin anywhere from 30-700 in the serial monitor. (I realize this isnt the actually voltage just the analog read) with some 0 and 1023. anyone know if my setup is off or if there is a way to denoise the voltage coming in? Thanks in advance
What voltage are you dividing? What is the maximum and minimum of that voltage?
The voltage is between 0 and 12 volts for Vin of the divider
That's a lot!!! Are you sure the sensor puts-out an analog voltage? It might be PWM which will be averaged-out to "look like" DC if you connect an analog meter or an analog gauge. (A digital multimeter will also usually do some slowing/averaging.)
Try putting a capacitor in parallel with the "bottom" voltage-divider resistor. Maybe start with between 1uF and 10uF or maybe higher. That will filter noise AND it will smooth/average PWM. You might have to go with a higher value capacitor or higher value resistors. You are making a low-pass filter (combined with your voltage divider) and even 1Hz is probably fast enough for a tach.
There will always be SOME noise and depending on how the sensor works it might be affected when the "12V" varies.
Interesting, where is it located in your circuit? Please post an annotated schematic showing exactly how you’ve wired everything. Include links to the technical documentation for the hardware items you’re using. Here’s some additional information that might help you.
Valuable Resources for Automotive Electronics:
- STMicroelectronics Application Note AN2689:
This application note provides guidelines on protecting automotive electronics from electrical hazards, focusing on design and component selection. Reading this will greatly enhance your understanding of automotive circuit protection.
Read AN2689 - Analog Devices: Automotive Electronics Design:
This article distills key insights into designing automotive electronics, offering practical advice for engineers.
Read the article - Diodes Incorporated: Transient Voltage Suppression in Automotive:
Learn about techniques to protect automotive circuits from transient voltage, which is critical for ensuring reliable operation in harsh conditions.
Read the article - AEC-100 Standards Webinar:
This webinar from Monolithic Power Systems provides a detailed overview of AEC standards, essential for understanding automotive electronics requirements.
Watch the webinar - Understanding Automotive Electronics, An Engineering Perspective by William B. Ribbens:
This comprehensive book offers an in-depth look into automotive electronics from an engineering perspective, making it an invaluable resource.
Access the book - Application Note https://www.ti.com/lit/an/slvafc1/slvafc1.pdf?ts=1652591872294