W12 - OUTPUT DEVICES


W12 - REFERENCES

link: Stepper Motor
link: The Software Servo Library
link: Tutorial Servo Arduino
link: Mini Servo Motor
link: Duracell Battery

W12 - DOWNLOADS
design files

The assignment of this week is focus on receiving an output from one of the components on our board or in a shieldboard. I decided to design a specific shield based on the one archieve.
The original idea was to use a hello.duino to control stepper motor using a shield board. I did the hello.duino and was able as for input to run the bootlader.
A stepper motor (or step motor) is a brushless DC electric motor that divides a full rotation into a number of equal steps. The motor's position can then be commanded to move and hold at one of these steps without any feedback sensor (an open-loop controller), as long as the motor is carefully sized to the application.
There are two basic winding arrangements for the electromagnetic coils in a two phase stepper motor: bipolar and unipolar. A unipolar stepper motor has one winding with center tap per phase. Bipolar motors have a single winding per phase. In my case I had a unipolar stepper motor. It was necessary to use a 9v battery to give the right VCC to the stepper motors. It was a bit difficult to understand which PIN OUT was coming from the motor since in the fablab we had one but with no documentation attached. In order to do that we were checking directly on the Stepper and the battery. It was possible in this way to understand more than everything the order for the right rotation of the servo since if the order is wrong doesn't move in the right direction having also step back. Because of problems in the resontar and the Atmega16 I decided to use my board for the final assignment.
I also used a mini Servo motor that is the same kind of the one we used for the gimbal system. I found a problem with the coding. The servo motor library works amazing in arduino but there are problems of compatibilty with the ATtiny 45. For this reason I used an external library: The Software Servo Library. The Software Servo Library can drive servos on all of your pins simultaneously. The API is patterned after the wiring.org servo library but the code is different. You are not limited to 8 servos, but you must call the SoftwareServo::refresh() method at least once every 50ms or so to keep your servos updating.
The library have three examples file and the one I used is Sweep. It works very nice and it's easy to controll. The servo is connected to my board directly to GND and VCC - the 5V VCC. The PIN I'm using is the number 4 according to the datasheet of the ATtiny45. The video of the servo moving is available at the bottom of the page.