6 years, 9 months ago.

Analog Inputs

Hi Mbed Community!

I'm new and excited to be working on my current project. I'm trying to make a box that will make my life a lot easier but need some direction and input from the community.

I have to be able to read differential analog input signals. My first thought was I would take two single line analog inputs and subtract them to get the differential value. Will this work?

Second, the analog inputs ranges from -5V to 5V for some devices and 0V to 5V for others. How can I go about scaling these signals accordingly while guaranteeing I have a constant scaling? I am taking readings from signal conditioners that are used to read Load Cells and Linear Pots.

I can elaborate more if needed

Thanks!

Josh

Some random question, are you from Ngee Ann Polytechnic?

posted by WB Tan 30 Apr 2013

1 Answer

6 years, 9 months ago.

The scaling should not be a problem. A network of 2 or 3 resistors is sufficient. Calculating the values involves some math. Look for superposition and thevenin equivalent. Converting a differential signal with two adc inputs will only work for very slow signals and common modes. The mbed has only one adc with a multiplexer on the input, so there is a time difference between the sampling of your two inputs. Unless your signal and the common mode are constant, this will result in a voltage error. Hence your common mode will not be completely eliminated and you will lose some of your signal. Therefore it is better to use an opamp or instrumentation amplifier.