How to read 4 analog signals in the serial monitor "AT THE SAME TIME"

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

You can not perform analog to digital conversion on 4 pins at one time using the ONE analog to digital converter.

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

0V.

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

op amps can be had for a few cents apiece.

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

pseudo code:
read1
read2
read3
read4
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.

xJArduinox:
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.

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

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("");

yipeeeee! :slight_smile: 8) 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: Fast boat rudder system optimization - #6 by system - Project Guidance - Arduino Forum

Again, thank´s

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).

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

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.

Hi Awol,
The range will be between 0 kg to no more to 500kg I belive. It´s related with this project : Fast boat rudder system optimization - #6 by system - Project Guidance - Arduino Forum
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

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.

Or you could add an external ADC.

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

The arduino analog input can read between 0 and 5 volts.

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.

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

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)

mmmm, not sure I do understand you. What do you mean by KE ? (kinetic energy?)
What do you mean by safety? My rudder will be totally blocked at each position, the load cell signal will fluctuate for each change in speed, but won´t transmit any mechanical movement. Not sure if you do talk about this safety concern. Plus I'll increase rudder depth, speed and angle of attack very slowly and I'll be wearing a life jacket. My apologies if I did not understand your message, but there are 2 problems: my bad English knowledge and my null knowledge in electronics and programming.
However I want to thanks to all of yours who are answering my questions so maybe one day I can answer questions to someone else also with correct English.

Sorry, I was perhaps being a little obscure.
What I was trying to get over was that even quite slow microcontrollers, with slow ADCs produce results in timescales that appear to humans to be simultaneous, particularly when the items are heavy and will require a lot of effort to change their state by any significant amount.
In theory, on an Arduino, you could measure four inputs with 16 times oversampling (12 bit), and still collect 150 samples per second per input.

I see,
mmm, to tell you the truth, I won´t need more than let´s say 10 sample per second per input. Maybe for the load cell if I want to do what you proposed I`ll need more samples and over sampling. However.... God, now I'm getting more confused, because I remember that for the speedometer , I need to be able to read at least 200 pulses per second, that's 200 Hz, that in my case it's 40 knots. But for this purpose I'm using a digital pin and the code suggested by "Chagrin" at http://www.seeedstudio.com/wiki/index.php?title=G1'1/4_Water_Flow_sensor , and maybe this does nothing to do with an analog input. Anyway, I won´t use an over sampling method you propose until I read about it, and until I get more familiar with all this new concepts, programming language and electronics.
Meanwhile, can you tell me how can I read the date and time together with my inputs?
what is the syntax for this? Print date and/or print time? do I need some more other syntax onto this ? In the reference I did find the functions milis and micros, but I'm not sure if it's what I'm looking for.
Anyway, thank's, and I'll totally understand if you don't want to answer more questions because I'm sure that they are too trivial and I should spent more time reading about all this stuff.

xJArduinox:
Meanwhile, can you tell me how can I read the date and time together with my inputs?
what is the syntax for this? Print date and/or print time? do I need some more other syntax onto this ? In the reference I did find the functions milis and micros, but I'm not sure if it's what I'm looking for.
Anyway, thank's, and I'll totally understand if you don't want to answer more questions because I'm sure that they are too trivial and I should spent more time reading about all this stuff.

You need something like an RTC if you want to keep track of the date and time reliably.

mmm, Does RTC stand for Real Time Clock? That's hardware, isn't it? I wouldn't like to integrate this on a circuit. Something easier ?? Maybe I can use the clock from my computer? I'll be login the data through the USB cable.
What function should I use in the code for Arduino ?
Thanks