Welcome! Log In Create A New Profile

Advanced

multiple A4988 control

Posted by cat.farmer 
multiple A4988 control
April 16, 2016 09:34AM
I was wondering if it would be possible to connect multiple driver boards.
I'd like to connect the step and direction to multiple drivers and control them with the enable/disable. or would I need some intermediate circuit to make it stable?
Re: multiple A4988 control
April 16, 2016 03:11PM
That should work.
Re: multiple A4988 control
April 16, 2016 05:55PM
Bear in mind that the motor current will be turned off when you disable the driver, so the associated motor will not hold position.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: multiple A4988 control
April 16, 2016 07:56PM
Quote
dc42
Bear in mind that the motor current will be turned off when you disable the driver, so the associated motor will not hold position.

Right. If you want to avoid that, put a transistor between the step pin of each driver and the "universal" step pin, and wire your control wires to the transistors instead of to the enable pins.
Re: multiple A4988 control
April 16, 2016 10:00PM
Thanks. I hadn't thought of the motors turning off.
I will try both ways. I'm not sure if it will matter if the motors power down or not. Hope to get things wired and tested tomorrow.
Re: multiple A4988 control
April 17, 2016 02:05AM
Full stepping might work. Microstepping positions will not hold, for the detent torque will pull the motor out of it.

Sharing the direction bits, and possibly using a demux like 74hc138, may be more reliable for up to 8 steppers on 5 gpio.
Re: multiple A4988 control
April 17, 2016 08:02AM
Quote
lhartmann

Sharing the direction bits, and possibly using a demux like 74hc138, may be more reliable for up to 8 steppers on 5 gpio.

Thanks, but I'm not sure how the demux would be a benefit. If I am only holding the pin high or low, wouldn't a transistor be a better choice?

My plan is to "stack" 5 drivers and run the step and dir pins in parallel and use the enable/disable to enable the needed motor, just one motor at a time. I guess the question is better stated can the Arduino GPIO deal with the load of driving 5 stepsticks.
Re: multiple A4988 control
April 17, 2016 09:14AM
Stack the five drivers, run DIR and ENABLE in parallel, use independent STEP signals.

Same thing for the demux, use it to route the STEP signals, not the ENABLEs. 3 gpio driving the selector lines, one gpio driving the demux enable, demux outputs driving the STEP pins of each driver.

This way all motors stay powered up.
Re: multiple A4988 control
April 17, 2016 09:22AM
Quote
lhartmann
Stack the five drivers, run DIR and ENABLE in parallel, use independent STEP signals.

Same thing for the demux, use it to route the STEP signals, not the ENABLEs. 3 gpio driving the selector lines, one gpio driving the demux enable, demux outputs driving the STEP pins of each driver.

This way all motors stay powered up.

AHH.. now I get it, just so happens I have a bin full of those, well maybe not the HC version, but I don't think that will matter much, have to read the data sheet.

Thanks for the input guys.
Re: multiple A4988 control
April 17, 2016 10:04AM
Quote
cat.farmer
AHH.. now I get it, just so happens I have a bin full of those.

OK, I'm jealous. I thought I kept a a bit of a weird collection of motley ICs, but I can't claim to have a 'bin full' of anything smiling smiley Some of my chips go back to when I was a teenager - actual TTL 74 series!
Re: multiple A4988 control
April 17, 2016 11:26AM
oddly enough I bought them for a different project years ago. needed 6 bought 3 times that, just because they were just as cheap buy 20 as it was buying 6. and they are a handy IC to have on hand.
Re: multiple A4988 control
April 17, 2016 11:44AM
I have accumulated so many components over the last 15 years that I had to work a decent system to find them. I ended up buying 10 boxes with 25 divisions each, plus a lot of shoe box sized plastic boxes, stored everything there and created a Google Spreadsheet to keep track of what is where. This is simple enough, and helps me keep track of everything.

I named large boxes S01..S12, the divided boxes are given a letter each A-G, and each division is numbered 1-25. Table has 3 columns: Where, what, and how many. Something like:

A23 - Demux SN74HC138 - 10
S05 - Mini USB cable, 50cm - 1
John - Node MCU - 1 (lent item)

Searching with CTRL+F is so much easier and faster than doing so manually, but if the Internet goes down I am seriously screwed.
Re: multiple A4988 control
April 17, 2016 12:34PM
Quote
lhartmann
I have accumulated so many components over the last 15 years that I had to work a decent system to find them. I ended up buying 10 boxes with 25 divisions each, plus a lot of shoe box sized plastic boxes, stored everything there and created a Google Spreadsheet to keep track of what is where. This is simple enough, and helps me keep track of everything.

I named large boxes S01..S12, the divided boxes are given a letter each A-G, and each division is numbered 1-25. Table has 3 columns: Where, what, and how many. Something like:

A23 - Demux SN74HC138 - 10
S05 - Mini USB cable, 50cm - 1
John - Node MCU - 1 (lent item)

Searching with CTRL+F is so much easier and faster than doing so manually, but if the Internet goes down I am seriously screwed.

OK, now I just feel like a rank beginner. Often times I can't even remember why I bought a particular chip, although that does have the up-side of the occasional pleasant surprise - "ooh, I'd forgotten I had that!".
Re: multiple A4988 control
July 06, 2016 01:46PM
I have had my initial board running for some time now. using step and DIR in parallel and turning them on with the enable. I have found the back pressure will force the filament back without the hold force, so I am working on EN and DIR in parallel and sending the steps to the desired driver.
We discussed using a mux or transistors to do that, but here is my thought, I am using an Ardiuno Mini Pro as my processor, why not just feed the step signal to the mini and then send it on down the line out a given GIPO? My first thought was that it may lose steps, if the read is not fast enough to keep up, but I have no way of really testing.. I would need a dual trace oscilloscope?
Any one have thoughts on read/write of the steps?

I've written the sketch and am working on the board, which brings me to another question...

There are 100u Capacitors on the 12v line for each driver (looking at the RAMPS schematic) but they are all run in parallel on the 12v line, would not just one Cap work, maybe a little larger size? If I'm wrong about that could someone explain why there is one for each driver?

Thanks
Re: multiple A4988 control
July 06, 2016 02:46PM
We always have components on the pcb that we did not put there intentionally. Long traces may act as resistors (see heated beds), capacitors, and inductors. This parasitic inductance is what you are trying to compensate with caps very close to the drivers.

Note that while the driver is enabled it will regulate motor current constant, but power supply current will be pulsed in a high frequency. Without the caps the driver voltage would fall every time the current rises, as the inductive characteristic of the traces would oppose supply current changes.
Re: multiple A4988 control
July 06, 2016 07:47PM
Thanks.. Being just a hobbyist guy sometimes these things escape me. Not like the caps are expensive, I was looking at space management on the board and an understanding of why.
Re: multiple A4988 control
July 14, 2016 09:42AM
I was able to get things sorted. But ran across an unexpected issue. The step output from the ramps seems to be less then 1.8v. I was expecting a >4v square wave. Can someone comfirm the step voltage output?
Re: multiple A4988 control
July 14, 2016 10:16AM
I don't see anything on the ramps schematic between the IO pin and the stepper, so I'd expect it to be standard u-controller IO pin voltages. According to the datasheet (http://www.atmel.com/Images/Atmel-2549-8-bit-AVR-Microcontroller-ATmega640-1280-1281-2560-2561_datasheet.pdf) you should have a minimum swing of 0.9 to 4.2V.
Re: multiple A4988 control
July 14, 2016 10:46AM
That is what I saw too, but the voltage was so low it would not set the the digital in pin I am using on the mini pro. I ended up putting a transistor on the step pin which worked, but I could not figure out why there was such a drop. Seemed all of the step pins from the ramps have the same issue. Wish my scope was working, so I could see what is going on.

My other thought is, for my testing I.was just using USB power, but other then a thermister, nothing is populated on the ramps board.bad Ramps maybe?
Re: multiple A4988 control
July 14, 2016 10:55AM
Interesting. Can't see why that would have been a problem - curiouser and curiouser. Just the step pins, or the dir pins too?
Re: multiple A4988 control
July 14, 2016 11:42AM
I did not check the dir pins. I'll see what they have when I get time tonight
Re: multiple A4988 control
July 15, 2016 11:37AM
I did not have much time last night, but I checked the voltage from the dir pin, it was about 2.5v. It jump to 5v at start for a split second, then settled to the low voltage.
I will get some future testing in this weekend. but I'm have to guess it's the ramps.
Re: multiple A4988 control
July 21, 2016 03:15PM
FINALLY!!
I was able to get all of the drivers to work independently using a demux (74hc238). (thanks for the help Ihartmann) I had wanted to use the Ardunio as a demux, setting an in pin and sending that to a given output. As I researched that idea I found it takes many cycles for it to read and write that signal, something I did not know and why I'm sharing There were work a rounds but in the end the extruders would have ended up being behind the bot movement.

So now I have a multiple extruder add on board running I2c from my Ramps (Marlin) with the ability to add as many as 8 extruders, I would guess you could add as many as you wanted, as long as you have GPIO's on the daughter board.


I'm willing to share if anyone is interested.
Sorry, only registered users may post in this forum.

Click here to login