Smoothing Noisy ADC Readings using Promises (NodeJS)

Photo by Markus Winkler on UnsplashReliable Readings from Analog Sensors using Javascript!https://medium.com/media/bb43872de65f62545b43e8847ed3f551/hrefWhile integrating an analog sensor with a microcontroller, it is very important to filter the signal…


This content originally appeared on Level Up Coding - Medium and was authored by Maruti Muthu

Photo by Markus Winkler on Unsplash

Reliable Readings from Analog Sensors using Javascript!

While integrating an analog sensor with a microcontroller, it is very important to filter the signal to improve the SNR. On the hardware end, this can be done by using high pass or low pass or band pass filter. The filtered signal from the hardware filter is converted to digital value by the ADC. We then digitally filter this value to get a reliable reading. Tested on ADS1115 and Raspberry Pi.

⭐️ Implementation

  • Set sample size, sampling interval and outliers to be ignored
  • Collect ADC Samples in an array
  • Remove Outliers
  • Calculate the average
Note: Inject actual analog sensor reading in place of “volts” in the code.

Smoothing Noisy ADC Readings using Promises (NodeJS) was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.


This content originally appeared on Level Up Coding - Medium and was authored by Maruti Muthu


Print Share Comment Cite Upload Translate Updates
APA

Maruti Muthu | Sciencx (2022-02-07T00:30:19+00:00) Smoothing Noisy ADC Readings using Promises (NodeJS). Retrieved from https://www.scien.cx/2022/02/07/smoothing-noisy-adc-readings-using-promises-nodejs/

MLA
" » Smoothing Noisy ADC Readings using Promises (NodeJS)." Maruti Muthu | Sciencx - Monday February 7, 2022, https://www.scien.cx/2022/02/07/smoothing-noisy-adc-readings-using-promises-nodejs/
HARVARD
Maruti Muthu | Sciencx Monday February 7, 2022 » Smoothing Noisy ADC Readings using Promises (NodeJS)., viewed ,<https://www.scien.cx/2022/02/07/smoothing-noisy-adc-readings-using-promises-nodejs/>
VANCOUVER
Maruti Muthu | Sciencx - » Smoothing Noisy ADC Readings using Promises (NodeJS). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/07/smoothing-noisy-adc-readings-using-promises-nodejs/
CHICAGO
" » Smoothing Noisy ADC Readings using Promises (NodeJS)." Maruti Muthu | Sciencx - Accessed . https://www.scien.cx/2022/02/07/smoothing-noisy-adc-readings-using-promises-nodejs/
IEEE
" » Smoothing Noisy ADC Readings using Promises (NodeJS)." Maruti Muthu | Sciencx [Online]. Available: https://www.scien.cx/2022/02/07/smoothing-noisy-adc-readings-using-promises-nodejs/. [Accessed: ]
rf:citation
» Smoothing Noisy ADC Readings using Promises (NodeJS) | Maruti Muthu | Sciencx | https://www.scien.cx/2022/02/07/smoothing-noisy-adc-readings-using-promises-nodejs/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.