Go Down

Topic: Help needed Arduino Uno R3 (Read 2216 times) previous topic - next topic

ibm66

I'm new to Arduino and was trying to use a stepper with the EasyDriver, Im using a code i found here http://www.danielschweinert.com/resources/BLOG/stepperSingleChannel03.pde. The problem is whenever i connect the EasyDrive GND to the UNO GND the L-LED goes off, i'm very poor in programming and therefore cannot see what is wrong with the code, can someone help me find why the code is not working in my setup?

ibm66

No one willing to give a hand????

LarryD

Your stepper should be powered by an external power supply, not the Arduino.
Would you show us how the project is wired, a diagram and/or picture?
The way you have it in your schematic isn't the same as how you have it wired up!

ibm66

Here is the connection also borrowed from Daniels blog

LarryD

Don't be upset, but re-check YOUR wiring, is it the same as this diagram?
Is your battery fully charged?
If you disconnect the motor does the sketch run OK?
The way you have it in your schematic isn't the same as how you have it wired up!

ibm66

Have disconnected everything except the ground, when i remove the ground and run it over the serial monitor i get readings, but when i put the wire back it stops.

LarryD

You could have a bad EasyDriver.

When you put the ground back and the L LED goes out, what voltage do you measure on the Arduino +5 pin?
Is the Arduino Power LED still on when the L Led goes out?
The way you have it in your schematic isn't the same as how you have it wired up!

ibm66

Yes, the Arduino Power LED is on, notice that the code was written for Duemilanove, but experts say that it should work ok. Another info you need to know is that other sketches all work without any problem.

retrolefty

#8
Jan 24, 2013, 02:11 am Last Edit: Jan 24, 2013, 02:13 am by retrolefty Reason: 1

Yes, the Arduino Power LED is on, notice that the code was written for Duemilanove, but experts say that it should work ok. Another info you need to know is that other sketches all work without any problem.


Duemilanove and Uno use same 328P chip, so no difference running on either board type with code generated for either one. Only if total compiled code size is nearly filling the chip can there possibly be a difference as the Uno has a smaller code size bootloader so a slightly larger sketch can be loaded Vs the Duemilanove board.

Lefty


0AlphaOmega


Still no help

Hmmm. Not here at you're beck & call - be polite!

You say you are new, have you managed to get other sketches working?

I don't know this stepper card.
If you connect dir & step to LED's to they light (I assume you have no scope, or maybe a multimeter?) - i.e. are you producing signals?

Since there is no clock, can you static drive the card by manually supplying signals to these two pins.
It was said above that you may have a dud board, so you need to isolate where the problem is - Arduino pins, software, the board, the motor, power-supply.
Where does your 12V come from? does it provide enough current?
For whom does the clock pulse? It pulses for you!

ibm66

Sorry for not being polite.
Both cards work with other sketches without any problem at all, works even with other sketches i have scavanged around internet, the reason i went for this code is that it has extended functions and mainly that it solves a bug i had with another sketch whereby the stepper sometimes disregards the direction change command. And if you check this code, it had the same problem initially.

0AlphaOmega

#12
Jan 25, 2013, 09:34 am Last Edit: Jan 25, 2013, 10:21 am by 0AlphaOmega Reason: 1
So, have you connected an LED/scope/analyser/meter/Serial etc. to pins 11 & 12 (no board)? Have you verified outputs exist as expected?
Are your press-buttons/pots working as expected, again, meter and/or output result of press-buttons to other (13?) ports. i.e. intercept the change in the code and call a routine to toggle the pin.

Silly question, but have you double checked your wiring?
A ploy I like to use, is explain the problem to someone who doesn't have any understanding (gf/bf, wife/husband etc. are useful) it helps you to see the wiring/code more accurately without glossing over the bits "you know". Many a time I've got to the point of "and this makes this go..... Oh!" Another bug sorted ;) Also flowcharting someone else's code can help.

Do you have a simulator? I use this one http://www.arduino.com.au/Simulator-for-Arduino.php It's still under development, but can save hours. I'm waiting on the latest release.

Quote
Both cards work with other sketches without any problem at all,


If they STILL work as expected with other sketches, you have two options - wiring (always a good idea to use different coloured wire :.) or code - start breaking it down!

Slightly off topic:
Personally, if I were going to offload the pin count to another board, I'd probably include the ramp too on the driver board and give it i2c communication. Check out the PICs at microchip, they have a massive range of products and a very mature free development system MPLAB. You say you are new to Arduino, but the above is not beyond you :)
For whom does the clock pulse? It pulses for you!

ibm66

Thanks alot , let me try experimenting with your suggestions and see how far i can go then come back with a feedback.

Go Up