Hot answers tagged

5 votes
Accepted

A4988 and capacitors

There are two purposes of such capacitor: first it supply power for short peaks in demand, so effectively enabling the 12V power source supply much more current for short time, than it can support ...
  • 1,300
5 votes

Where am I going wrong in modifying Timer0 and the ISR interrupts in this example?

Don't do serial prints inside an ISR. Ever. They require interrupts to work, and inside the ISR interrupts are off. For a while the attempts to print will fill up a buffer which is emptied by another ...
  • 35.5k
4 votes
Accepted

Can I prevent the Stepper library from holding the motor?

use disable output class in accelstepper library. http://www.airspayce.com/mikem/arduino/AccelStepper/
4 votes

Can an L293D motor driver shield do microstepping?

It would be more accurate to say that it can be used as part of a microstepping system, though it's probably not a good choice for any use today. The L293D is merely an (effectively obsolete ...
4 votes

HCSR04 Sensor without delay

Have you searched for other libraries or example code for this particular sensor? I found this NewPing library that claims to have been developed to fix poor performance of such modules due to poor ...
  • 6,942
4 votes
Accepted

How can I use stepper for specific degree?

stepper.step(num)is used to rotate your motor 'num'-step. i.e. num=25, then calling stepper.step will cause your motor do 25-step. STEPS is number of steps per revolution for your motor. It will be ...
  • 1,258
4 votes

Maximum Delay time

Note: there's an existing question here this should be closed as a duplicate of, but that is proving hard to find. So until someone does find it... The arduino delay() function creates a blocking ...
4 votes
Accepted

How can I know if I can stack some shield on another shield?

First you have to compare the pinouts of the two shields. If the shields use completely different pins then yes, you can use them together. However if they share pins then you need to look in more ...
  • 103k
4 votes
Accepted

How to calculate step delay?

Convert the RPM of the motor to RPS. Take reciprocal to get seconds per revolution. Divide it by 360 to get seconds per degree. Multiply by 1.8 to get seconds per step.
  • 424
4 votes
Accepted

How to randomize the delay in Arduino Stepper code?

In setup(), add randomSeed(analogRead(0)); This reads the value of an analog input pin, which if not connected, will float to relatively random values between 0 and 1023. This "seeds" the random ...
  • 6,942
3 votes
Accepted

DVD drive stepper motors with polulu a4988 on Arduino

According to Pololu's website, the VMOT pin needs at least 8V to function. Try a 12V switching (important!) wall wart supply that can supply at least 1A instead of your USB supply. Avoid supplies that ...
  • 308
3 votes

How to run 5 wires hibrid stepper motor with arduino uno?

1) it is probably something like A1, A2, Common, B1, B2. You could confirm this with an ohmmeter. Common to any of the others would be a certain resistance X, while between any of the others (A1-A2, ...
  • 2,322
3 votes
Accepted

Arduino uno + cnc shield v3 + Stepper Motor Driver A4988 + AccelStepper?

Manually set the ENABLE pins as OUTPUTs, i.e. add in the setup() function: pinMode(MOTOR_A_ENABLE_PIN, OUTPUT); pinMode(MOTOR_B_ENABLE_PIN, OUTPUT);
3 votes

Steppermotor+Arduino Mega+ Adafruit

I'd look for a proper stepper driver, e.g. something based on A4988 or similar. I wasted a fair amount of time on the Adafruit motor-shield 2.3 until I finally abandoned it after failing to achieve ...
3 votes

Ensuring specific frequency at specific time?

Generating a linear frequency ramp with accurate timings is not an easy task. I am providing here only a partial answer, where I first go through the math of the problem, then give some ideas for the ...
  • 38.4k
3 votes

Ensuring specific frequency at specific time?

As mentioned in comments and other answers, using timer 1 for hardware-timed bit toggling is likely to produce better results than code using delays based on calls like delayMicroseconds(), primarily ...
3 votes

Having some trouble incrementing counters

Make CTR static or place it in the global scope. As it stands you set it to 0 every time you go through loop. The line: int ctr = 0; literally means "Create a new variable on the stack called 'ctr' ...
  • 103k
3 votes

How to pull a pin low?

Connect it to an IO port and set it to OUTPUT and LOW. That's what it means to "pull low". It helps if you understand how an IO port works. This may help you.
  • 103k
3 votes
Accepted

Run two stepper at same time

When using a normal stepper driver, you say the driver to do one step, by sending him one pulse. The length of these pulses does not have a meaning. they are constructed, so that the driver can sense ...
  • 14.6k
3 votes

Stepper Motor won't reverse/turn CCW

I had this issue myself, when I tried to use these stepper motors (which are to be honest really crappy ones, but very cheap). Vibrating mostly means, that the phases of the motor are not activated in ...
  • 14.6k
3 votes
Accepted

Stepper Motor is not working with A4988 board

You have to connect the sleep and reset pin together. I assume that you took this schema on how to mechatronics. In his video you see that the sleep and reset pins are connected. I don't know why but ...
  • 46
3 votes
Accepted

Why is my CNC shield smoking? Is it safe to keep on for long periods of time?

Those NEMAs are big ones - i suspect too big for the little A4988 chips - which can only provide 2A when actively cooled and generally only for short periods. I wouldn't try to push more than 1.7ish ...
  • 101
3 votes
Accepted

2 stepper drivers speed control

Changing the duty cycle does not change the frequency of the PWM signal. The tb6000 needs a pulse to trigger a step of the motor. If the frequency does not change the pulses per second do not change ...
3 votes
Accepted

AMIS30543 | Data-Sheet understanding Status register

Most of the data is duplicated between the registers. Both registers contain MSP[6:2]. If MSP contains 111001001 the registers (ignoring the MSB "PAR" bit) would look like: SR3: 1110010 SR4: ...
  • 103k
2 votes

Controlling 3 stepper motors simultaneously

I have two ideas: I don't have personal experience working with the AccelStepper Library, but I believe it implements a class that allows you to work with multiple steppers. I plan on controlling ...
2 votes

Controlling 3 stepper motors simultaneously

You need a struct for each stepper with a timestamp, a position and rate of change and a loop that updates the postion based on rate which is the change in position over some time: struct stepper { ...
  • 181
2 votes

How to run 5 wires hibrid stepper motor with arduino uno?

On stepper motors there are a few types of wiring, but essentially there are two coils inside the stepper motor. To figure out where the wiring is you need a way to test if the coils are being ...
  • 21
2 votes

I2C Master-Slave Arduino system to control array of steppers

I don't quite understand the problem. A arduino mega would have no problem controlling 9 of these steppers alone. If you are asking about i2c protocol please be more specific about what you need help ...
  • 474
2 votes
Accepted

Powering a stepper motor

How did you set the amps on the http://www.schmalzhaus.com/EasyDriver/ to 0.5A? What was the voltage at the test point? The EasyDriver v4.5 schematic says the formula for coil current is A = V/6. ...
  • 2,322
2 votes

80 Apple Homebuttons and a steppermotor

If you follow JayEye's approach (ie, use five MCP23017 units to connect 80 switches, and five more to connect 80 LEDs) the wiring and the software should be fairly simple. But dealing with all the ...

Only top scored, non community-wiki answers of a minimum length are eligible