Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Motors, Mechanics, and Power / Re: Need some help powering my Arduino & motor controller with separate batteries? on: September 09, 2013, 11:08:56 pm
Wow great thx.
Can I not send the 5v to the barrel jack on the Arduino?
2  Using Arduino / Motors, Mechanics, and Power / Need some help powering my Arduino & motor controller with separate batteries? on: September 09, 2013, 08:41:31 pm
OK here's what I have.
(2) 12v batteries wired in series for 24v.
RoboClaw 2x30a Motor Controller: http://www.orionrobotics.com/RoboClaw-2x30A-Motor-Controller_p_269.html
24v motor
Arduino Mega 2560

I'd like to connect the 24v batteries to my motor controller, but I know that's too high for the Arduino.
The motor controller can also output 5v, but that's too low for the Arduino.
So can I use another battery for the Arduino? Say 9v or 12v?

I thought I read something somewhere that the grounds would need to be connected if I did that, I could be wrong...?

Any help would be greatly appreciated.

Thanks,
Barry


3  Using Arduino / Programming Questions / Re: Need some help coding for a photo interrupter & motor on: September 01, 2013, 11:38:03 pm
OK I think I finally got it to work. Let me know if you seen any major errors...

Code:
const int photoInt =  10;

boolean motorRunning;
boolean inBeam;
boolean old_inBeam;
unsigned long interval = 10000;
int photoBeam = 0;
unsigned long stopTime;

void setup() {
  startMotor();
  motorRunning = true;
}

void loop()
{
  photoBeam = digitalRead(photoInt); 
  // val == HIGH, photo beam not blocked
  // val == LOW, photo beam blocked

  if (photoBeam == LOW)
  {
    inBeam = true;
  } else {
    inBeam = false;
  }
 
  // check if we transitioned from not inBeam to inBeam
  if ((inBeam == true) && (old_inBeam == false)){
    stopMotor();
    motorRunning = false;
    stopTime = millis();
  }
 
  old_inBeam = inBeam; // inBeam is now old, let's store it

  if (((millis() - stopTime) >= interval) && (motorRunning == false))
  {
    startMotor();
    motorRunning = true;
  }
}

Thanks again for the help UKHeliBob, I'd still be stuck without your input.
4  Using Arduino / Programming Questions / Re: Need some help coding for a photo interrupter & motor on: September 01, 2013, 03:13:30 pm
Thanks again, but no that doesn't work. I'm back to where I was having trouble originally.

The timer ends the motor starts up & the loops starts over.
But it hasn't moved out of the photo beam yet, so photoBeam is still LOW & motorRunning is true, so it stops the motor right away again...

I think we where closer with the first version...
5  Using Arduino / Programming Questions / Re: Need some help coding for a photo interrupter & motor on: September 01, 2013, 11:44:31 am
Thanks for the help, I think I almost got it, but the "startMotor()" keeps looping over & over..

Code:
boolean done = false;
int interval = 10000;
int photoBeam = 0;
unsigned long startTime;

void setup() {
  startMotor();
}

void loop() {
  photoBeam = digitalRead(photoInt); 
  // val == HIGH, photo beam not blocked
  // val == LOW, photo beam blocked
 
  if ((photoBeam == LOW) && (done == false)){
    stopMotor();
    done = true;
    startTime = millis();
  } 
 
  if ((millis() - startTime) >= interval)
  {
     startMotor();  //loops here.
  }
}
6  Using Arduino / Programming Questions / Need some help coding for a photo interrupter & motor on: August 31, 2013, 11:53:31 pm
OK I know this one should be pretty easy, but for some reason my brain isn't working anymore these days.
Here's what I'n trying to code.
The motor turns on & stays on until the photo interrupter beam is blocked.
The motor then turns off & a timer starts.
When the timer is done the motor starts up again.
I can get this all to work, but my problem is when the motor starts up again the photo interrupter beam is still blocked, so it wants to turn the motor off again.

Any suggestions on how to get this to work? Maybe an example or pseudo code...
7  Using Arduino / Motors, Mechanics, and Power / Re: L298N Motor Driver board smoking.... on: August 13, 2013, 01:06:30 pm
Thanks for the advice & tutorial, I'll check it out.
As a noob, I'm not sure what I want to protect.
I think I'd wan't to protect everything, but I guess that's not realistic.

8  Using Arduino / Motors, Mechanics, and Power / Re: L298N Motor Driver board smoking.... on: August 13, 2013, 12:15:31 pm
OK thx,
Should I have fuses between the controller & motors too?
9  Using Arduino / Motors, Mechanics, and Power / Re: L298N Motor Driver board smoking.... on: August 13, 2013, 12:02:51 pm
How do I figure out what size fuse to use next to my batteries?
(4) 12v, 12ah batteries
(4) 12v, 5a or 7.5a motors with a max. of 30a.

thx,
Barry
10  Using Arduino / Motors, Mechanics, and Power / Re: L298N Motor Driver board smoking.... on: August 07, 2013, 12:06:01 pm
OK thx for the advice & I'll definitely put a fan on it.
11  Using Arduino / Motors, Mechanics, and Power / Re: L298N Motor Driver board smoking.... on: August 07, 2013, 10:12:55 am
Ok thx, I guess the main thing I'm still wondering is if I can put 2 motors on each channel of the 2x30A board (4 motors total) or do I need (2) 2x30A boards? If so then can I use just (1) 2x60A board? I don't want to 'experiment' with a $200 board & fry it smiley
12  Using Arduino / Motors, Mechanics, and Power / Re: L298N Motor Driver board smoking.... on: August 07, 2013, 09:36:52 am
Where did all my wonderful helpers from yesterday go...?
13  Using Arduino / Motors, Mechanics, and Power / Re: L298N Motor Driver board smoking.... on: August 06, 2013, 03:07:36 pm
How about this one: http://www.pololu.com/catalog/product/1494
But do I really need 2 of them?
14  Using Arduino / Motors, Mechanics, and Power / Re: L298N Motor Driver board smoking.... on: August 06, 2013, 02:28:51 pm
Hi guys,
First thanks very very much for the replies. They're very helpful & informative.
@zacstaples:
What where the moving displays they had at the airport? Last year I did a 7' tall R2-D2 with a rotating head.

I haven't seen any other moving can sculptures, but I'm sure they're out there. He only rotated 90 deg. & the head was only around 200 lbs. so it was much easier then the cube this year.

1. No I don't think I'll try to reverse engineer the controller. I know that's over my head, but might be fun one of these days.... :-)

2. So you think 4 motors total? So, I'll need a 4 channel control or 2x 2 channel controls..?

3. Actually no I didn't want them to spin consistently in the same direction. I'd like one level to spin 90 deg. then maybe wait 30-60 sec. then spin the other level maybe in the other direction. I was thinking of having it choose randomly which level to turn & which direction it'll rotate, so it's not a repeating pattern. I also think it should start out slow, then speed up, then slow down as it comes to a stop at the 90 deg. position. PID, I think it's called...

4. I'm so glad you think I should use 30A per channel. The 2x60A controllers seam to be a lot harder to find & a lot of money. It's hard for me to justify spending $200 on something where the funds are supposed to be going to charity & it'll only be on display for a week. I also e-mailed these guys: http://store.eurtonelectric.com/wheelchairscootermotorsmodel425500.aspx
since they repair them & they said the motor was 5 amps (pretty close to your 7.5 amps)

5. There will be what I call a "Rotation Ring", basically a big circle all the way around inside the cube. Then the motors will spin against that ring. The ring is attached the the plywood below & the motor to the plywood above. It's like a big turntable. In the first version, shown above, I just had a rubber wheel against the ring (this is how I did R2-D2). But I'm afraid the wheels won't get enough traction with all this weight, so I want to try to do a geared system, cut on a CNC machine out of think plywood. See the new version attached below, with the correct sized motors & gears....
I've already build a small prototype version:

Maybe this video will help show how the rotation is happening. This is of course with the small motors & no Arduino...
Also, note at the end of the video, I can have both motors going in opposite directions to make the middle level spin & keep the top level stationary.
So I have 3 rotation options: top only, bottom only, or top & bottom in opposite directions...

Hope that all makes since. I guess now I have to narrow down which controller to use...

Here's another questions for ya.
I was planning on using these Slip Rings: http://www.ebay.com/itm/300Rpm-Capsule-Compact-Tiny-Slip-Ring-12-Circuits-12-5mm-2A-240V-Test-Equipment-/390591603081?pt=LH_DefaultDomain_0&hash=item5af112e189 so I can have the batteries at the bottom & pass the wires through the rotation plane. But now that I know I need the higher amps, I don't think that will work anymore with these thin gauge wires... Maybe I can split the load & use 2 wires for positive & 2 for ground...? If that doesn't work, I can always keep track of the rotation & be sure to always unwind it, but I was hopping to not have to do that... I was going to use a rotary encoder anyways, so that I can stop it at the 90 deg. faces...

@Drew,
Thanks for the suggestion, but I don't have the skills to build my own....
This one looks interesting, since it can take 70A, but if I need 2 per motor, then I'd need 8 total & that's almost as much as the 2x60A from Pololu:
http://www.ebay.co.uk/itm/BTS7970B-BTN7970B-power-motor-driver-Controller-module-70A-A2630-78M05-5V-25V-/300921027008?pt=Intercoms_Access_Controls&hash=item46104a79c0

thx,
Barry
15  Using Arduino / Motors, Mechanics, and Power / Re: L298N Motor Driver board smoking.... on: August 05, 2013, 10:19:47 pm
OK here's a stupid question.
If I cut down on the volts, does that mean I can cut down on the amps too?
So could I do 12v & 30 amps?

If I connect my 12v, 12ah battery to the motor it seams to run fine....
Sorry for all the stupid questions, as you can tell I'm a noob.

I also have the wheelchair controller & joystick. Another thought is to use the Dynamic Shark controller as is & try to figure out what the joystick is sending to it & have the Arduino replicate that. But that sounds way over my head... smiley-sad
Pages: [1] 2 3 4