New answers tagged

1

how about this ? // Read the analog inputs for (int i = 0; i < length; i++) { analogRead(analog_pins[address + i]); // for pre read // Write the state of the analog pin to the response buffer. slave.writeRegisterToBuffer(i, analogRead(analog_pins[address + i])); }


1

"noisy most of the time" - good news: if it's not all the time, that's a sign it can be fixed. "bandpass filter is also not really helping" - INA122P circuit likely has something wrong. check any resistors involved. Edit: if this was about U2.2, see below as that doesn't look like a band pass... "regular solid core wire and ...


0

In this case I do not believe ground bounce will be a problem. I normally only encounter it on high speed PCB designs. You will get noise from the power supply(s). Any impedance induced between the ground of analog input (circuit board ground) and the sensor will give you problems. Be sure all grounds are low impedance in nature. Since you are designing the ...


0

There is code published that shows how to read the internal voltage, I use that to correct my A/D readings. It is not perfect but close. You can of course select a lower reference voltage by changing the appropriate registers and use a different reference. This is much safer then supplying an external reference.


0

The A/D simply gives a binary value between 0 and 1023. That value is evenly divided between reference and ground. Since it is a successive approximation register that starts counting at zero and counts up in consistent steps until the reference voltage is reached, that count is saved and presented as the reading. If your input voltage is in that range you ...


0

Adding capacitance to the input will help compensate for the high impedance but it also forms a low pass filter. For a 16 MHz Arduino the ADC clock is set to 16 MHz/128 = 125 KHz. Each conversion in AVR takes 13 ADC clocks so 125 KHz /13 = 9615 Hz. That is the maximum possible sampling rate, but the actual sampling rate in your application depends on the ...


3

Your sampling rate is far too low for the signals you are looking at; you're not getting enough data points for drawing something that looks like the original signal. The Arduino library's analogRead(), while slow, can do better, up to about 9000 samples/s; the ADC in the atmega2560 in free-running mode can do about 75000 samples/s at 8 bits resolution. This ...


Top 50 recent answers are included