Loading...
  Show Posts
Pages: [1] 2
1  Using Arduino / Programming Questions / Re: Icomsat v1.1 Software Power On on: May 02, 2013, 08:27:02 pm
Ignore me, worked it out.  The data sheet says 400us, but I had to may my delay 600 and it worked.  I just assumed I was way off track.

Code:
int GSMOnPIN = 9;                 

void setup()
{
  pinMode(GSMOnPIN, OUTPUT);      // sets the digital pin as output
  Serial.begin(9600);
}

void loop()
{
  digitalWrite(GSMOnPIN, HIGH);   // sets the GSM on
  delay(600);               
  Serial.println("Its now High/On");
  digitalWrite(GSMOnPIN, LOW);   
  delay(10000);       
   
  digitalWrite(GSMOnPIN, HIGH);   // sets the GSM off
  delay(600);                 
  Serial.println("Its now High/Off");
  digitalWrite(GSMOnPIN, LOW); 
  delay(10000);
}
2  Using Arduino / Programming Questions / Icomsat v1.1 Software Power On on: May 02, 2013, 07:16:13 pm
Hello, I am using a Icomsat v1.1 and I want to do software On.  I have read it can be done, but the example I followed does not seem to make it happen.

http://imall.iteadstudio.com/im120417009.html

Has anyone done this?  If so, how please.   

I am using this library, should I be using a different one?   http://code.google.com/p/gsm-shield-arduino/

(and while I am at it, does anyone know how I can report how many bars of reception I have?)

thanks
Greg
3  Using Arduino / Project Guidance / How To: Read Arduino Battery Source Voltage on: April 17, 2013, 04:45:26 am
For one reason or another reading the Arduino power source (battery usually) voltage seems like a common thing.  There are lots of posts, and it seems a few different options.

Me, I want to do it do I can test different batteries, and confirm under which conditions, how long they all last and their rate of decent.

I presume there are two scenarios.  Those that have a source over 5v and those that have a source under 5v.  Are we able to come to a conclusion on what is the best practice method for each scenario?  And confirm wiring/code.

Some links I have been through:
http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/
http://electronics.stackexchange.com/questions/64764/measuring-an-arduinos-power-source-voltage-using-analog-in
4  Using Arduino / Programming Questions / Re: Serial Read of GPS Every Loop on: April 16, 2013, 07:11:12 am
That link really helped understand Serial, thank you.

Maybe more background will help.  In reality I only want to get GPS data every say 10 seconds.  And when I get GPS, I also want to get other sensor data, and log it to a SD Card.

My plan was to use a 10 second delay at the end of the loop, then go around again and collect all readings, and record them.   Should I be doing this in a different way?

thanks
5  Using Arduino / Programming Questions / Serial Read of GPS Every Loop on: April 16, 2013, 04:51:58 am
I have the below code.   I am trying to alter it to read the full 80 character sentence every Loop.  I have tried lots of ways, but just cant seem to get it.

Does anyone have any ideas please?

Its from here:

Code:
#include <SoftwareSerial.h>

SoftwareSerial gpsSerial(10, 11); // RX, TX (TX not used)
const int sentenceSize = 80;

char sentence[sentenceSize];

void setup()
{
  Serial.begin(115200);
  gpsSerial.begin(9600);
}

void loop()
{
  static int i = 0;
  if (gpsSerial.available())
  {
    char ch = gpsSerial.read();
    // Serial.print(ch);
    if (ch != '\n' && i < sentenceSize)
    {
      sentence[i] = ch;
      i++;
    }
    else
    {
     sentence[i] = '\0';
     i = 0;
     displayGPS();
     }
  }
}

void displayGPS()
{
  char field[80];
  getField(field, 0);
  if (strcmp(field, "$GPRMC") == 0)
  {
    Serial.print("Time: ");
    getField(field, 1);  // number
    Serial.print(field);

    Serial.print(" Status: ");
    getField(field, 2);  // number
    Serial.print(field);
   
        Serial.print(" Lat: ");
    getField(field, 3);  // number
    Serial.print(field);
   
        Serial.print(" Lat Dir: ");
    getField(field, 4);  // number
    Serial.print(field);
   
        Serial.print(" Long: ");
    getField(field, 5);  // number
    Serial.print(field);
   
        Serial.print(" Long Dir: ");
    getField(field, 6);  // number
    Serial.print(field);
   
            Serial.print(" Speed in knots: ");
    getField(field, 7);  // number
    Serial.print(field);
   
            Serial.print(" Direction in Degrees: ");
    getField(field, 8);  // number
    Serial.print(field);
   
            Serial.print(" Date in UTC [DdMdAa]: ");
    getField(field, 9);  // number
    Serial.print(field);
   
            Serial.print(" Magnetic cariation: ");
    getField(field, 11);  // number
   
                Serial.print(" Variation [E/W]: ");
    getField(field, 12);  // number
   
                Serial.print(" Mode: ");
    getField(field, 13);  // number
    Serial.print(field);
   
   
   
    Serial.println();
  }
}


void getField(char* buffer, int index)
{
  int sentencePos = 0;
  int fieldPos = 0;
  int commaCount = 0;
  while (sentencePos < sentenceSize)
  {
    if (sentence[sentencePos] == ',')
    {
      commaCount ++;
      sentencePos ++;
    }
    if (commaCount == index)
    {
      buffer[fieldPos] = sentence[sentencePos];
      fieldPos ++;
    }
    sentencePos ++;
  }
  buffer[fieldPos] = '\0';
}


6  Using Arduino / Project Guidance / Re: Uno connect to Telstra 3G Modem on: February 03, 2013, 05:01:33 pm
Thanks Peter, not what I was hoping for.

Does anyone know of a Mobile that can be interfaced with, that works on Telstra Australia, and has a external Aerial port.  To send SMS.
7  Using Arduino / Project Guidance / Uno connect to Telstra 3G Modem on: February 02, 2013, 05:06:12 am
HI All, I presume I can use a USB 2.0 shield ( http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino ). To connect to a standard Telstra 3G (Next G) modem.

But I cant find anyone that has done this (plenty of Raspberry Pi examples).  I want to both confirm its possible, and check what specific hardware was used.

Does anyone know of anyone linking any 3G Telstra modem to a Arduino Uno any way at all?

I am looking to use it to send SMS from Arduino.

(and to confirm for anyone not local, Telstra are a Aussie Telco)

thanks
Greg
8  Using Arduino / Project Guidance / Re: Uno Reference Voltage of 1.1v on: January 21, 2013, 05:48:01 am
Thanks for all your help. 

For anyone else looking, I think this gives me what I need:   http://arduinotronics.blogspot.com.au/2011/03/monitoring-voltage-of-dc-battery-supply.html
9  Using Arduino / Project Guidance / Re: Measuring and logging battery voltage on: January 20, 2013, 05:16:41 pm
Hi LEfty, I am pretty new here also, but I am trying to do something similar.

WHat I have learned is:
You need a Arduino
You need a data logger - https://www.sparkfun.com/products/9530
You need to then apply a Voltage Divider to your source, as its 12v, and you need it at/under 5v. - http://www.sparkfun.com/tutorials/207

Then you can plug VOut into your A0 pin, and it should give you a pretty accurate reading.

(I am in the middle of setting this up, but this is what I am moving towards).
10  Using Arduino / Project Guidance / Re: Uno Reference Voltage of 1.1v on: January 18, 2013, 01:27:09 am
Quote
And my reference voltage is 2% out from 1.1v.

The bandgap / 1.1V reference would no longer be involved.  You can forget about it.

The reference you would be working with is Vcc / 5V.

Thanks.  So in theory, if my VCC drops to 4.8v, I should multiply every value in A0-A5 by 1.041 to get its real value, assuming that item is a 5v item ?

Is there a real way to test this?
What if I get my 5v battery power source, measure VCC @ I assume 5v.  Measure a 1.5v AA battery on A0.   Then let the arduino power batteries go flat.  When VCC gets to 4.8v, take a second reading from A0, and it should be 4% lower ?  Maybe?

How low can the source arduino power get before it will no longer function?
11  Using Arduino / Project Guidance / Re: Uno Reference Voltage of 1.1v on: January 18, 2013, 12:47:18 am
Thanks for all your help.  I actually have no idea how I started down this path.  The main thing I want to do is log my voltage of my source batteries.  As such, a Voltage Divider (http://en.wikipedia.org/wiki/File:Resistive_divider.png    = 2 resiters of the same value).  Then send VOut to A0, and read the value, then double it.  Sound right?

Do I even need a reference value?

But then, since I know the reference value now anyway.  And my reference voltage is 2% out from 1.1v.  As such, should I treat any value coming into A0 to A5 as being 2% too low?    Its only 2%, I don't think I care that much as most of my connections are Digital anyway, and everything anyway seems to have different levels of accuracy.  More curious now.
12  Using Arduino / Project Guidance / Re: Uno Reference Voltage of 1.1v on: January 17, 2013, 09:16:09 pm
I have 4 x AA batteries connected to the barrel connector.   And I have AREF connected to 5v.

Aside from that I am running a SD Logger, so I can see the values.

Here is my code:

Code:
const long InternalReferenceVoltage = 1071L;  // Change this to the reading from your internal voltage reference

void setup( void )
{
  Serial.begin( 115200 );
  Serial.println( "\r\n\r\n" );

  // REFS1 REFS0          --> 0 0 AREF, Internal Vref turned off
  // MUX3 MUX2 MUX1 MUX0  --> 1110 1.1V (VBG)
  ADMUX = (0<<REFS1) | (0<<REFS0) | (0<<ADLAR) | (1<<MUX3) | (1<<MUX2) | (1<<MUX1) | (0<<MUX0);
}

void loop( void )
{
  int value;

  // Start a conversion 
  ADCSRA |= _BV( ADSC );
 
  // Wait for it to complete
  while( ( (ADCSRA & (1<<ADSC)) != 0 ) );

  // Scale the value
  value = (((InternalReferenceVoltage * 1023L) / ADC) + 5L) / 10L;

  Serial.println( value );
  delay( 1000 );
}

Here is my output:
~350 is 4 x AA (5.28v on multimeter) connected to Barrel jack.  500 is USB connected from computer.
Code:
351
358
357
357
356
357
356
356


500
500
500
500
500
500
500
500
500
13  Using Arduino / Project Guidance / Re: Uno Reference Voltage of 1.1v on: January 17, 2013, 08:29:34 pm
No my source is ~5v.   My reference voltage is 1.071v

So you'll be using the technique described in that post?  Using the battery voltage as a reference to measure the 1.071V bandgap?

Yes, it seems to be working.  The value I am getting off my battery with a multimeter though is 5.28v, but the value I am getting using the second technique in that post is 3.53v (I get 5.0v if I power it off USB).  Does that sound right?

Basically, I am trying to accurately log battery level for my project.  But as a side, I am trying to make sure my analogue values captured are accurate.
14  Using Arduino / Project Guidance / Re: Uno Reference Voltage of 1.1v on: January 16, 2013, 11:02:05 pm
...hook up the Positive of my battery power source to A1, read the value, and get 97.36363636363636% of that value as the current voltage in my battery source?

Your "battery power source" has a voltage less than 1.071?

No my source is ~5v.   My reference voltage is 1.071v
15  Using Arduino / Project Guidance / Re: Uno Reference Voltage of 1.1v on: January 16, 2013, 09:51:34 pm
Follow up question:  if my voltage is 1.071, and the system is expecting 1.1, does that mean I can hook up the Positive of my battery power source to A1, read the value, and get 97.36363636363636% of that value as the current voltage in my battery source?

Or would I need to get 102.7077497665733%  of it, to get the current battery source voltage.

2.7% is a fair amount to be out.  Aside from the above example, where else would you use a value like this?  I have a triply axis gyro/accel/temp in my project (connected to A4 and A5  - https://www.sparkfun.com/products/11028) does that mean I should expect my results there are 2.7% out also?

Or is it even more complex than that, and I have to apply the 2.7% to the current battery volt.  Check that against 5v (or 3.3v), and use that new ratio or 'something' against my values based on if my module is using 3.3v or 5v source from the arduino.
Pages: [1] 2