2022-09-20 04:25 AM
Hello,
I am trying to get information from two analog sensore (FSRs) by using two seperated data lines (PB0 as IN15 and PA7 as IN12) through ADC1
(Not important note - I created unint32s for debuging and I am willing to transfer the data by using CANBUS as you can see in the main.c)
The problem:
I am getting the information from the sensors, but the data of one sensor gets corrupted by the other one. For example if I pinch the left FSR his data chanegs from 10 to 4095 but if I pinch the right sensor, the left sensor data still changes but from 10 to 800. The exact same thing happans both sides. What could be the problem? How can I make the data line seperated from eachothers?
I am attaching the main.c and the configurations.
In addition its on Circular Mode, Increment address is only Memory and with Data Width of a Word
Thank you,
Raam Kavod
Solved! Go to Solution.
2022-10-05 02:49 PM
I recommend implementing at least reading and considering implementing a circuit from "Figure 8 – FSR linearization and gain circuit." here:
http://www.openmusiclabs.com/learning/sensors/fsr/index.html
For a single channel it can be done even with the MCU internal OPAMP and a DAC as a reference voltage.