Hello, Arduino Community!
I wasn't able to provide the circuit schematics on my last post (last, last week) and I think that updating it would make it more convoluted. I really wanted to put things to an end for this particular matter. So again, I'm trying to design a wireless fire alarm prototype using ZigBee and Arduino. My circuit is as follows in the attached image.
My problem is that despite using some calibration and software filtering techniques, my ADC readings for monitoring the battery voltage are still inaccurate. I believe it comes from the hardware and the software as well from all that I've read online.
I've been using bypass caps on every other component and on the power lines for the Arduino but the noise still persists. I kind of gave up and removed every cap I have on the circuit. Readings were quite good (+-0.02-0.06 V diff. vs. multimeter) the first time but after a few days of testing and by charging the battery simultaneously while measuring, readings have become even worse. I have little to no electronics background and have no oscilloscope. Kind of sucks. Sorry
I've read about filters (RC) online and tried them by doing slight calculations and random choice of caps from the smallest ones and seeing which one had the best result. However, I really wanted to know how to use them on any circuit. I've also read the software also affects the RC values as well. Too bad I don't have an oscilloscope with me.
So my questions are:
1. How do I choose the component values of my RC circuit?
2. What frequencies do I have to take in mind? The sampling frequency of my ADC or the noise which I want to cut off? If both, how should I implement the solution?
3. How does software affect ADC measurements? (I've read ones like digitalWrite particularly at high frequencies do some serious noise)
4. What are my possible approaches to this?
Thank you very much. I'm sorry but it obviously seems I am asking for much but I really have a lot of questions in mind.
Photos are in my drive on high resolution.