Pages: [1]   Go Down
Author Topic: Big Easy Driver output oscillating  (Read 229 times)
0 Members and 1 Guest are viewing this topic.
Lindenwold, NJ USA
Offline Offline
Jr. Member
**
Karma: 2
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greets!

Have built a "soldered-together" version of a stepper motor control project with Arduino and BED.  BED was stepping fine on the breadboard, but now on the 'built' version, I have a 27khz (or so) signal showing on one of the coil leads to the motor with no step signal on the STEP pin. The motor does respond erratically to the step commands - and after a step, the oscillations stop - or return at a different frequency.

The project was rung-out with an ohmmeter before power up - all connections are correct.  The 12v DC for the BED is being supplied by a small 35W switching power supply.  I put a scope on the 12VDC in line, and it is very clean.  TP1 on the BED has been set to .4 volts. There is no stepping signal going to the BED, and all other pins read ok.  Without the stepper plugged in all functions from the Arduino are working...

The stepper is connected by about 6 foot of #22 wire - I twisted it to keep it compact , and connects to the project box via a DIN 4 pin connector.  If I disconnect the motor, the oscillations  stop.

Any thoughts? Could the twisted leads to the motor be upsetting the impedance in some way?

=Alan R.
Logged

+++++++++++++++++++++++++++++++++++++
The completion date of a software project is 2 weeks from any given date.

Offline Offline
Faraday Member
**
Karma: 31
Posts: 2524
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Like to help but I don't work like this. Draw a schematic of YOUR circuit. Don't post links to how someone else did it. Post the schematic of your circuit and and the photo of it taken close enough to see the wires going to the driver and (hopefully) where they connect to arduino.
Logged

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

0
Offline Offline
Shannon Member
****
Karma: 162
Posts: 10523
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greets!

Have built a "soldered-together" version of a stepper motor control project with Arduino and BED.  BED was stepping fine on the breadboard, but now on the 'built' version, I have a 27khz (or so) signal showing on one of the coil leads to the motor with no step signal on the STEP pin. The motor does respond erratically to the step commands - and after a step, the oscillations stop - or return at a different frequency.

Completely normal, stop worrying about it, its a chopper drive.

What do you actually mean by "respond erratically"?
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Faraday Member
**
Karma: 31
Posts: 2524
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, you have the ball...
Logged

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Lindenwold, NJ USA
Offline Offline
Jr. Member
**
Karma: 2
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mark T:

Ok - guess I never did look at the actual signal on the coils before.  The motor is connected to the BED via a 4 pin DIN connector which goes to a breadboard in the box on a 4-pin JST connector.  From there the leads go to the BED terminals via hookup wire.

With the system running, motor ONLY disconnecte, (Arduino Pro and BED powered with 12VDC - I see a CLEAN step signal on any of the coil pins.

Next I power off the supply, have the scope probe on one of the DIN pins (motor coil),  re-plug the DIN/Motor connector and switch on the DC supply, the coil signal immediately shows the 2.5 khz signal.  Is this because the motor coils are now completing the circuit from the BED? This is an "OK" situation?  :-)

=Alan R.
Logged

+++++++++++++++++++++++++++++++++++++
The completion date of a software project is 2 weeks from any given date.

Offline Offline
Faraday Member
**
Karma: 31
Posts: 2524
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

no comment,(I don't have a schematic)
Logged

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Lindenwold, NJ USA
Offline Offline
Jr. Member
**
Karma: 2
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 Raschemmel -

I don't have one either.

This project is well documented but no schematic  (pe-se) was needed. It is a kind of "Lego-block" project where the various pins of the Arduino, the BED, the two I2C devices (7-seg display and LED driver) are just hooked together.  I have a lot of individual drawings made in a CAD program of the various pin-charts, but don't see how they would help - but would be glad to put them if you'd like.

Reading the BED PDF manual, all pins are connected correctly, and the motor did step in the bread-board setup.  All project wiring has been confirmed via metering...  and the signals appear where they should.  I have a clean DIR, STEP and MSI, MSI2 and MSI3 are all LOW - the default state.  ENABLE is not connected as per the docs, so the only signals involved are those listed.

Maybe I hosed the software some how and THAT isn't working...

=A.
Logged

+++++++++++++++++++++++++++++++++++++
The completion date of a software project is 2 weeks from any given date.

Offline Offline
Faraday Member
**
Karma: 31
Posts: 2524
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you use I2C pullup resistors?
Logged

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Lindenwold, NJ USA
Offline Offline
Jr. Member
**
Karma: 2
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes - 10k - the I2C section is working great.

Further study is showing the prob may be that the FREQUENCY of my stepping pulses may be too high. This project will be used for indexing parts in a milling machine - to cut gears. Each press of the run button makes it step some increment.  I've set the code to run continuously when the Run button is pressed (I can stop it with Arduino reset).  When I do this I can hear the motor 'singing' and not stepping - the signal to the STEP pin is a 1 KHZ, 50% duty-cycle square wave.  Will try reducing that...

=A.
Logged

+++++++++++++++++++++++++++++++++++++
The completion date of a software project is 2 weeks from any given date.

Lindenwold, NJ USA
Offline Offline
Jr. Member
**
Karma: 2
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Turns out it was all 'cockpit errors'!

When the final project was fired up, the motor was acting strangely - not stepping or partially stepping.  First thing I did was look at the signal on one of the coils to the motor. Having never seen this I was startled by the signal being created by the BED when hooked up.  This threw me off...

Next I discovered my software was creating WAY too high a stepping signal frequency.  When I got it down to something a bit more reasonable (160 hz) it steps just fine.  Now just need to clean up the code and all should be well.

As this project moves along a bit more I'll post details on my web site (http://www.avrdev.net).  I'm stepping the motor using two timers - and no 'bit-banging' and no blocking during the step cycle...   stay tuned - film at 11...  LOL!

=Alan R.
Logged

+++++++++++++++++++++++++++++++++++++
The completion date of a software project is 2 weeks from any given date.

Offline Offline
Faraday Member
**
Karma: 31
Posts: 2524
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Glad to hear it's working. FYI, all the tutorials and datasheets specify 4.7k ohm. There is actually a formula based on pin capacitance of devices and number of devices but that is almost never used for hobbyist applications. It is for complex industrial or commercial
applications.
Everyone I have seen is using 4.7k.  Your choice.
Logged

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Lindenwold, NJ USA
Offline Offline
Jr. Member
**
Karma: 2
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've found I2C to be very useful and not that hard to use, once you untangle the interface... 

I'm using the NXP PCA9622 LED driver chip, and on page 20 of their data sheet, they show 10k pull-ups on the I2C bus.  But you are right - there are many other variables to be considered when driving a SERIOUS I2C bus.  Mine is only about 6" long - or less.  Just using it to save pins for my LEDs and for the AdaFruit 7-Segement display.

=A.
Logged

+++++++++++++++++++++++++++++++++++++
The completion date of a software project is 2 weeks from any given date.

Offline Offline
Faraday Member
**
Karma: 31
Posts: 2524
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Would I be out of line asking what the motor is for ?
Logged

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Lindenwold, NJ USA
Offline Offline
Jr. Member
**
Karma: 2
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No prob!  I'm building what I call a "Micro Indexer". This is to be used with a hobby-milling machine for gear-cutting and putting n-sides on a piece of roundstock.  I have a small NEMA 23 motor running at 12V and the loads on this will be very light - perhaps several pounds at BEST.

This project is also the evolution of various learning cycles: Using a i2C based 7-segment display, using a mechanical rotary encoder to increment/decrement the display - with the values being saved for various stepping options: Steps per rev, degrees per step, RPM, and I can also the various micro step combinations offered by the BED.

I wanted to get into working with steppers (with Arduino) so that came next.  The project has migrated to a finished (but very rough) item - it is in a box and can be used anywhere. I now have to fine tune my code...   I think this will be useful for a general purpose stepper test bed as well.

=Alan R.
Logged

+++++++++++++++++++++++++++++++++++++
The completion date of a software project is 2 weeks from any given date.

Pages: [1]   Go Up
Jump to: