Week 13 Output devices
For is week my goal it tho have the brushes of the LeafBot spinning around. But I also have to take in notice that FabLabEnschede and the Saxion University is closed on Thursday and Friday. This meens less time for making the molds for the lamination of week 14. Paul and I had to make the molds also in this week, otherwise we will come in to time troubles. So I do the things in this week what I have to do in the FabLabEnschede and the rest will be done at home during the long weekend. This weeks and next weeks assignment will be done at ones. First I focus on getting a DC motor running. Then fix it to the brushes of the LeafBot.
I am using my fabkit to control the DC motor. I use a motor and battery of a used electric screwdriver. From my previous testI know that this electric motor should be strong enough. The motor to turn the brushes has only one turning direction. So a transistor is good enough for this application. In the Leafbot there are also other controllers needed. That is done later. First I want to start simple. And then progressing in my knowledge and skills. The layout of the picture below is used to design in Eagle a schematic
The schematic is build up with the use of a Transistor TIP120. Because the connecters are beeing connected to the headers, and the is force applied to the headers, this PCB is build op with through hole components. All the other PCB boards I made where SMD type. In this week I also have to add and drill holes in the PCB. The diode is a 1N4001 DIODE Power rectifier 35V, 1A, DO-41 and an C1206 0,1UF capacitor.
The schematic is changed into board layout
My first design of the PCB. Later I discovered that all the connections where on the toplayer, with was not ok. I learned in week 11 that I could import hole in the board. This what I did this time. These holes are to connect the PCB to my leafBot with some 3 mm screws.
I changed the routing to get a nicer and compacter layout of the PCB
A DRC check is done. Some small overlap gives an error. The routing has to change a bid.
In Properties in Eagle the ISOLATE is changed and increased to 24 to have a greater spacing between the routings. Then I created the red dashed polygon around the board, for the ground pour. It changed in dashed when the loop is closed. Changed the name to GND, so this is then linked to GND.
The spacing around the routing much increased
Increasing the hole diameter of the drilling for the components
Increasing the copper surface area around the holes, so the soldering is easier.
But the routing should be on the bottom layer. The Routing was changed to the bottom layer.
The text had to be applied new, because otherwise it would be milled mirrored.
An DRC check shows no errors
Since the paper F2 boards where not arived by mail, I had to use the fiberglass PCB boards again. This will be the last time. First the milling on the bottom layer was done.
The board was reflected on the machine and the holes and outline where milled.
Next was soldering the board
My college let me use his flux
It worked fine
The board is ready to be tested. First wat I did was my milling of the mold for the assignmnet of week 14. But that is reported in Week14. After the milling it was time to connect the battery and electric motor to the board and run the Arduino sketch. A simple sketch just to try to spin the motor an few seconds and stop it again.
To check the on which pin of the FabKit the signal to the motor can be connected, first both the ATMEGA 238P microcontroller layout and the fabkit was
checked. The pin 13 was chosen.
SCK/PCINT5 – Port B, Bit 5
SCK: Master Clock output, Slave Clock input pin for SPI channel. When the SPI is enabled as a Slave, this pin
is configured as an input regardless of the setting of DDB5. When the SPI is enabled as a Master, the data
direction of this pin is controlled by DDB5. When the pin is forced by the SPI to be an input, the pull-up can still
be controlled by the PORTB5 bit.
PCINT5: Pin Change Interrupt source 5. The PB5 pin can serve as an external interrupt source.
Then a sketch to turn the motor on and of for a few seconds was openen and the pin was changed to 13.
I connected the wires to the PCB. The sketch was compiled. No problems. The file was loaded. The LED is blinking. So the fabkit is working ok. The battery power should be 10,8V but is 6,6V. The motor is not spinning around. I try to find it, but I could not find the fault that causes this.
I charged the battery but after 2 hours of charging the battery Voltage is still 6,6V. I think battery live is not so well anymore. I also tried to connect the battery direct to the motor, since they are both 10,8V. But also nothing happend.
Special thanks to my collega's Patrick and Nicolas at FabLabEnschede. They helped me in sharing there knowlegde to me so I was able to learn a bit more on this weeks subject
In week 15 a check on the problem with the not turning electric motor is done. The plan was to use the electric motor and chargeable battery of an electric screwdriver. But it was not a good plan. It turned out that the motor startet not to spin by it self without some help and the battery was in a very poor conditioning. then an external powersupply was added to the battery connection and new electric motor from Johnson was connected to the PCB. Still the motor was not spinning.
I had a extra diode and Transitor avialable and first with an Breadboard the schematic was made to check it. It worked. Then a good look to the picture above and to the soldered PCB learned me that the Diode was soldered the wrong way. I changed this and checked the electric circuit again. And yes the motor was spinning. Next was to connect it to the FabKit and run the Arduino sketch.
The diode in the wrong direction
The diode changed to the right positioning.
Am small movie that the electric motor is spinning and running the Arduino sketch
Files of week 13