DRV8825 Driver & Stepper Motor 24BYJ48

Operation & Theory #basicTronics 09

J3
Jungletronics

--

Hi again, here we go…
what the Gadget I want to do? Simple: a platform to test the servo with DRV8825B DRIVER for my balanced car project (thanks to Brokking.net).

No theoretical details right now. Let’s practice! after that, we return to theory, ok? codes? https://github.com/giljr/BasicTronics

Step 1: Parts
What you’ll need:

1 x Arduino Uno
1 x DRV8825 Driver
1 x 1602 Display
1 x breadboard
1 x 24BYJ48 12 v Stepper Motor
1 x 100uF capacitor
1 x tripot 50k
1 x Font Wall 12 v
* x Jumper Wires

Step 2: The Approach
We’re going to use the Arduino UNO. Here is schematic:

Step 3: DRV8825 & LCD Connections Details

Step 4: Test LCD

Step 5: Program Your Arduino UNO for DRV8825 Test

Step 5: Motor Calibration on DRV8825

The DRV8825 supports such active current limiting, and the trimmer potentiometer on the board can be used to set the current limit. You will typically want to set the driver’s current limit to be at or below the current rating of your stepper motor. One way to set the current limit is to put the driver into the full-step mode and to measure the current running through a single motor coil without clocking the STEP input. The measured current will be 0.7 times the current limit (since both coils are always on and limited to approximately 70% of the current limit setting in full-step mode).

Another way to set the current limit is to measure the voltage on the “ref” pin and to calculate the resulting current limit (the current sense resistors are 0.100ohm). The ref pin voltage is accessible on a via that is circled on the bottom silkscreen of the circuit board. The current limit relates to the reference voltage as follows:

Current Limit = VREF × 2

So, for example, if you have a stepper motor rated for 1 A, you can set the current limit to 1 A by setting the reference voltage to 0.5 V.

Step 6: Workaround

Three situations made me lose time(almost my mind;):

1- I forgot to put the GND on the RW of the LCD 16x2. It did not work, Logically!, Then check your connection too!

2- The 24BYJ48 motor wires colorations differ a lot. Sometimes they invert everything … I discovered that just find out the pairs. These have to come together, in any order. So I tested violet + orange + yellow + black or yellow + black + violet + orange and so on. it works! Check it out!

My 24BYJ48 Wiring:

3-Actually I connect everything, put the DRV8825 potentiometer in mid-range and there you have it!

Step 7: Quick Q&A

1) what is the DRV8825 pot used for?
The pot on the module is for the motor current regulation.

2) Is there a datasheet for this module?
There isn’t a datasheet for the module itself, but it is based on the DRV8825 IC, which you can find the datasheet for that at this link. That should have all of the info you need.

3) Why the LCD display doesn’t look quite right?
Adjust the trimmer potentiometer (tripot in the breadboard) to correct the contrast.

4) Why I can’t get the LCD screen to work at all?
If you’ve connected everything correctly, then it should work up. Make sure the jumpers are on the pins as shown. In my case, I forgot GND to RW. If you still cannot get it to work, then please contact your dealer with your order number and get it replaced if it is indeed defective.

Theory, now!

DRV8825 — An Integrated Motor Driver Solution For Bipolar Stepper Motors

THE CHARACTERISTICS:

> It goes natively 1/32 at the same jumper settings the A4988 runs 1/16, which directly translates into a more silent running (potentially);

> It also has a heck of a lot of amperage headroom;

> The device (DRV8825) integrates:

    i) two NMOS H-bridges
ii) current sense
iii) regulation circuitry
iv) a microstepping indexer

> Powered with a supply voltage between 8.2 and 45 V;

> Capable of providing an output current up to 2.5 A full-scale;

> A simple STEP/DIR interface allows for easy interfacing to the controller circuit;

> The internal indexer is able to execute high-accuracy micro stepping without requiring the processor to control the current level;

> The current regulation is highly configurable;

> three decay modes of operation: fast, slow, and mixed decay;

> low-power sleep mode is included which allows the system to save power when not driving the motor;

> Suitable for two-phase and four-wire stepper motor;

> Input Voltage:8.2–45V DC (Just power the stepper motor driver), 1.6A output current per coil;

24BYJ48 — Stepper Motor — a Brushless DC Electric Motor

It divides a full rotation into a number of equal steps. The motor’s position can then be commanded to move and hold at one of these steps without any feedback sensor (an open-loop controller), as long as the motor is carefully sized to the application in respect to torque and speed.

Specification

For instance, driving a motor in quarter-step mode will give the 200-step-per-revolution motor 800 micro-steps per revolution by using four different current levels.

The resolution (step size) selector inputs (MODE0, MODE1, and MODE2) enable selection from the six-step resolutions according to the table below. All three selector inputs have internal 100kO pull-down resistors, so leaving these three micro step selection pins disconnected results in full-step mode. For the microstrip modes to function correctly, the current limit must be set low enough so that current limiting gets engaged. Otherwise, the intermediate current levels will not be correctly maintained, and the motor will skip micro-steps.

Built-in indexer logic in the DRV8825 allows a number of different stepping configurations. The MODE0 through MODE2 pins are used to configure the stepping format as shown in Table 1.

Table 1. Stepping Format
MODE0 MODE1 MODE2 Microstep Resolution

Low Low Low Full step
High Low Low Half step
Low High Low 1/4 step
High High Low 1/8 step
Low Low High 1/16 step
High Low High 1/32 step
Low High High 1/32 step
High High High 1/32 step

Control inputs
Each pulse to the STEP input corresponds to one micro-step of the stepper motor in the direction selected by the DIR pin. These inputs are both pulled low by default through internal 100k pull-down resistors. If you just want rotation in a single direction, you can leave DIR disconnected.

The chip has three different inputs for controlling its power states: RESET, SLEEP, and ENBL. For details about these power states, see the datasheet. Please note that the driver pulls the SLEEP pin low through an internal 1MO pull-down resistor, and it pulls the RESET and ENBL pins low through internal 100k pull-down resistors. These default RESET and SLEEP states are ones that prevent the driver from operating; both of these pins must be high to enable the driver (they can be connected directly to a logic “high” voltage between 2.2 and 5.25 V, or they can be dynamically controlled via connections to digital outputs of an MCU). The default state of the ENBL pin is to enable the driver, so this pin can be left disconnected.

Note: The coil current can be very different from the power supply current, so you should not use the current measured at the power supply to set the current limit. The appropriate place to put your current meter is in series with one of your stepper motor coils.

Power dissipation considerations
The DRV8825 driver IC has a maximum current rating of 2.5 A per coil,

This product can get hot enough to burn you long before the chip overheats. Take care when handling this product and other components connected to it.

For my upcoming project I’ve got a NEMA 17, rated at 0.3 Amps, stepping angle of 1.8 degrees;

I hope this helps anyone else who may have the same stepper motor.

Just wanted to say thanks to be with us! bye!

Download All File For This Project

References & Credits:

Arduino Stepper Drivers Tutorial-2/2 by R Jordan Kreindler in Arduino

Stepper Motor Basics — 5 Wires Unipolar / Bipolar Motor

Stepper Motor Basics — 4 Wires Bipolar Motor

https://www.raspberrypi-spy.co.uk/wp-content/uploads/2012/07/Stepper-Motor-28BJY-48-Datasheet.pdf

— published at 3:30 PM Jun2017 —

Related Posts

01#basicTronic — LM358 Opamp Electret Amplifier Circuit — Debugging Circuit w/ SoundCard Oscilloscope

02#basicTronic — LM741 as Comparator & Opamp — Single or Dual Power Supply Voltage Config

04#basicTronic — Electronic ScoreBoard v1.0–4510 & 4511 Seven Seg Project

05#basicTronic — 555 IC — Monostable Mode — Playing with 555 Timer — Part I — Monostable

06#basicTronic — 555 IC — Bistable Mode — Playing with 555 Timer — Part II — Bistable

07#basicTronic — 555 IC — Astable Mode — Playing with 555 Timer — Part III — Astable

08#basicTronic — Reaction Timer Circuit — Using the 555 in its three modes at once

09#basicTronic — DRV8825 Driver & Stepper Motor 24BYJ48 — Operation & Theory #basicTronics 09 (this one:)

10#basicTronic — Arduino to Arduino — Cheap AVR Programming — How To Flash Your Arduino Using Other Arduino Board (this one:)

--

--

J3
Jungletronics

Hi, Guys o/ I am J3! I am just a hobby-dev, playing around with Python, Django, Ruby, Rails, Lego, Arduino, Raspy, PIC, AI… Welcome! Join us!