Tinywrench Controls Motors With ATtiny24 Chips

Tinywrench is [Tanjent’s] take on a motor controller board. It aims to replicate all of the functions that a standalone motor controller chip offers at as low a cost as possible. Early results are in. It works, and as seen can be assembled for about $8.

The top of the device offers a terminal block for connecting motors, ground, and 24V input. A pin header on the bottom has all the connections you would expect to find with a stepper motor driver board. Looking back on top there’s also a pair of ATtiny24 chips, each with its own trimpot for balancing the constant current output. Hiding on the underside of the board are two H-bridges built using high and low-side MOSFETs along with some diodes for protection, and various passive components for driving them.

As it stands, each of those H-bridges can handle around 9 amps which should be more than enough for projects with small motors. [Tanjent] mentions that one of the main advantages of working with this instead of a single motor-driver chip is that if you fry one of the MOSFETs you can replace it instead of trashing the entire board.

9 thoughts on “Tinywrench Controls Motors With ATtiny24 Chips

  1. This is a very cool design. I love the low-cost/simplistic standpoint. It looks great.

    I have contemplated making motor drivers with a ARM Cortex 3 driving a pair of H-Bridges. The using I²C, you can control a few drivers with one data bus. Add a hardware dip switch to select the address of each board, then program them.

  2. i really dont like the switching mode for the high side. add a couple small signal transistors for a nice driver.

    also, i highly doubt that the board will be able to handle the power dissipation for two bridges of 9A, especially if the current is limited by turning the transistors on and off at a few tens of KHz.
    other than this, a very good design and replacement. if he can find a micro to replace the two which is less then double the price, it will become simpler.

  3. @bogdan – I designed a variant of this board that had level shifters on all the FET gates, but the parts cost and complexity adds up – to get an acceptable switching time I needed 3 BJTs per FET plus biasing resistors, and it still wasn’t much better than the capacitively-coupled gate drive.

    And yeah, 9 amps is optimistic, but I’ve run it at 4-5 amps (the limit of my bench power supply) with no heatsinks and didn’t see any significant heating of the board.

    1. If you can run 4-5A with both H bridges(assuming half/micro step) this is great news. Even if this is the total current it is still great news. The cost is lower than a similar driver I’ve built with L297+298.
      If you have access to a scope, could you post some waveforms from the PMOS gate?

  4. Nice design! Very impressed with the small parts count and budget.

    It appears there’s two pins free on each ATTiny. Since only the high or low side needs to be switched for PWM (not both simultaneously), perhaps those free pins could be driven in parallel with two of the existing drive pins to improve the switching speed.

    1. Paralleling the output pins would probably help switching speed, but I need to redo the pinout so that I don’t have to desolder things just to reprogram the chip – after that I probably won’t have any free pins.

      Amusingly, the cheapest ATMega48 is only ~50 cents more than the ATTiny24, and it has twice as many pins. Dedicating a whole ATMega to a single H-bridge seems a little ridiculous, but I could parallel 3 pins per FET and drive even larger loads. :)

      -tanjent

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.