Show Posts
Pages: [1] 2 3 ... 74
1  Using Arduino / Project Guidance / Re: solar tracker problem on: Today at 03:32:07 am
Hi
Quote
I find calculating the positions of the sun easier and less prone to error, the math is not that scary.

[soapbox] I agree with Robin2,  anywhere on the earth and the LDR's will work without any calculating, also the LDRs will track to the brightest part of the sky, which is not the sun behind a cloud.

Also the sun as it approaches the horizon is diffracted so its apparent position does not follow an algorithm.[/soapbox]

Can you post picture of your project, also if you are using protoboard as in the fitzing diag, check that you have continuity down the two power supply rows on the outer edge, some have a break halfway down.
Also powering the servos off the 5V of the arduino is not recommended due to current needed to drive servos.

Tom..... smiley
2  Using Arduino / Project Guidance / Re: Need some help on a ultrasonic sensor problem on: Today at 03:06:19 am
Hi, when you ping your ultrasonics you cannot do both at the same  time, because you cannot check to see which reflection is from which transmitter.
I suggest you ping one , wait and get a reading, then ping the other, that way you will be sure that you are only receiving the  relevant reflection.

Please can you post a copy of your complete sketch, use #code tags, a picture of your project and a CAD or picture in jpg,png, or pdf of your circuit.
You have the project in front of you, we don't, so we need as much information as possible to get up to speed, this way we will be making suggestions that may save you and us time and replies.

Thanks.. Hope to help

Tom..... smiley
3  Using Arduino / Project Guidance / Re: Load Cell, INA128, Uno : Counting coins by weight on: April 18, 2014, 07:32:08 pm
Hi, did the load cell have a measuring plate that fitted on top of the cell, you have what I think is a zero offset.
Do you get changing readings whent you apply mass to the assembly?
You can do the offset correction externally with a potentiometer or with the sketch.


[soapbox] Sorry but projects like the one you have mentioned worries me when the writer cannot supply a circuit diagram, but connect a to b, c to d, must be a designer from IKEA.[/soapbox]

Tom..... smiley
4  Topics / Robotics / Re: Arduino output to e bike controller on: April 18, 2014, 02:50:32 am
Hi, with the level or lack of comprehensive connection information, I would first be contacting the seller and  getting him to send you the manual for it.
Or a PROPER connection diagram.
I am glad that the seller does not ship to Australia.

Tom....... smiley
5  Using Arduino / General Electronics / Re: High Voltage Regulation on: April 17, 2014, 08:49:12 pm
Hi, how do  you want to control the High Voltage, is it DC or AC.
If you want to just control AC mains appliances and lights, then you will need opto coupling triac controllers, not voltage regulators.
Try this section of the forum, dedicated to home automation if that is what you are trying to do.

http://forum.arduino.cc/index.php?board=16.0

Hope  this helps.
Tom......... smiley
6  Using Arduino / Programming Questions / Re: Variable changed without code on: April 16, 2014, 04:23:40 pm
Hi, try

!=     instead of  =!


Tom....... smiley
7  Using Arduino / Project Guidance / Re: How to increase the dc motor's speed(andFrequency)value more than255(and64KHZ)? on: April 16, 2014, 02:57:03 am
Hi, what is your project, what are you doing with the motors?
Increasing the 64kHz will not increase the speed of the motors, and as Mike has said, 255 is full power to them.
A picture of your project and a picture or CAD of your circuit in PDF, jpg or png would be help full.
At the moment you know how your project works and what you want it to do, the forum members don't, so you need to give us as much information, including pictures, so we can help you.

Tom...... smiley
8  Using Arduino / Motors, Mechanics, and Power / Re: Can't wire my stepper motor to make it work! on: April 15, 2014, 04:26:53 pm
Hi, Lucy , good to hear, and as Mike says you can make it reverse, the code I supplied is a very crude  and there are other more efficient sketches to do the job.

Stroeda, I had a close look at the pictures and it looks like the IC is in the wrong way around, the notch in the end of the IC should match the notch in the screen overlay on the PCB.
The correct way is with the notch towards the closest edge of the PCB.

Tom........ smiley
9  Using Arduino / Motors, Mechanics, and Power / Re: Don't get step motor 28byj-48 running on: April 14, 2014, 09:26:52 am
Hi, you don't have to have the stepper plugged in to see the driver working, the LEDs are connected to each output.
So, if they light up in a pulsing run then the stepper is being driven.

The code I supplied is already set up to 2 to 5, all you hand to do was move the wires n your project to pins 2 to 5.
If you changed my code to 8 to 11 and moved the wires to 2 to 5 then it won't work.

Tom..... smiley
PS, In your pictures I see one LED lit, is that all that happens?
You can do a basic test on the driver, take all the four control wires out of the arduino, then connect each one to the 5V pin on the arduino, that is you connect each input of the driver board to 5V, as you connect each to 5V the corresponding LED on the driver PCB should light up.
10  Using Arduino / Motors, Mechanics, and Power / Re: Don't get step motor 28byj-48 running on: April 14, 2014, 08:00:14 am
Hi, there is an other tread by a different person with a similar problem.
I have the same stepper and driver board and I had trouble with the sketch you are using.
Try this code, I can't remember where I got it, I have moded it so that the value of  val  is set in the code and not by a potentiometer as it was originally intended.
Code:
/*
 Stepper Motor Control - speed control
 
 This program drives a unipolar or bipolar stepper motor.
 The motor is attached to digital pins 2 - 5 of the Arduino.
 A potentiometer is connected to analog input 0.
 
 The motor will rotate in a clockwise direction. The higher the potentiometer value,
 the faster the motor speed. Because setSpeed() sets the delay between steps.
 
 */


int IP1;
int IP2;
int IP3;
int IP4;
int val;
int ddelay;
int dddelay;

void setup() {
  // nothing to do inside the setup
  IP1=2;
  IP2=3;
  IP3=4;
  IP4=5;
  Serial.begin(9600);
  pinMode(IP1,OUTPUT);
  pinMode(IP2,OUTPUT);
  pinMode(IP3,OUTPUT);
  pinMode(IP4,OUTPUT);
}

void loop() {
//  val = analogRead(0);
val=1000;   //   Sets speed 0 to 1000
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay =constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
 
  digitalWrite(IP1, HIGH);
  digitalWrite(IP2, HIGH);
  digitalWrite(IP3, LOW);
  digitalWrite(IP4, LOW);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay =constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, LOW);
  digitalWrite(IP2, HIGH);
  digitalWrite(IP3, LOW);
  digitalWrite(IP4, LOW);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
dddelay =constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, LOW);
  digitalWrite(IP2, HIGH);
  digitalWrite(IP3, HIGH);
  digitalWrite(IP4, LOW);
  delay(dddelay);
 //  val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay =constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, LOW);
  digitalWrite(IP2, LOW);
  digitalWrite(IP3, HIGH);
  digitalWrite(IP4, LOW);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay=constrain(dddelay,3,500);
    Serial.print(ddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, LOW);
  digitalWrite(IP2, LOW);
  digitalWrite(IP3, HIGH);
  digitalWrite(IP4, HIGH);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay=constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, LOW);
  digitalWrite(IP2, LOW);
  digitalWrite(IP3, LOW);
  digitalWrite(IP4, HIGH);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay=constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, HIGH);
  digitalWrite(IP2, LOW);
  digitalWrite(IP3, LOW);
  digitalWrite(IP4, HIGH);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay=constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, HIGH);
  digitalWrite(IP2, LOW);
  digitalWrite(IP3, LOW);
  digitalWrite(IP4, LOW);
  delay(dddelay);
}


Note that I use pins  2 to 5, but you can change the code to use 8 to 11.

Tom..... smiley
PS note that this stepper has a gearbox in it so it will not turn very fast.
11  Using Arduino / Motors, Mechanics, and Power / Re: Can't wire my stepper motor to make it work! on: April 13, 2014, 07:14:03 am
Hi, i have found that I have the same board and stepper, so I set it up, it did work, but there was no direction change.
Try this sketch, that I found ages ago and moded so that it runs without a speed pot.
Used pins 2,3,4,5 and see what happens, this stepper is 5V and I am able to run it off the arduino 5V.

Code:
/*
 Stepper Motor Control - speed control
 
 This program drives a unipolar or bipolar stepper motor.
 The motor is attached to digital pins 2 - 5 of the Arduino.
 A potentiometer is connected to analog input 0.
 
 The motor will rotate in a clockwise direction. The higher the potentiometer value,
 the faster the motor speed. Because setSpeed() sets the delay between steps.
 
 */


int IP1;
int IP2;
int IP3;
int IP4;
int val;
int ddelay;
int dddelay;

void setup() {
  // nothing to do inside the setup
  IP1=2;
  IP2=3;
  IP3=4;
  IP4=5;
  Serial.begin(9600);
  pinMode(IP1,OUTPUT);
  pinMode(IP2,OUTPUT);
  pinMode(IP3,OUTPUT);
  pinMode(IP4,OUTPUT);
}

void loop() {
//  val = analogRead(0);
val=1000;   //   Sets speed 0 to 1000
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay =constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
 
  digitalWrite(IP1, HIGH);
  digitalWrite(IP2, HIGH);
  digitalWrite(IP3, LOW);
  digitalWrite(IP4, LOW);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay =constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, LOW);
  digitalWrite(IP2, HIGH);
  digitalWrite(IP3, LOW);
  digitalWrite(IP4, LOW);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
dddelay =constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, LOW);
  digitalWrite(IP2, HIGH);
  digitalWrite(IP3, HIGH);
  digitalWrite(IP4, LOW);
  delay(dddelay);
 //  val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay =constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, LOW);
  digitalWrite(IP2, LOW);
  digitalWrite(IP3, HIGH);
  digitalWrite(IP4, LOW);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay=constrain(dddelay,3,500);
    Serial.print(ddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, LOW);
  digitalWrite(IP2, LOW);
  digitalWrite(IP3, HIGH);
  digitalWrite(IP4, HIGH);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay=constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, LOW);
  digitalWrite(IP2, LOW);
  digitalWrite(IP3, LOW);
  digitalWrite(IP4, HIGH);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay=constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, HIGH);
  digitalWrite(IP2, LOW);
  digitalWrite(IP3, LOW);
  digitalWrite(IP4, HIGH);
  delay(dddelay);
//   val = analogRead(0);
  ddelay = map(val, 0, 1006, 500, 3);
  dddelay=constrain(ddelay,3,500);
    Serial.print(dddelay);
    Serial.print("  ");
    Serial.println(val);
  digitalWrite(IP1, HIGH);
  digitalWrite(IP2, LOW);
  digitalWrite(IP3, LOW);
  digitalWrite(IP4, LOW);
  delay(dddelay);
}

val is set to 1000, the lower the value the slower the speed, so you can see the stepper control strobe.

Hope it helps.

Tom... smiley
12  Using Arduino / Motors, Mechanics, and Power / Re: Can't wire my stepper motor to make it work! on: April 13, 2014, 06:29:55 am
Hi, do all the LEDs flash, if so then the output of thre driver chip is working, that is pulsing the relevant wires to the stepper motor.
Does the motor appear to buzz or move at all, the LEDs I think you will find are red LEDs.
Can I make a suggestion, you use pins 8 to 11 as per the sketch originally and see if it works.

Tom....... smiley
13  Using Arduino / Displays / Re: lcd 20x4 problem on: April 13, 2014, 05:19:45 am
hi,

Code:
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

I think you should also change,
 lcd.begin(16, 2);
to
 lcd.begin(20, 4);

Tom..... smiley
14  Using Arduino / General Electronics / Re: can't reach 5v with R2R DAC on: April 13, 2014, 04:02:29 am
Hi, when you took the measurements in reply #13, were ALL the outputs high?
All outputs need to be high for highest output on output node.
Please check.

Tom...... smiley
15  Using Arduino / General Electronics / Re: Power Supply voltage dropping - faulty supply ? on: April 12, 2014, 07:04:50 pm

Quote
At the end, I was left with a totally disconnected Mega 2560 ( all wires are on male header pins, so were physically removed ) and still no change.

So I suspected the Arduino and ethernet shield.

Removed the shield - no change.

Disconnected the Mega and connected a spare, brand new, Mega - same reading - so unlikely that the Mega was damaged and causing the drain.

Disconnected the Mega and connected a spare, brand new, Mega - same reading - so unlikely that the Mega was damaged and causing the drain

This is where your logic slipped, you have everything disconnected and output still 9V, so supply is U/S.

Tom........ smiley
Pages: [1] 2 3 ... 74