Show Posts
Pages: [1] 2 3
1  Using Arduino / Motors, Mechanics, and Power / Re: Help Stepper Motor GRBL T6560 on: August 22, 2013, 07:05:34 pm
I am running it at 2x...
2  Using Arduino / Motors, Mechanics, and Power / Help Stepper Motor GRBL T6560 on: August 22, 2013, 09:48:35 am
I sat down today to try and GRBL configured properly for my drivers and motors.  I think I made some progress on the settings, but I feel like it should be smoother and have less vibration than it does.

Here are the components I am working with:
Motor:
200 steps/rev 2A
https://www.sparkfun.com/products/10847

Driver board:
SainSmart CNC Router Single 1 Axis 3.5A TB6560 Stepper Stepping Motor Driver Board
http://www.amazon.com/gp/product/B008BGLOTQ/ref=oh_details_o01_s00_i00?ie=UTF8&psc=1

Everything Else
Arduino UNO+GRBL 0.8c



Here are the settings I began with, followed by my actions and notes:
Driver Board-
Current max = 2A
Stop Current = 50%
Microstepping = 1x
Current Decay = 0

GRBL-
$0,$1=3.281
$3=30
$4=750
$5=1100
NOTES=Lots of vibration, very loud, sounds like stronger and lower pitch version of "Wheel of Fortune Wheel"

$6=0.1 ->no change, changed back to 0
driver board current ->change to 1.6A, no change, changed back
change to half coil wiring on motor->no change, changed back to full coil
$1=6.562->faster, but still vibration
$1=13.124->more of a "whining" at high speed, still vibrates lots
$3=3->no change, changed back
driver board current to 1A->little quieter
driver board current to 0.5A->quieter
microstepping->2x, much quieter
$1=26.248->seems better, still has some vibration
driver board current to 1A->vibrates when accelerating (at start and end of moves)

Here is the video link, Sorry the sound is very low:


Any thoughts on how I can make it smoother/quieter?
3  Using Arduino / General Electronics / button pad question on: March 21, 2013, 08:17:18 pm
Hi all, just had a quick question about this shield:
https://www.sparkfun.com/products/7835

I have a similar component that I salvaged.  I expected it to short when I depress the button and contact is made.  Instead, I observe a resistance(cant recall what it was off the top of my head).
Does that seem correct?
Should the button be shorting the circuit? 
Will this still work with the arduino as a push button?
4  Using Arduino / Networking, Protocols, and Devices / Re: EFCom GPRS/GSM Shield on: January 19, 2013, 11:09:42 am
So one thing I just noticed, is that if the shield and arduino stop sending texts, I can just reset the phone shield, everything works again.

I am still a newb so I had just copied/pasted variables.  If something should be unsigned, I will change it.

I did not initialize the serial and debug because the device is not connected to a computer.  At the moment it is in use, I quickly made it for a family member and they have it.
5  Using Arduino / Networking, Protocols, and Devices / Re: EFCom GPRS/GSM Shield on: January 19, 2013, 10:34:54 am
PaulS, I cant tell if you are angered by my posts or just sarcastic.  But I am going to take it in good humor.

Below is my code, hopefully it is not too sloppy:
Code:
long prev1 = 0;
long prev2 = 0;
int sensorPin = 0; //the analog pin the TMP36's Vout (sense)
float current_tempF = 0;
unsigned long check_interval = 600000;
unsigned long text_interval = 86400000;
//unsigned long text_interval = 28800000;

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);

void setup() {
  mySerial.begin(19200);               // the GPRS baud rat
  //Serial.begin(19200);
  CheckTemp();
  SendText(current_tempF);
}

void loop() {
    long now = millis();

  do {
    now = millis();
   
    //check if temperature is low
    if( now - prev2 > (check_interval) ){
      CheckTemp();
      if( current_tempF < 60 ){
        SendText(current_tempF);
      }
      prev2 = millis();
    }
    //send the daily text message
    if( now - prev1 > (text_interval) ) {
      CheckTemp();
      SendText(current_tempF);
      prev1 = millis();
    }

  } while( true );
}

void CheckTemp(){
  int reading = analogRead(sensorPin); 
  float voltage = reading * 5.0;
  voltage /= 1024.0;
  current_tempF = ((voltage - 0.5) * 900.0 / 5.0) + 32; 
}

void SendText(float msg) {
  //mySerial.println("AT+SWRESET");
  //delay(500);
 
  mySerial.println("AT"); // Sends AT command to wake up cell phone
  delay(500);

  mySerial.println("AT+CMGF=1"); // Puts phone into SMS mode
  delay(1000); // Wait a second

  mySerial.println("AT+CMGS=\"+15553334444\""); // Creates new message to number
  delay(1000);

  mySerial.print("The temperature is "); // Message contents
  mySerial.println(msg);
  delay(1000);

  mySerial.write(26);
  delay(1000);

  //mySerial.println("AT+CMSS=1"); // Sends message at index of 1
  //delay(1000);

  //mySerial.println("AT+CMGD=1"); // Deletes message at index of 1
}

6  Using Arduino / Networking, Protocols, and Devices / Re: EFCom GPRS/GSM Shield on: January 18, 2013, 10:28:54 pm
So I have written my code and my arduino/shield work fine...for a while.  After a few days or so the gsm sheid seems to stop sending sms'.  I am only able to get things working by resetting the gsm shield (not the arduino)

does anyone have any suggestions?
7  Using Arduino / Networking, Protocols, and Devices / Re: EFCom GPRS/GSM Shield on: December 11, 2012, 07:57:03 pm
AND....Facepalm!

I just realized that I cannot power the arduino and shield from my computer's usb port.  I plugged in the ac adapter and it is now working.
8  Using Arduino / Networking, Protocols, and Devices / Re: arduino gsm shield on: December 11, 2012, 07:49:11 pm
Well I followed the tutorial at:
http://www.elecfreaks.com/wiki/index.php?title=EFCom_GPRS/GSM_Shield

but I do not believe that the shield is connecting to my network, ie. I do not see the flashing light they mention every 3 or so seconds.

I just see the solid pwr LED.  Anyone have one of these?
9  Using Arduino / Networking, Protocols, and Devices / EFCom GPRS/GSM Shield on: December 11, 2012, 02:01:24 pm
I just received this gsm shield:
http://www.elecfreaks.com/store/gprsgsm-shield-efcom-p-415.html

I would like to use one of the analog pins in addition to this shield.  Does anyone know whether the shield actually uses that IO?  Can I just solder on some female IO adapters that pass through the shield?

This wiki has lots of help:
http://www.elecfreaks.com/wiki/index.php?title=EFCom_GPRS/GSM_Shield


STILL Looking for advice on using the analog IO.....


UPDATE:
http://elecfreaks.com/store/download/datasheet/wireless/EFcom_v1.2.pdf
I found this schematic, and it seems to indicate that the analog IO side is free...

Can some one confirm?
10  Using Arduino / Networking, Protocols, and Devices / Re: serial connection to c168i on: December 02, 2012, 05:56:08 pm
So forget about the do loop, I just copied that from my other code.

The serial connection is hooked up correctly, because the phone does compose the text message, just doesnt always send.  Is there any other way I can troubleshoot this?
11  Using Arduino / Networking, Protocols, and Devices / Re: serial connection to c168i on: November 29, 2012, 06:09:36 pm
UPDATE:
I switched the serial port used to communicate with the phone to the softserial (2,3), and was able to get some response from my phone.  Here is what I get when I run the code used in the previous post:
Quote
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX
ÿÿÿÿÿÿÿÿX

my serial monitor is set to 9600, does anyone know what this means?

Seems like this is the serials version of -1 (255)?  Anyone know how I can use that?
12  Using Arduino / Networking, Protocols, and Devices / Re: serial connection to c168i on: November 28, 2012, 10:31:48 am
I appologize, I made a mistake and posted the incorrect code.  I have removed it to hopefully avoid confusion.

Here is my code that I used to try and listen:

EDIT: UPDATED  CODE TO BELOW:

Code:
long prev1 = 0;

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3); // RX, TX

void setup(){
  Serial.begin(9600);
  mySerial.begin(4800);
}

void loop() {
      long now = millis();

  do {
    now = millis();
   
    if( now - prev1 > (3000) ){
      SendText();

      prev1 = millis();
    }

  } while( true );
}

void SendText() {
  mySerial.println("AT+SWRESET");
  Serial.write(mySerial.read());
  delay(500);
 
  mySerial.println("AT"); // Sends AT command to wake up cell phone
  Serial.write(mySerial.read());
  delay(500);

  mySerial.println("AT+CMGF=1"); // Puts phone into SMS mode
  Serial.write(mySerial.read());
  delay(1000); // Wait a second

  mySerial.println("AT+CMGW=\"+17084979117\""); // Creates new message to number
  Serial.write(mySerial.read());
  delay(1000);

  mySerial.print("The temperature is:"); // Message contents
  mySerial.println("80");
  Serial.write(mySerial.read());
  delay(1000);

  mySerial.write(26);
  Serial.write(mySerial.read());
  delay(1000);

  mySerial.println("AT+CMSS=1"); // Sends message at index of 1
  Serial.write(mySerial.read());
  delay(1000);

  mySerial.println("AT+CMGD=1"); // Deletes message at index of 1
  Serial.write(mySerial.read());
  Serial.println('X');
}
13  Using Arduino / Networking, Protocols, and Devices / Re: serial connection to c168i on: November 27, 2012, 09:23:48 pm
EDIT: REMOVED, BAD POST
14  Using Arduino / Networking, Protocols, and Devices / Re: serial connection to c168i on: November 21, 2012, 09:22:50 pm
OK I have re-written the code.  How does this look?
Code:
long prev1 = 0;
long prev2 = 0;
int sensorPin = 0; //the analog pin the TMP36's Vout (sense)
float current_tempF = 0;
long check_interval = 3000;
long text_interval = 120000;

void setup() {
  Serial.begin(4800);
}

void loop() {
    long now = millis();

  do {
    now = millis();
   
    //check if temperature is low
    if( now - prev2 > (check_interval) ){
      CheckTemp();
      if( current_tempF < 60 ){
        SendText(current_tempF);
      }
      prev2 = millis();
    }
    //send the daily text message
    if( now - prev1 > (text_interval) ) {
      CheckTemp();
      SendText(current_tempF);
      prev1 = millis();
    }

  } while( true );
}

void CheckTemp(){
  int reading = analogRead(sensorPin); 
  float voltage = reading * 5.0;
  voltage /= 1024.0;
  current_tempF = ((voltage - 0.5) * 900.0 / 5.0) + 32; 
}

void SendText(float msg) {
  pinMode(13, OUTPUT); // Initialize pin 13 as digital out (LED)

  Serial.println("AT"); // Sends AT command to wake up cell phone
  delay(1000);

  Serial.println("AT+CMGF=1"); // Puts phone into SMS mode
  delay(1000); // Wait a second

  Serial.println("AT+CMGW=\"+17084979117\""); // Creates new message to number
  delay(1000);

  Serial.print("The temperature is:"); // Message contents
  Serial.println(msg);
  delay(1000);

  Serial.write(26);
  delay(1000);

  Serial.println("AT+CMSS=1"); // Sends message at index of 1
  delay(1000);

  Serial.println("AT+CMGD=1"); // Deletes message at index of 1
}

After testing, there is still something wrong with the text messages.  They appear in the outbox, and the content looks good, however, there is a red circle with a slash though it when I look at the list of messages sitting in the outbox and they do not always get sent.

Does this make any sense?
15  Using Arduino / Networking, Protocols, and Devices / Re: serial connection to c168i on: November 18, 2012, 07:22:14 pm
Code:
        time = time + interval;
Adding times is not a good idea. Overflow is not handled properly with addition.
Code:
    delay(interval);
If you are going to use the dreaded delay(), why bother with relative times, anyway.
I initially tried to not use the "dreaded delay".  You may be correct, and this could be part of my problem.  I will try and revert back to code that does not use the delay.


Code:
  Serial.begin(4800); // Open serial connection at baud rate of 4800
This belongs in setup(). You don't need to do this every time you want to send a text message.
Code:
  Serial.end();
You don't ever need to do this.
I did have this in the "setup", but I moved it into the loop because I was afraid that there was some sort of connection issue between my code and the phone (over time).  I will move it back.


Code:
  delay(2000); // Wait a second
Can't count, huh?
I can't tell you how hard this made my laugh! smiley  Initially, it was 1000, but I did end up changing it.


Every AT command elicits a response. Why do you not read the responses?
I suppose I could, I am not sure where I would store them?  How could I read these?

Pages: [1] 2 3