TinyWrench is a motor controller project that tries to mimic everything that a dedicated motor controller chip does in software on an ATTiny, as cheaply as possible. The controller has no active level shifters or gate drivers, just some MOSFETs, ATTinys, and passive components. The current incarnation of TinyWrench packs two ATTiny24s and two H-bridges that can handle ~9 amps each onto a board about 1.5 inches by 2 inches. The software drives motors in constant-current mode using a constant-off-time chopper drive, functioning similarly to an Allegro A4988 except with a sign+magnitude interface instead of step+direction.

(Hi Hackaday! I've added a discussion page here in case anyone has questions)

Front of board with ATTiny24s (one per bridge), current level trimpots, and high-side gate drive coupling capacitors:

img_0463.jpg

Back of board with paralleled sense resistors, two h-bridges, gate pull-up/down resistors, and high-side gate clamp diodes. High-side fets are IRF9393TRPBF, low side are DMG4496SSS:

img_0465.jpg

Messy schematic:

This project is still very early in development, but the prototype boards work and I've tested them by driving some NEMA 23 stepper motors at a few amps of current. Eagle schematics and code are here, but beware of dragons as it's a hacky mess - wrench.zip

Also, since this is a pretty unusual way to design a motor controller, there are some interesting pros and cons:

Pros -

Cons -

Discussion

Max, 2011/10/10 05:41

Hi. Why don't you set schottky on the bottom mosfets? Where inductances current flows in case then all mosfets are switched off?

Austin Appleby, 2011/10/16 23:51

I'm not entirely sure I understand you, but I think you're asking why I don't have freewheeling diodes across the bottom nmos FETs - it's because the FETs have body diodes that are rated to handle the same current as the FETs themselves, negating the need for an additional diode as would be necessary if they were BJTs.

anonymous, 2011/10/10 15:57

This looks really awesome, thank you!

Fuper, 2011/11/07 21:55

Hi - can this be tweaked easily to run bipolar or unipolar stepper motors?

Ryan Gibson, 2011/11/09 10:16

Hey,

Great blog :) Do you have an email I can contact you on? I have a few questions i'd like to ask you.

Thanks

Ryan

tinywrench.txt · Last modified: 2011/10/09 22:51 by tanjent
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki