Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: multiple motors solenoids _ 1 arduino _ accelstepper on: December 11, 2012, 12:55:18 pm
Quote
The number of motors has nothing to do with the speed that they run at.

False. If i am running 3 motors simultaneously using 3 separate H-bridges. I will definitely decrease the top speed that any motor can reach. 3 groups of 4 I/O pins will need to be triggered indepenently. unless accelstepper somehow groups the signals together.
2  Using Arduino / Project Guidance / Re: multiple motors solenoids _ 1 arduino _ accelstepper on: December 11, 2012, 09:25:30 am
bumps
3  Using Arduino / Project Guidance / Re: multiple motors solenoids _ 1 arduino _ accelstepper on: December 10, 2012, 02:17:27 pm
INPUT
I have burnt multiple 1A H-bridges when using the same power source for all (19V  4.74A).
So, I use a 19V 4.74A for the motor & a 12V 2A for the solenoid. (This sucks)
Arduino is running of USB (Already burnt out an arduino when then other H-bridge blew, so i scared)

Parts
Motor https://www.sparkfun.com/products/9238
Solenoid https://www.sparkfun.com/products/10391
H-Bridge https://www.sparkfun.com/products/9479
4  Using Arduino / Project Guidance / multiple motors solenoids _ 1 arduino _ accelstepper on: December 10, 2012, 11:30:03 am
3 bipolar stepper motors (LN298)
3 solenoids (NPN)
3 leds
3 buttons
1 POT

INPUT
So, I use a 19V 4.74A for the motor & a 12V 2A for the solenoid. (This sucks)
Arduino is running of USB (for now) [single power source for all in the future]

Parts
Motor https://www.sparkfun.com/products/9238
Solenoid https://www.sparkfun.com/products/10391
H-Bridge https://www.sparkfun.com/products/9479


The motors will rotate to 220 deg and reverse direction back to 0 degrees & repeat ~ 4 times.
Solenoid will be activated while stepper motors are b/w ~120-220 deg and 50-0 deg.
Each motor/solenoid will have a button to perform this process independently of the other.

I use
AccelStepper Library
setAcceleration(8000);
setMaxSpeed(600);

Will i be able to maintain these speeds if I add 2 more motors?
 I, also, do not know how I would code this in order to  check if the button was pushed on each VOID loop then run the motors or solenoids without forcing a WHILE or a DELAY?
I'm sure there is a way, since i believe the accelstepper library uses the clock for delays. I just need a bit of guidance.

Code:
void loop()
{
  buttonState = digitalRead(ButPin);
 
    if (buttonState == HIGH) {    
      // button has been pushed
        digitalWrite(LedPin, HIGH);
        stepper.setCurrentPosition(0); //this will set the current position to 0
        stepper.enableOutputs (); //Give current to the motor
          stepper.moveTo(1);  //performs an action so motor gets some juice
          stepper.run();   //performs an action so motor gets some juice
          delay(10);//letting the motor get wild for 1 step
        for(int i=0; i<=3; i++) {
          stepper.moveTo(dist); //moves motor to dist like 220 degrees
                while (stepper.currentPosition() != dist){
                  stepper.run();
                    if (stepper.currentPosition() >= 80){
                      digitalWrite(SolPin, HIGH);
                    }else{
                      digitalWrite(SolPin, LOW);
                    }
                }
            digitalWrite(SolPin, LOW);
            delay(100); //letting the sol fall
            if(i==3)
              break;
            stepper.moveTo(-0);
                 while (stepper.currentPosition() != 0){
                  stepper.run();
                    if (stepper.currentPosition() <= 50){
                      digitalWrite(SolPin, HIGH);
                    }else{
                      digitalWrite(SolPin, LOW);
                    }
                 }
            digitalWrite(SolPin, LOW);
            delay(100);//letting the sol fall
        }
            delay(10);
            digitalWrite(SolPin, LOW);
            stepper.disableOutputs ();
    }
    else {
      blinkLED();
    }
    
  //Serial.print("irPin = ");
 // Serial.println(val);

}
5  Using Arduino / Project Guidance / Re: Solenoid & Stepper Motor power problem. PROTECT ME! on: November 29, 2012, 08:00:20 pm
Great advice DC!

I will do just that.

I guess i will need schottky diodes since im working with ~1amp on the motors? i didn't know about the 2V drop! thanks for the help
6  Using Arduino / Project Guidance / Re: Solenoid & Stepper Motor power problem. PROTECT ME! on: November 29, 2012, 06:22:06 pm
Scotty!
Thanks for the explanation! This really helps!

I am probably going to run everything off a 12V supply and just get a 5v regulator for the arduino. Also, can anybody recommend places to put diodes that would prevent any further damage to my arduino. I guess i can place i diode between the arduino and the ground & b/w the arduino and the Vdd on the H-bridge?
7  Using Arduino / Project Guidance / Re: Solenoid & Stepper Motor power problem. PROTECT ME! on: November 29, 2012, 01:59:55 pm
So I will have quite a bit of power loss?

I could just use a voltage divider for the solenoid, because I don't need a regulated voltage. I only need to make sure the current draw from the solenoid or motor does not impede or burn out the logic.

that's why i don't want to use 19 v on the solenoid. I don't need that much current being drawn from the solenoid. It is a killer. I would rather it draw ~12 V, So about 1 amp instead of 2 amps at 19v.

Will these type of regulators help to protect me from surges from the motor or solenoid? Noise?
8  Using Arduino / Project Guidance / Re: Solenoid & Stepper Motor power problem. PROTECT ME! on: November 29, 2012, 09:29:08 am
I just have it drawn incorrectly, but that all works. I double checked and you are correct sir!

Now if only someone could teach me how to power this contraption with only one power supply
9  Using Arduino / Project Guidance / Re: Solenoid & Stepper Motor power problem. PROTECT ME! on: November 29, 2012, 08:00:48 am
5v and 3v are not connected. It's a poor drawing.

I will fix the diode location today.

I still need to figure out how to wire ALL of this with one power supply SAFELY?
10  Using Arduino / Project Guidance / Re: Solenoid & Stepper Motor power problem. PROTECT ME! on: November 28, 2012, 09:36:53 pm
11  Using Arduino / Project Guidance / Re: Solenoid & Stepper Motor power problem. PROTECT ME! on: November 28, 2012, 08:29:58 pm
I need the 5v for the LN298 H-bridge... (also, I use it for LEDs and another IR sensor)

I cannot find the LN298 in the frittzing software, but I have both outputs enabled and it works correctly. (no caps  resistors diodes used). I am trying to draw up a custom part now. Bear with me, because I am learning Fritzing as I go...
12  Using Arduino / Project Guidance / Solenoid & Stepper Motor power problem. PROTECT ME! on: November 28, 2012, 05:55:53 pm
Purpose:
Rotate a  4 wire bipolar stepper motor (32.6 ohm) & activate a solenoid (13.3 Ohm) at different times. Using H-bridge ( LN298 4A) for the stepper & N-Mostfet (tp120) for solenoid.

INPUT
I have burnt multiple 1A H-bridges when using the same power source for all (19V  4.74A).
So, I use a 19V 4.74A for the motor & a 12V 2A for the solenoid. (This sucks)
Arduino is running of USB (Already burnt out an arduino when then other H-bridge blew, so i scared)

Parts
Motor https://www.sparkfun.com/products/9238
Solenoid https://www.sparkfun.com/products/10391
H-Bridge https://www.sparkfun.com/products/9479

PROBLEM
POWER! How do i safely power this, or MORE, with one power supply? I keep burning things out when I try to use one power supply...
I thought the 19V 4.74A voltage supply would work, but it burnt out my arduino and three 1 amp H bridges.. womp womp...

PLEASE HELP ME OPTIMIZE MY LAYOUT. ESPECIALLY BECAUSE I WILL BE ADDING 2 MORE to THE SAME CIRCUIT. (3 motors 3 solenoids 1 ardiuno) (+LEDs & bla bla). POWER PROTECTION; HOW??

13  Using Arduino / Programming Questions / Re: tlc5940 multiplexing code assistance on: August 22, 2011, 09:46:39 am
After a lot of research, It seems that XLAT is the pulse that is sent at the end of each grayscale update cycle. So, I guess Joe is using this "interrupt" to trigger his color update?

I could really use any help on understanding this so I can just manually put a blink or fade function in this code?
14  Using Arduino / Programming Questions / Re: tlc5940 multiplexing code assistance on: August 19, 2011, 02:05:17 pm
bump

any help would be awesome
15  Using Arduino / Programming Questions / Re: tlc5940 multiplexing code assistance on: August 19, 2011, 11:09:02 am
thanks that helps with that, but I'm hoping someone can demystify the TLC library a little for me..

how to change ledArray while maintaining a proper transmission of grey scale?
Pages: [1] 2