Show Posts
Pages: 1 2 [3] 4 5 ... 21
31  Using Arduino / Motors, Mechanics, and Power / Re: servo motor init pos set problem on: July 13, 2012, 04:49:45 am
If I got your point, that means that I must have a kind of turn-off-procedure that after turn-off command sets the arm to the position it's going to start from next time. If the system is shut down accidentally, jump will happen again, now how to totally avoid it please?

So I'd better use a stepper motor and couple it with a an encoder. Could you please leave some links to your favorite encoders you found people implemented on Arduino projects (from scratch) that you accept them as 'reliable' ones?
32  Using Arduino / Motors, Mechanics, and Power / servo motor init pos set problem on: July 13, 2012, 03:09:56 am
I'm practicing constrained translational arm mechanism with Arduino and servo, and when I turn on the system, servo as usual first take a fast path to initial position to set its zero. This gives an ugly movement from the start. I don't know how to force it to at least do this in a smooth movement, slowly, and not to jump every time I turn it on smiley

Any idea please? Well sure it is possible to go to dc motor and PWM but that needs to add h-bridge, while a servo is directly commanded by Arduino - cheaper.

33  Using Arduino / Project Guidance / Re: easiest throwing ball mechanism? on: June 29, 2012, 01:12:14 pm
Well I already got the desired results by implementing catapult, just curious to know more of various shooting mechanisms. By the way, I've never did any project with solenoid, very interesting to do one smiley
34  Using Arduino / Project Guidance / old question interrupt expansion on: June 29, 2012, 07:21:49 am
How best to expand Arduino external interrupts?

This must be a question of FAQ type, but I can't find many available solutions online for it. I read that one way is to use 2 Arduinos: one that has the interrupt enabled on the pin change, and the other that reads and acts when interrupted by the first one. The other way seems to be done by GIOP expander chips, which I still can't figure out how (if at all possible).

May be there are ready interrupt controllers we can use?

Please point me to the direction. Thanks.
35  Using Arduino / Project Guidance / Re: easiest throwing ball mechanism? on: June 29, 2012, 07:17:16 am
Look at putt return devices. It's just a solenoid that kicks the ball. You could put a solenoid in a piece of PVC pipe.

any example link please? can't find it in google!
36  Using Arduino / Project Guidance / Re: easiest throwing ball mechanism? on: June 29, 2012, 02:03:33 am
I googled catapult and found many examples of it. I finally implemented it not by a servo, but with ordinary dc motor, then in the path of throwing mechanism installed a bumper switch and connected it to int0 on digital pin 2, so that to some learn interrupting too.

It seems to work reasonably. Thank you and thanks to Lesto.
37  Using Arduino / Project Guidance / Re: easiest throwing ball mechanism? on: June 28, 2012, 02:39:26 pm
Any other constraints? Do you need to be able to aim it or control the speed? Is it single shot or does it need to be able to fire multiple balls? Any restrictions on size, weight, power supply etc?

My need is very simple: to shoot once, then get reset manually, no need for automation. Shooting power of max 100gr is enough. My powr supply is LiPo, Mystery, 2800mah, 30C.

I have servo and 12v dc motors available, but don't have imagination for shooting smiley

no more constraints.

38  Using Arduino / Project Guidance / easiest throwing ball mechanism? on: June 28, 2012, 05:22:38 am
I need to finish a mechanism to throw the ping-pong ball, or shoot the ball indoor (in the room), i.e. say for 5 meeter max in distance and 2 meter height max.

I googled for it but not much interesting results, so decided to ask here to point me to a good example

Thank you
39  Using Arduino / Project Guidance / Re: PD of PID in a balancing robot on: May 07, 2012, 02:59:01 am
True, I'd approach it and some other problems in a totally new design, hopefully to bring it to 1 level higher totally.

40  Using Arduino / Project Guidance / Re: PD of PID in a balancing robot on: May 05, 2012, 03:11:24 pm
Man, I just visited the links and the video clip there: when he leans the bot even just a degree, motors react, in my version, I have some 5 deg before reaction, I must take record a video before destructing the current one and upload here!
41  Using Arduino / Project Guidance / new chassis with new sensors.. on: May 05, 2012, 03:12:57 am
Ok, thank you all for continuous support!

Just received my new sensors: a separate gyro and a separate accel (my current sensor as you see on photos, has both of them combined on one board).

I can't rely on my old sensor, not really sure about its health, she is too old!

With new ones I'd first build a new chassis, with the hope that it gives me room to easily apply changes as you suggest and instruct. This will take probably around 2 weeks and I'd be back here with a new bot which (hopefully) also helps to answer the questions you kindly put (how goes the output of gyro if you do this/that?) easy and fast.

Please, if you have suggestions for the new chassis I'd build, proportionality info., etc. let me know. What I know for now is that, I'd for instance build the vertical axis in around 70cm height, so that to have it falling not too fast, and keep the base in a way I can add and remove weight to easily change the moment of inertia. Any other suggestions will be very welcome, I will apply them in 3D modeling of chassis in software and finally cut with CNC.

Thank you again,
42  Using Arduino / Project Guidance / Re: PD of PID in a balancing robot on: April 29, 2012, 12:32:41 pm
PeterH thank you for this much support, my aim is to do the project to learn something and I'm ready to try different direction that I took at first. So let's do it the way you suggest, but I've doubt I fully understand you in this (to measure gyro).

Do you mean that I post here simply information like:
1. if I keep robot stationary, output of gyro is x
2. leaning forward fast to around 45deg I get y

or what best way to answer your question "output of gyro" please?
43  Using Arduino / Project Guidance / Re: PD of PID in a balancing robot on: April 28, 2012, 03:00:49 pm
In your initial post code, there is some stuff after that, which I don't understand:
    analogWrite(RPWM, -output);
  }  [color=green]// probably not good enough, but understood up to here  ;)[/color]
  output = -1 * output;
    if(output >= 0)
    digitalWrite(RDIRA, HIGH);
    digitalWrite(RDIRB, LOW);
    analogWrite(RPWM, output);
    digitalWrite(RDIRA, LOW);
    digitalWrite(RDIRB, HIGH);
    analogWrite(RPWM, -output);

  }//if(!(angle>30 || angle < -30))
    analogWrite(LPWM, 0);
    analogWrite(RPWM, 0);

I assume output should represent the speed you want your robot to move. It does not need to be exactly proportional, but you should work on that a bit, too.
- What's the minimum/maximum speed your bot can do ? For smooth and easy contol, motor should react immediately with slow speed. Max speed should rather tell you when to give up.
- What's the dynamic behavior of your balancing rod when it falls ? angle / angular velocity  over time ?
- I think you don't need sin/cos even (5.7° = 0.1 * R is sufficient around your "set point") but a bit of math won't hurt.
- Did you consider that the more your sensor has left the 0° position, the more moving the motor will accelerate it ?  

oh, sorry, I just got that you are pointing this:
 output = -1 * output;
well, I just changed motors and swapped the left/right wires of motors and one of them started to turn not in the right direction, instead of changing in hardware, I added that line to just turn the output sign to the opposite one, which in turn effects on the 'if' decision and I got the motor turning again on the right direction.

I set 255 to get max. speed and it is claimed by the seller that this motor turns 300rpm, but I did not pass any motor identification process to give a reliable data of the speed.

dynamic behavior  - I'm not sure if I got what you mean by that, when it falls: it takes some 10 deg and only by then the motor reaction happens, which is late, and robot starts to fall, and motors get to turn so fast, until it falls completely and motors stop smiley-sad

 I think you don't need sin/cos even - also didn't get you! sorry!

the more moving the motor will accelerate it ? - no, I don't feel that, but I'd submit a behavioral video, so you all who are kindly helping see it, that is better than me describing it, yet with my English which is noisy smiley

44  Using Arduino / Project Guidance / Re: PD of PID in a balancing robot on: April 28, 2012, 02:52:05 pm
PeterH, I'm little bit confused that you say we don't need accel, actually without filtering, if using only gyro output, the big drift I'd have and change of set-point that happens, I get nothing, I tried it long before this experiment!

It is impossible in my practice to not to combine output of gyro and accel, and yet balance the bot! I've read so many works (of other people already done it) and everybody is doing it this way, writing that impossible to use only gyro!

Of course, I'm in no way on an authority to claim anything in control, just I report what I've read. Actually if you personally can do it, is because of your skills that I unfortunately don't have, all i have is a background in math and a lot of reading online about this project, and still with a bot that can't balance really smiley

45  Using Arduino / Project Guidance / Re: PD of PID in a balancing robot on: April 28, 2012, 02:20:59 am
I combine output of accelerometer and gyroscope to get a clean angle, as the gyro is fast but has a drift and accelerometer is slow on changes. This is the theory I learned: use not one of them (gyro or angle) but both of them and call it IMU, then filter output to get the angle.

gyro gives me the rate of change, but from accelerometer I receive the angle, knowing that it changes from -g to g.

I also submit the datasheet of both of my sensors so you have full information about them,

Pages: 1 2 [3] 4 5 ... 21