Show Posts
Pages: [1] 2
1  Using Arduino / Programming Questions / Re: Help on data adquisition from analog and digital sensor on: March 11, 2013, 08:55:31 am
I more or less know how each code works, and I did try them.
I also  did try to create the "new" code, but it´s not working because  as you can see I don´t have knowledge enough. That is the reason I´m on this forum, so maybe somebody can help me.
Can you help me?
2  Using Arduino / Programming Questions / Re: Help on data adquisition from analog and digital sensor on: March 11, 2013, 07:40:52 am
thank´s majenko
I´ve changed it.
and the second mistake?
3  Using Arduino / Programming Questions / Help on data adquisition from analog and digital sensor on: March 11, 2013, 06:48:41 am
Hi there,
I have no idea on how to run 2 codes in 1 in order to get data via Gobetwino software.
1 code can be found in here: http://www.seeedstudio.com/forum/viewtopic.php?f=4&t=989&p=3632#p3632
 and the other in here : http://mikmo.dk/gobetwinodownload.html after downloading the program, under gobetwinoLogTest.pde file in samples folder. I also attach them in here.
 

My code looks like this, but I know there must be lots of mistakes because I have no idea on programing, I barely know the language what means each function and /or how to dispose it in the right secuence.
Can someone help me? I´m not pluggin it the sensors yet to check if it works, could this be another reason? When I run it I don´t get anything, its like Arduino board remain in standbymode.
thank´s


Code:
int serInLen = 25;
char serInString[25];
int sensorValue = analogRead(A1);
volatile int NbTopsFan;
int Calc;                              
int hallsensor = 2;
int logValue3=0;
int result;
void rpm ()  
{
  NbTopsFan++;
}

void setup()

{


  pinMode(hallsensor, INPUT);
  Serial.begin(9600);
  
 attachInterrupt(0, rpm, RISING);
 randomSeed(analogRead(0));
 Serial.println("#S|CPTEST|[]#");
 readSerialString(serInString,1000);

}
 
void loop()
{

   int sensorValue = analogRead(A1);
   float depth = sensorValue * (500 / 1023.0);
   NbTopsFan = 0;  
   sei();      
   delay(1000);
   cli();      
   Calc = (NbTopsFan * 60);  
   logValue3= random(0,1000);
   logData(depth,Calc,logValue3);
    
}


 
void logData( int depth, int Calc, int value3)
{
   char buffer[5];
  
   Serial.print("#S|LOGTEST|[");
   Serial.print(itoa((depth), buffer, 10));
   Serial.print(";");
   Serial.print(itoa((Calc), buffer, 10));
   Serial.print(";");
   Serial.print(itoa((value3), buffer, 10));
   Serial.println("]#");
   readSerialString(serInString,1000);
  
}


void readSerialString (char *strArray,long timeOut)
{
   long startTime=millis();
   int i;

   while (!Serial.available()) {
      if (millis()-startTime >= timeOut) {
         return;
      }
   }
   while (Serial.available() && i < serInLen) {
      strArray[i] = Serial.read();
      i++;
   }
}
4  Using Arduino / General Electronics / Re: How to connect sensors terminals to Arduino pins in a reliable way on: February 27, 2013, 03:33:05 pm
Thanks' guys.
Now I see the light!  smiley
5  Using Arduino / General Electronics / How to connect sensors terminals to Arduino pins in a reliable way on: February 27, 2013, 02:54:21 pm
Hi Guys,
I'm new on electronics, programming and arduino stuff. I'm taking my first steps on connecting sensors to Arduino, and logging it into my computer.
I'll do some experiments on a boat over open sea waters at over 40 knots, so things will shake. How can I connect my sensors to Arduino pins in a reliable way?
I would like to avoid to weld it, because I want them to be  temporary connections, and also I'm not familiar in the welding technique.  Maybe I should use some kind of reliable connector? Where I could see or find those?
How could I put together a protoboard and the Arduino Uno safely united ?
I know it will be funny for an expert to check these photos of what I'm working in. Take a look if you want:  http://arduino.cc/forum/index.php/topic,150179.msg1127686.html#msg1127686

thank´s
6  Using Arduino / Programming Questions / Re: How to read 4 analog signals in the serial monitor "AT THE SAME TIME" on: February 27, 2013, 12:28:00 pm
mmm, yes , you are right. Then I'll need to use something like Gobetwino, as PeterH suggested me for my project at http://arduino.cc/forum/index.php/topic,150179.msg1127686.html#msg1127686
Do you know Gobetwino? Where can I find some help with this program, or forum, besides the examples and manual submited by its creator?

And yet, since I'm new on this and trying to learn, could I use the code or function  "unsigned long" time to generate a time counter together with 3 analog inputs and 1 digital input? I read somewhere that this is not a reliable method, probably as you said. Any other non hardware solution in that case ?

Thank´s
 
7  Using Arduino / Programming Questions / Re: How to read 4 analog signals in the serial monitor "AT THE SAME TIME" on: February 27, 2013, 11:56:38 am
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
8  Using Arduino / Programming Questions / Re: How to read 4 analog signals in the serial monitor "AT THE SAME TIME" on: February 27, 2013, 11:40:18 am
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%271/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.

9  Using Arduino / Programming Questions / Re: How to read 4 analog signals in the serial monitor "AT THE SAME TIME" on: February 27, 2013, 10:51:33 am
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.
 
10  Using Arduino / Programming Questions / Re: How to read 4 analog signals in the serial monitor "AT THE SAME TIME" on: February 27, 2013, 09:56:53 am
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
11  Using Arduino / Programming Questions / Re: How to read 4 analog signals in the serial monitor "AT THE SAME TIME" on: February 27, 2013, 08:33:46 am
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
12  Using Arduino / Programming Questions / Re: How to read 4 analog signals in the serial monitor "AT THE SAME TIME" on: February 27, 2013, 08:08:02 am
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
13  Using Arduino / Programming Questions / Re: How to read 4 analog signals in the serial monitor "AT THE SAME TIME" on: February 27, 2013, 07:54:23 am
yipeeeee!  smiley smiley-cool 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


 
14  Using Arduino / Programming Questions / Re: How to read 4 analog signals in the serial monitor "AT THE SAME TIME" on: February 26, 2013, 01:38:09 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
15  Using Arduino / Programming Questions / How to read 4 analog signals in the serial monitor "AT THE SAME TIME" on: February 26, 2013, 01:12:43 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

Pages: [1] 2