Show Posts
Pages: [1]
1  Using Arduino / Motors, Mechanics, and Power / Re: Servos move erratically with power connection on: June 05, 2011, 05:01:59 am
Oh ok, thanks! So much to learn smiley
2  Using Arduino / Motors, Mechanics, and Power / Re: Servos move erratically with power connection on: June 05, 2011, 01:11:29 am
When you power up a servo it will turn to its programmed position if not already there.  If you power it down at a different position to 'home' its likely to do this.

This ended up being the issue, so thanks for replying smiley I have been busy with the project the last couple of days and hadn't had time to reply to everyone else, but thank you everyone!

When I said I had all the grounds connected in series, I was meaning I had all the grounds connected in one column on a breadboard. Was this not the correct way to go about it?
3  Using Arduino / Motors, Mechanics, and Power / Re: Servos move erratically with power connection on: May 26, 2011, 11:56:45 pm
Yes, I'm fairly sure I've grounded them all together. I have the grounds of the servos and battery connected in series to the ground on the Arduino.
4  Using Arduino / Motors, Mechanics, and Power / Servos move erratically with power connection on: May 26, 2011, 11:40:00 pm
I'm having some trouble controlling the movement of three servos. Two are continuous rotation and one is a high torque servo, all rated to run on 6V.

The problem is that whenever I connect the servos to a 6V battery they spin erratically at full speed. The continuous rotation servos are not so much a problem because they only move a very small amount. The high torque servo however appears to do a 180deg turn. This happens regardless of whether I'm running a sketch, or if I disconnect the signal wires and just connect the battery terminals directly to the servo.

Is this something intrinsic to all servos or am I missing some fundamentals here? How could I possibly fix it?

I would appreciate any advice here, even if it's a stab in the dark. Cheers.
5  Using Arduino / General Electronics / Re: Switch giving wrong/no output on: May 09, 2011, 06:02:32 am
Thank you very much for taking the time to help me. I did make some very stupid errors in my 2 previous circuits, it hadn't occurred to me to think of the electron flow like that.

I downloaded Fritzing and built your circuit diagram and then rendered a 'real life' breadboard version and saw how I went very, very wrong. You have taught me plenty and today's learning curve has pretty steep for me, thanks! It's works like charm smiley
6  Using Arduino / General Electronics / Re: Switch giving wrong/no output on: May 09, 2011, 03:33:16 am
Thanks so much for all that, I was actually trying to create a pull-up on C through following the tutorial but I obviously went wrong. I still haven't soldered the switch connections because I don't want to solder until I have a 'working' circuit.

I'm fairly sure I've created the circuit that you've showed me, however the Arduino turns off whenever I connect 5V and turns back on as soon as I remove it. This makes me think I'm doing something unhealthy to the Arduino..

EDIT: I've attached a picture of what I made based on your diagram.
7  Using Arduino / General Electronics / Switch giving wrong/no output on: May 09, 2011, 12:31:29 am
I've been trying to follow LadyAda's tutorial on switches (http://www.ladyada.net/learn/arduino/lesson5.html) as best I can, though I'm getting some very strange results. I've attached a picture of my set up.

First of all, I am confused by the wiring because I am using a different switch to the tutorial. My switch has 3 pins (C-NO-NC) and from what I could find online C has the power source attached, NO means it returns LOW for an open switch and NC will return HIGH until pressed. With this in mind I've attached 5V to C, and NO to the breadboard.

Quote
int goPin = 2;

int goState;       //The current state of the switch
int val;           //Stores the current reading of the state of the switch


void setup() {
  Serial.begin(9600);
  pinMode(goPin, INPUT);           //Sets pin 2 to read the switch
  goState = digitalRead(goPin);    //Gets the current state of the switch
  Serial.println("Connection established..");
}

void loop() {
  val = digitalRead(goPin); //Read input value and store it in val
  
  if (val != goState) {
   if(val == LOW) {
    Serial.println("Button just pressed");
   } else {
     Serial.println("Button just released");
   }
  }
  
  goState = val;
}  


The problem I'm having is that nothing seems to happen in the serial monitor when the button is pressed. I have "Connection established" programmed to display so I know that it is communicating correctly, which it does. However I do get a HUGE amount of printing to the serial monitor whenever I touch the 10ohm resistor, or the yellow wire going from NO to the breadboard.

Can someone please explain where I might be going wrong?

Cheers

8  Using Arduino / Project Guidance / Re: Uno + Servos + IR Distance sensor = out of my depth? on: April 09, 2011, 09:59:08 am
how does it know when it is at the end of the track?

That's most probably going to be done with a physical sensor (switch etc.) which will get set when the robot hits the rail to move the program to a second state. I'll tackle that problem once the initial problems are sorted.

is there any reason you dont use some type of line-following setup? I believe that would be easyer than getting the IR sensors to track a 12mm rail.

We are restricted to a starting area so I can't place anything to follow on the track, it would be easiest though.

Thanks for replying so fast.
9  Using Arduino / Project Guidance / Uno + Servos + IR Distance sensor = out of my depth? on: April 09, 2011, 09:27:33 am
Hey guys,

I'm completely new to Arduino, though I've been trying to read up on as much as I can. Also, I realise the best way to learn is to probably just jump straight in and start doing things, but time and money is limited so I'm looking for a few pointers.

Let me set the scene so you can hopefully tell me whether my reasoning is correct.

My is aim to create a robot which can traverse a straight 4.3m (~14ft) path, turn around and come back, whilst remaining within +/-1cm (~0.39in) of the centre-line on the way down and +/-3cm (~1.2in) on the way back. The track has a 12mm rail around the sides of it and is approximately 1.2m (~4ft) wide.

When it gets to the end of one end of the track it needs to move 3 arms (at the same speed) from lying-flat to vertical, and apply about 200grams (~7oz) of pressure at a distance of 60cm (~2ft).

My plan of attack is to use an Arduino Uno with Atmega328 to control the following:
3x 17kg-cm (240 oz-in) Servos -http://www.robotgear.com.au/Product.aspx/Details/421
2x Continuous Rotation Servo - http://www.robotgear.com.au/Product.aspx/Details/482
2x Sharp IR Sensor GP2Y0A21YK0F (10-80cm) http://www.robotgear.com.au/Product.aspx/Details/271
2x 3 Pin JST connector for IR sensors http://www.robotgear.com.au/Product.aspx/Details/274

The top 3 servos will be to control the 3 arms which are required to apply a force. The next 2 servos are to drive the robot down the track and then turn around (they can't just go in reverse, the robot is required to pivot on the spot). I planned to use the two Sharp IR sensors to monitor the robots distance from the side rails and adjust the speed of the 2 drive motors accordingly to keep it running straight. To support the front of the robot I have two ball casters.

This is all going to be battery powered through a pack on the robot.

So if you've been kind enough to read the above, my questions are:
- Do I require anything else to do what I want to do?
- Am I approaching this right way, anything I should know?

I have some limited programming experience and most programming questions I've had I've already found answers for from browsing this forum. Where I trip up is the electronic logistical side of things, so I'm just making sure this is correct before I drop $200 on all these purchases.

I've tried to make this post as clear (and imperial friendly) as possible, hopefully it's not too long :) Thanks!
Pages: [1]