Show Posts
Pages: [1] 2 3 4
1  Using Arduino / General Electronics / Re: Why won't this sketch work? Using a potentiometer with a motor shield on: August 17, 2012, 07:29:12 pm
I haven't had time to verify whether my Atmega328 is damaged or not. The only way I know to check it is to hook it up to my Mega and see if it works there. I got a box of solar cells today, so I'm a bit preoccupied smiley-cool But, just looking at my sketch, will it work? Anyone else using a motor shield?

I'm thinking of doing what I did last time I did something like this and just building a simple driver board and hooking that directly to a parallel port being controlled with EMC2. It worked perfectly, this motor shield business seems to be making things harder, not easier.
2  Using Arduino / General Electronics / Re: Why won't this sketch work? Using a potentiometer with a motor shield on: August 17, 2012, 04:34:13 am
No, that's not it. Like I said I'm pretty familiar with using a pot. Even before I ever had an arduino I had electric guitars, lots of them. Besides, I checked with a meter and I was getting a nice variable voltage with my meter, just not on the serial monitor. Maybe my arduino sustained some damage when I burned out that H-Bridge, because the sketch is right as well. Is that possible, for just one part of the IC to be affected? I have an olimexino stm32 that could stand in should this be in need of a new microcontroller. I also have a brand spanking new Mega2560 that I haven't used yet
3  Using Arduino / General Electronics / Re: Why won't this sketch work? Using a potentiometer with a motor shield on: August 16, 2012, 11:45:37 pm
Interesting, it's not. It's at maximum all the time. Why didn't I think to check that?

I've used a pot for servos and other things and never had a problem. Thanks for the tip. I'll see if I can figure out what I've done here.
4  Using Arduino / General Electronics / Re: Connecting Arduino ground to separate project ground on: August 16, 2012, 11:40:28 pm
Nice, thanks for the link!

Edit: That was a good read, and something I knew I needed to get in the habit of doing. But using the motor shield I wasn't sure if I needed to since the shield handles all that, or so it seems. I have an ext_power block on the shield that I hook 12V to and it gets it to the motors. Maybe not having that ground connected had something to do with my H-bridge burning up the other day.
5  Using Arduino / General Electronics / Why won't this sketch work? Using a potentiometer with a motor shield on: August 16, 2012, 10:21:29 pm
I'm trying to use a potentiometer to adjust the feedrate of steppers attached to an adafruit motor shield. The pot seems to have no effect.

Code:
#include <AFMotor.h>

//Setup steppers
AF_Stepper motorY(48, 2);

//setup other variables
int feedrt;
int potpinY = 0;

void setup() {
  Serial.begin(9600);           
  motorY.setSpeed(feedrt); 
}

void loop() {
 
  feedrt = analogRead(potpinY);
  feedrt = map(feedrt, 0, 1023, 0, 179);
  motorY.setSpeed(feedrt);
  motorY.step(100, FORWARD, MICROSTEP);
 
 
}
6  Using Arduino / General Electronics / Re: Connecting Arduino ground to separate project ground on: August 16, 2012, 09:19:37 pm
Thanks for the fast reply!
7  Using Arduino / General Electronics / Connecting Arduino ground to separate project ground on: August 16, 2012, 09:06:52 pm
I'm using a motor shield and it uses a separate power supply(12V) from the arduino's 5V. Am I suppose to tie the arduino's ground to the same ground used by my motors(the 12V supply)?
8  Using Arduino / General Electronics / Re: Is this right? Trying to use Ohm's law on: August 12, 2012, 03:12:30 pm
I'm trying to learn how to do that. I've heard this advice before but I don't know how to actually do it. I'm getting discouraged again. I just don't know how to do what you guys say I have to do.
9  Using Arduino / General Electronics / Re: Is this right? Trying to use Ohm's law on: August 12, 2012, 03:09:05 pm
Here is exactly how I have it hooked up. I do have the Ext power jumper removed.
10  Using Arduino / General Electronics / Re: Is this right? Trying to use Ohm's law on: August 12, 2012, 01:53:11 pm
As I said, I'm using an Adafruit motorshield.
11  Using Arduino / General Electronics / Re: Is this right? Trying to use Ohm's law on: August 12, 2012, 04:38:19 am
Two of these http://www.dz863.com/pinout-811088463-M49SP-2K

When I ran them 12 volt, even though it ran the IC got hot as hell. I don't know how I could have the wiring wrong. Its four wires that go in to the motor shield.
12  Using Arduino / General Electronics / Re: Is this right? Trying to use Ohm's law on: August 12, 2012, 03:54:12 am
I guess I was fooled because at 12v it ran for a long time, or several minutes, with no problem. When I tried 24 is when it burned. So, what am I supposed to think?
13  Using Arduino / General Electronics / Re: Is this right? Trying to use Ohm's law on: August 11, 2012, 11:19:13 pm
Well, because I just fried a brand new SN754410 H-Bridge chip. I have a 24 volt stepper motor hooked to an Adafruit motor shield. I'm giving it 24 volts from a 'remodeled' atx power supply. The Y axis did not fry, it worked okay, the X axis snap crackle popped almost immediately. As you can see from my original question, I have no idea how to use Ohm's law. I really need to know this and this is really the first time I've had a pressing reason to learn. I could just ask what resistor to use, but I need to learn how to do this. This is like the third time I've asked this and people always tell me, but without a real world project to try it on I don't get it. This is my chance to learn it with a real world project to make it stick.

Please, help me get this.
14  Using Arduino / General Electronics / Is this right? Trying to use Ohm's law on: August 11, 2012, 10:43:51 pm
I have a stepper motor I want to limit current too. Voltage is 24 volts and I want the current limited at 1 amp. if R=V/I then I need a 24 Ohm resistor, right?
15  Topics / Robotics / Cool video showing inside a small servo on: July 25, 2012, 02:54:28 am
I thought this was pretty cool.

http://youtu.be/-XSXfqd1N58
Pages: [1] 2 3 4