Show Posts
Pages: [1] 2 3
1  Using Arduino / Project Guidance / Connect Arduino Serial Out to Windows on: January 09, 2014, 02:47:53 am
Hello, In the past I have connected my Arduino to my Pi, and sent commands both ways.

However, I am changing and now want a Windows machine connected to my Arduino instead.

How do I do this programatically/physically?   I have only ever done this to use the IDE, but in this case I do not want to use the IDE< i only want to send data both ways.

thanks
greg
2  Using Arduino / Project Guidance / Mega WiFi Advice on: November 03, 2013, 11:06:38 pm
Hello, I have a project, where I want to connect to a WebServer from my Arduino Mega.  I want to do two things:

1. Have Mega send a string of about 50 characters in a header
2. Have the Mega receive a string of about 15 characters in the body of a different webpage

We are talking low traffic here, each request is once every 5 minutes.  And speed is not important.

The WebServer is PaaS so I sort of have control over it.  But I have full control over the content anyway.

I have WiFi Internet available at the location of the Arduino Mega.  I do not want to host a webserver on the Mega.

Can someone please suggest a reliable but cheap WiFi module/shield for this?  From what I see they range is price by a long way.  I am in Australia so ebay would be ideal.

thanks
greg
3  Using Arduino / Programming Questions / bitRead( PORTD,22) on a Mega on: August 21, 2013, 06:13:19 am
Hi Al, I am trying to read the High/Low Status of a Arduino Mega, Pin 22 and 48 (both set to OUTPUT).

I thought this would work:
Code:
Serial.print(bitRead( PORTD,22));
 Serial.print(",");
 Serial.print(bitRead( PORTD,48));

But it always gives me a :  0

I have seen people ask this question before, but I think they are all UNO.  Does anyone know if this is the same command for a Mega>?  Or what I am doing wrong?

thanks
4  Using Arduino / Project Guidance / Re: 20amps @ 5v on: August 21, 2013, 12:51:25 am
Hi All, thanks for your help.

Quote
Some other words of caution; you have been talking about these relays as being 20A relays. In fact they should not be used above 8A as the website
To confirm, I was saying I thought I would have to push 5v @ 20amp in total to turn the relays on.  However the GND back to the Arduino fixed that at 5v @ 2.8amp in total.  Each relay will only be used for basic things like turning lights on and off.

Quote
Finally you should ensure that the AC terminals on the relays are well enough shielded that fingers cannot touch them.
Yep, where the terminals and relays are connected I have hot glued them already, then once the power cables are connected and I am happy for a few weeks, I will also hot glue those.

Quote
I'm to the point that if someone can't find a way (Windows Paint, GIMP, etc) to reduce the size of their schematics below 10x screen size, I am not likely to bother.
Sorry about that, as I was only looking at it in windows, I didnt realise it was large.

Quote
It won't require much, but 30 or 32 AWG (cat5/6 cable) is NOT big enough for 8A (I want to say 16AWG is, but you should double check).

To confirm, the cat6 is only powering the relay, so I think it was worked out at 5v @ 0.2amp each.  And I will go with the Star, which I presume will also help.  The 240v itself connecting to the relays are proper power 1 meter extension cords.

Quote
Why do you have the Arduino?  What intelligence is it adding to this circuit?
The Arduino is controlling when to turn them on/off.
5  Using Arduino / Project Guidance / Re: 20amps @ 5v on: August 19, 2013, 03:49:57 pm
Quote
Where is the ground connection to the Arduino?
That is what I was meaning by there not being a circuit to the arduino.



For the WIN.  It looks like its much happer once I ground the GND back to the Arduino also.  THANK YOU ALL.

So, a Ring v's a Star.  Does it matter?   My wire is Cat6 strands. 
6  Using Arduino / Project Guidance / Re: 20amps @ 5v on: August 19, 2013, 03:46:37 pm
It looks like he's using twisted pair network cable, which is usually 26 - 28 AWG depending on how cheap it is. Could he be drawing too much current for that thin wire? Its also not meant to be bent a lot, the inner wire can break without breaking the insulation.

Correct, it was the only solid core cable the local Jaycar had.  Multimeter tells me my ring has connection all the way around.
7  Using Arduino / Project Guidance / Re: 20amps @ 5v on: August 19, 2013, 12:45:23 pm
These images might help



8  Using Arduino / Project Guidance / Re: 20amps @ 5v on: August 19, 2013, 06:56:54 am
I have a adapter already 5v @6amp, and it can only power 5.  And another I have 5v @ 2amp, can only power 1.

Does it mean I have done something wrong putting them together maybe?

I have each of them daisy chained, that should be ok shouldnt it?e
9  Using Arduino / Project Guidance / Re: 20amps @ 5v on: August 19, 2013, 06:35:03 am
This is what I used:
http://upload.wikimedia.org/wikipedia/commons/d/db/Resistive_divider.png

Then I applied this calculator, and tried all different resistor combinations.
http://www.raltron.com/cust/tools/voltage_divider.asp
10  Using Arduino / Project Guidance / 20amps @ 5v on: August 19, 2013, 05:56:49 am
Hi All, as per the unanswered post half way down, I have 14 of these:  https://www.sparkfun.com/products/11042

I need to power it somehow, can anyone suggest something.  I was thinking something like one of these:

http://www.ebay.com.au/itm/5V-20A-100W-Regulated-Switching-Power-Supply-/160768219907?pt=AU_B_I_Electrical_Test_Equipment&hash=item256e885b03

Does that sound right?  20amp should just be enough, but would 100w be enough?   Is there a better way?

I have tried getting a old laptop power supply thats 15v @ 5amp, figuring if I step it down to 5v, it should be 15amp.  I can get it down to 5v, but then it cant even seem to power 1.  As soon as I put any load on it, it drops down to 0v.  I have tried many different sources, and all the same result.

thanks
greg
11  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);
}
12  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
13  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
14  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
15  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';
}


Pages: [1] 2 3