LudoMTR (Part 2)

Part 123456


Arduino can deliver up to 40 mA per pin, this is not enough for driving our motor. The use of multiple pins in parallel allow more current (200 mA) to be drawn from Arduino. A limiting resistor will prevent excessive current to be sunk. With V = 5V, Imax = 200mA, R = U / I = 25 Ohm. This value can be dropped down to 10 Ohm without frying your ATMEGA chip.

Here is the electrical simplest shematic

Attention: The minimalist design of this circuit requires maximal attention and care! If you do not feel confortable with it, try next design!

If you are not confortable with electronics or fear bugs from your code, it may be safe for your Arduino baord to adopt the following shematic. Each pin is protected by a so-called ballast resistor. So that one or more pins from a bank can be set opposite to the others without risks. Using 47 Ohm resistors will result in an equivalent resistance of ~16 Ohm according to Ohm laws for serial and parallel resistors arrangements.

This schematic includes a trimming pot which shall be used for adjusting the speed of the rotor. Any pot between 1 KOhm and 100 KOhm will do the job. In the absence of an oscilloscope, the led wired to digital pin 13 will be very helpful for diagnosing your circuit.

– Check you wiring once, have a drink, get back to your bench and check your circuit once again
– The ATMEGA micro processor will get hot during operation and even smell: that’s normal! In case of smoke, unplug your board immedialetly!
– Watch out the bare copper wires, keep them as far as possible from other non islotaed pins or components.

How does this driver work?

LudoMTR is generating 4 phases cycles:
– Pins from PORTD are high (~5 V) and pins PORTB are low (~0 V): current flows in one way, the coil aligns with the magnet’s field
– Pins from PORTB and PORTD are low (~0 V): no current flows through the coil, the coil keeps turning because of its momentum
– Pins from PORTD are low (~0 V) and pins PORTB are high (~5 V): current flows in the other way, the coil aligns again with the magnet’s field
– Pins from PORTB and PORTD are low (~0 V): no current flows through the coil, the coil keeps turning because of its momentum

PORTB and PORTD pins are wired as a H bridge, a very commonly used configuration for motor drivers.

Here is a short video illustrating the principle of operation of LudoMTR

The yellow and blue traces show the signal from both poles from the rotor. You can clearly see that the ATMEGA cannot achieve +5 V on high states (~3.5 V) nor 0 V (~1.5 V) on low states. This plot shows that the rotor is fed with a maximum voltage of 3.5 – 1.5 = 2 Volts. This means that the ATMEGA chip must dissipate 3 times the current flowing through the rotor, thus the incomparable smell of hot chips…

  The thing is that I performed the early tests using an “old” ATMEGA168 that was initially mounted on a Diecimila that I upgraded for an ATMEGA328. In case…


Next post on same subject

One Comment

Leave a Reply

You must be logged in to post a comment.