Go Down

### Topic: How to read 4 analog signals in the serial monitor "AT THE SAME TIME" (Read 3376 times)previous topic - next topic

#### xJArduinox

##### Feb 26, 2013, 07:12 pm
Hi ,
I'm new on this, plus my knowledge in programming is 0, so I would be very happy if someone could help me.
I've checked throw out some tutorials (maybe not all), but I can´t find how to, if possible, printout the analog signals from 4 different potentiometers and read it in the serial monitor organized in 4 columns + another column including the time of the samples. Can I do the same for analog and digital signal at same time too?
One more question: What is the minimum signal in voltage that Arduino Uno can read? down to the milivolts? down to the microvolts? I´m asking this, because I need to read the voltage from a Load Cell that uses an internal circuit called Wheatstone Bridge, and for a change in a small load, lets´say 1 kg Force, gives a variation in the order of microvolts. I should use a voltage signal amplifier.... but it´s very expensive (probably because its not an easy matter to deal with microvolts), but does someone in here know another solutions under Arduino ?
Thank´s a lot

#### PaulS

#1
##### Feb 26, 2013, 07:17 pm
You can not perform analog to digital conversion on 4 pins at one time using the ONE analog to digital converter.

Quote
What is the minimum signal in voltage that Arduino Uno can read?

0V.

Quote
I should use a voltage signal amplifier.... but it´s very expensive

op amps can be had for a few cents apiece.

#### xJArduinox

#2
##### Feb 26, 2013, 07:38 pm
Thanks´Paul for answering me, but I'm very confused yet.
Do you mean that what I do read in the serial monitor is a digital conversion of my analog input? You mean that I just can read one after the other? Maybe not like this?                                                      input 1   input 2   input 3   input 4
2           5.5        3          4
2           5.5        3          4
2           5.5        3          4
2           5.5        3          4

but   like this?                                                 2
5.5
3
4
2
5.5
3
4
and so on?

About the voltage, sorry, I meant VARIATION   in voltage.  Like from 1 volt to 1.000001 volts ?

Op amps stand for Operational amplifier? Should I connect it in between the load cell and the Arduino board? Few cents seems very cheap... why do they ask me something like a 100 \$ .... maybe because I have no idea of electronics? I've seen its the standard price for Load cell signal amplifiers.

Again, thank's

#### liudr

#3
##### Feb 26, 2013, 08:03 pm
pseudo code:
print1
print space
print2
print space
print3
print space
print4
print space
print time
print a new line

repeat

Have you tried to modify a tutorial program at all?

You should search amplifiers specifically designed to work with load cell.

#### Arrch

#4
##### Feb 26, 2013, 08:09 pmLast Edit: Feb 26, 2013, 08:11 pm by Arrch Reason: 1
You mean that I just can read one after the other?

I think you're confusing reading inputs simultaneously versus presenting the data on a single line. The former might be impossible, depending on how you define "simultaneously".

To present the data on the same line, you simply need to read the inputs, one at a time, into different variables. You then print them, one at a time, including any necessary spaces. When you're done printing them, you can use a Serial.println() rather than Serial.print() to finish the line.

#### liudr

#5
##### Feb 26, 2013, 08:32 pm
Arrch,

Good point. So to OP, you don't have to read them while displaying them. Read all 4 one by one, then output a single line

Code: [Select]
`read1=analogRead(1);read2=analogRead(2);read3=analogRead(3);read4=analogRead(4);Serial.print(read1);Serial.print("  ");Serial.print(read2);Serial.print("  ");Serial.print(read3);Serial.print("  ");Serial.print(read4);Serial.print("  ");Serial.println("");`

#### xJArduinox

#6
##### Feb 27, 2013, 01:54 pm
yipeeeee!  Thank´s guys, It´s working nicely!
Yes, you was right Arrch, I was confused , plus I don´t know the programming language, and I knew what I wanted but didn't know where to look through out  all the language and functions posted in the reference section. Now I'm doing my first steps,and yes, liudr, now I'm doing modifications over some turorials and mixing and adding them as you suggested.
Thank´s a lot, for me this it´s a great progress and it gives me motivation to continue forward in my project. thank´s!

About the amplifier, I know I probably will need to buy it and use it.... but yet I have the question. What is the minimum VARIATION in an analog  voltage signal Arduino Uno can read? down to milivolts? microvolts maybe?

I would like to joint all this questions and answers together with my other posts related with my project, so someone who have the same questions or problems can find it all together. Is it possible to do so?
I post it here so it can be crossed linked:  http://arduino.cc/forum/index.php/topic,150179.msg1132637.html#msg1132637

Again, thank´s

#### AWOL

#7
##### Feb 27, 2013, 01:58 pm
Quote
What is the minimum VARIATION in an analog  voltage signal Arduino Uno can read?

The absolute minimum with a 5V reference is theoretically around 4.8millivolts BUT you may well find differences of this order are swamped by noise.
A lower reference voltage can be selected, but this also limits the maximum voltage you can measure (to the same as the reference).
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

#### xJArduinox

#8
##### Feb 27, 2013, 02:08 pm
Thank´s Awol
Mffff... so, I don´t have another option rather than connect my Load Cell, that submits microvolts signal variations for a small load variations, to a signal amplifier, and then connect it to my Arduino Uno ?
Here in Spain, an amplifier for Load Cell cost around 100\$ . Any more option with a very limited electronic knowledge?
thank´s

#### AWOL

#9
##### Feb 27, 2013, 02:14 pm
What sort of range of weight do you need to weigh?
It may be that a 10 bit converter won't do the job anyway.
You couldn't easily, for instance, weigh 2kg with 1g accuracy, however little noise you had.

On the other hand, if you can take some time over your measurements, you may be able to average over time and reduce the effect of noise.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

#### xJArduinox

#10
##### Feb 27, 2013, 02:33 pmLast Edit: Feb 27, 2013, 02:35 pm by xJArduinox Reason: 1
Hi Awol,
The range will be between 0 kg to no more to 500kg I belive. It´s related with this project : http://arduino.cc/forum/index.php/topic,150179.msg1132637.html#msg1132637
Trough out the Load Cell attached to the arm of my rudder system, I'll be able to read the forces acting in its arm due to the speed variations, depth of the rudder, angle of attack, and all this over several rudder cross sections.
There will be 4 sensors. The load cell, the speedometer, a depth "indicator" and an "inclinometer" . The angle of attack will be notated visually over a scale and fixed at different positions during the test  . I have solved to read the signals from 3 of them ( 1 pulsometer, and 2 potentiometers) in the serial monitor, but I was not sure if I needed to buy the signal amplifier for the load cell, in order to read its signal.
Sorry for my probably dumb question, but a 10 bit converter is what Arduin uno does?
Any way, thank´s a lot for taking your time in answering me

#### AWOL

#11
##### Feb 27, 2013, 02:50 pmLast Edit: Feb 27, 2013, 02:57 pm by AWOL Reason: 1
A ten bit converter gives you 1024 possible readings from 0 to 1023 inclusive.
So, if you have up to 500kg, the best resolution you could achieve normally would be 0.5kg with a single reading, and remember the noise could make this vary up or down by a couple of kilos.

However, if you're able to sacrifice some time, theoretically with oversampling, you can increase resolution, so, say, summing 256 samples would give you 14 bit resolution.
(I think - I'm a bit rusty on this stuff)

Edit: This will probably explain better than I can.

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

#### michinyon

#12
##### Feb 27, 2013, 03:26 pm
Quote
What is the minimum signal in voltage that Arduino Uno can read?

But it is only a ten-bit resolution, which means it outputs an integer value between 0 and 1023.

Which means that it needs a change of 5 mV in the input  to change the measured value by 1.

Which may not be sensitive enough to get meaningful values from your device.

#### xJArduinox

#13
##### Feb 27, 2013, 03:56 pm
thank´s both michinyon and AWOL, now I do understand a little more how this thing works.
For me 0.5 kg or 5 mV precision would be enough. However does this 10 bits resolution have something to do with the speed or rate I can take measurements? My intuition tells me that one thing its the speed and the other the precision of the signal readings, but still not clear for me.
I'm sure this question have to do with my ignorance on electronics and programming, so sorry for this in advanced.

I'll check out about over sampling and I may come back with some more questions.

thank's

#### AWOL

#14
##### Feb 27, 2013, 04:29 pm
One final thought for now: when talking about objects with properties like "500kg", phrases like "AT THE SAME TIME" often have a different meaning to what you may normally think, particularly when considering devices capable of making many thousands of samples a second.
Those properties are not going to change very quickly (in microcontroller-scale speed terms) without serious safety concerns.

(not that the safety concerns are not there at slower rates of change, just that you've got longer to deal with them, and they pack less KE)
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up

Please enter a valid email to subscribe