Show Posts
Pages: 1 ... 23 24 [25] 26 27
361  Using Arduino / Motors, Mechanics, and Power / Re: Arduino Motor Shield Stepper Motor control with Joystick on: November 24, 2012, 10:29:31 am
could you give more info on how exactly you one to control the motor with the joystick.
what i mean is what does pushing the joystick to the right do to the motor and what know, please explain so we could help you more
362  Using Arduino / Motors, Mechanics, and Power / Re: L293D H-bridge with 2 pins instead of 3? on: November 24, 2012, 10:25:23 am
i could only say that yes you can use the 2 pin instead of 3. here's a link that might help you more
http://www.societyofrobots.com/member_tutorials/book/export/html/159
363  Using Arduino / Motors, Mechanics, and Power / Re: Potentiometer Controlled Motor with Feedback on: November 24, 2012, 10:16:29 am
urm maybe one of the possible code

Code:
boolean Set;
void setup()
{

  pinMode(pot1, INPUT);
  pinMode(Mtr , OUTPUT);
  int A=digitalRead(pot1);
  digitalWrite(Mtr,HIGH);
  delay (100);
  digitalWrite(Mtr, LOW);
  int B=digitalRead(pot1);
  if (A > B ) Set =HIGH;
  if (A< B) Set = LOW;
}
void loop()
 {
   if (Set == HIGH);
   {// fill your code here
    }
    if ( Set == LOW);
    { //
     }
}
364  Using Arduino / Motors, Mechanics, and Power / Re: Potentiometer Controlled Motor with Feedback on: November 24, 2012, 10:07:24 am
well the idea that you want to do is something that most of us, well at least the people i know would want to do. and yes the way you want to program is consistent with the behavior you would like to achieve. but way i suggest a different way?

how about in the setup area you make a code that turn the motor slightly, and monitor the changing value of the pot. for instant, if the motor rotate clockwise the value increase then some setting is set as high, and if the motor rotate clockwise but the value decrease then the some setting is set low. this way your motor will have to be calibrated only once each time the code run. thus could make your project more efficient .
365  Using Arduino / Motors, Mechanics, and Power / Re: Potentiometer Controlled Motor with Feedback on: November 22, 2012, 08:05:16 am
You know since i read about your post, it got me thinking about how to make the project. it seem to me that the electronic side of it you may or may not have got it covered but what im trying to do now is to make the code side.

urm the way i see it is that first both pot value must be known. actually in my lasted opinion now is that you do not need to know the center for the pot. but what we are truly interested is by how much the position differ...

urm maybe be it could be like this

Code:
int I  =analogRead(POT1);
int K  =analogRead(POT2);
if ( I==K )
{
 //fill in how you would want to stop your motor.
}
else
 {
   if ( I > K )
{
  // maybe turn your motor clockwise
}
   if ( I<K)
{//maybe turn your motor anticlockwise
}
}

the code above is just an example. how ever this assume that the motor would be driven at full speed in either direction. this setup will make the motor overshoot but over time it will reach a stable position.

try to minimize this overshoot with PID control or even fuzzy control.
You know when i think about its a simple speed ramp control might just do the trick... urm maybe a trapezoidal speed ramp?
366  Using Arduino / Motors, Mechanics, and Power / Re: Potentiometer Controlled Motor with Feedback on: November 22, 2012, 05:49:24 am
well ok, your drawing is consistent with my imagination of your project...
urm.. does your motor need to have a speed control with it or just a simple full speed ahead kinda thing?
367  Using Arduino / Motors, Mechanics, and Power / Re: 12V PC fan voltage control on: November 22, 2012, 01:25:54 am
technically i would say that yeah i would always choose the pwm way. but if your the type that is result oriented then the method i suggest will get you far enough.
368  Using Arduino / Motors, Mechanics, and Power / Re: 12V PC fan voltage control on: November 21, 2012, 06:01:42 pm
sorry for me to interrupt. but for me since the motor would be always on then why not use a relay?
connect the red wire to the comment of a relay and the black to ground. on the one of the N.O. just put a 12VDC or the V max of the motor while the other use a well any kind of volatage converter you know to power that motor. just put a transistor and a diode to activate the relay. this will make it run at different speed.
369  Using Arduino / Motors, Mechanics, and Power / Re: Quadrature encoder on: November 21, 2012, 11:51:29 am
i don't know if this link to be much help to you but here's one that is as precise i have ever seen

http://www.qsl.net/oe5jfl/encoder.htm
370  Using Arduino / Programming Questions / Re: Need some help to complete my code! on: November 21, 2012, 07:41:32 am
may i ask if this process have anything to do with maybe a cnc or linear movement?
its look like your trying to manually jog the stepper motor


urm why do you need to use the proximity sensor?
371  Using Arduino / Motors, Mechanics, and Power / Re: Potentiometer Controlled Motor with Feedback on: November 21, 2012, 06:54:25 am
ok now i understand. basically you want to make the second potentiometer as a knob you would control this making is almost like the knob example like the one that the arduino IDE gave in its servo sample. Am i correct about this?

well if this what you one i am gonna give you some hints...
1)set the middle value of both pot.
2)determine which part of the value will make the motor turn clockwise or anticlockwise
3) compare the value of both pot
4) the difference between the pot could be use as to determine the speed
5) decide on what type of breaking you want to use
6) if both pot is the same value then the motor should stop.
7) if you could use PID control /fuzzy control would be great.
please keep me updated with your progress..
372  Using Arduino / Motors, Mechanics, and Power / Re: Potentiometer Controlled Motor with Feedback on: November 21, 2012, 06:46:05 am
i dont really get about your project description
i mean i get that you have one Hbridge circuit, 1 motor and 2 potentiometer. and arduino rite
i know that your set up is so that the arduino will give the signal to the h bridge to move the motor,
and by hooking up one of the pot to a output shaft of the motor, you are essentially making a close loop control to the motor where by the the output of the potentiometer is being monitored by the arduino.
what is the purpose of the second potentiometer?
373  Using Arduino / Motors, Mechanics, and Power / Re: Potentiometer Controlled Motor with Feedback on: November 21, 2012, 06:38:32 am
I am really interested in your project. well from what i can say is that your now trying to make a diy servo with a dc motor and a potentiometer?
urm what kind of circuit are you using rite now? i really like to see that for me to know what kind of control u would need. but if i may i would like to suggest to you this kind of circuit

http://www.societyofrobots.com/member_tutorials/book/export/html/159

use the one in the middle of the page call

3.1 - 600mA DC motor controller, up to 36v

that circuit only use 2 pin to control a motor.


ouh wait when i read your post again it means that your already about tri state H brige.

so could you explain abit more about your project
374  Using Arduino / Programming Questions / Re: Simulating a PLC ladder diagram on arduino on: November 21, 2012, 04:35:58 am
well i got to say to all that commented on this post that i do think and i do agree that i do need to learn to write in C/ C++ but for now i just want to make the transition a bit more simple. that's why i want to emulate the knowledge i have in ladder diagram into arduino. I do how ever see the importance of learning and properly programming arduino with C/C++ due to its base language as C/C++. Its like a Japanese guy trying to speak German to German guy. Sure maybe the Japanese know a little bit of German and maybe they could carry on a full conversation but the fact is they truly cant understand each other. i mean they full intention and all well at lease until the Japanese guy learn to speak proper German. As you can see i am that i am trying to do now be that Japanese guy that know a little bit of the German language. But over time i hope that i will be able to learn and master the language well enough until i can seriously use C/C++ as my main language
375  Using Arduino / Programming Questions / Re: Simulating a PLC ladder diagram on arduino on: November 19, 2012, 11:19:13 am
Zatalian thanks for the code. it works but theres a slight Typo in the code
int the part
Code:
digitalWrite(Output1, Q3);

it should have been
Code:
digitalWrite (Q3, Output1);

there's only one problem with this function of the one i post before,
if let say that i would like to call keep function a couple of time,
any term that use the same term will exhibit the same result.
Pages: 1 ... 23 24 [25] 26 27