Week 13

Output Devices
(Apr 27)

Assignment:

add an output device to a microcontroller board you've designed and program it to do something

1. Sketches

For the Final project I want to use 2 servo motors to control ink tube movement. I plan to use Satsha kit for this

Right now 'll focus on the PART B. Manual test of arms movement..

The struture is ready for testing

2. Satsha kit

I've been struggling with Satsha Kit for some times.. my first 2 boards had short circuit and I have no idea why..

I wonder would it be that I soldered badly ? My board is lasered badly ?

Then with the 3rd Satsha, I discovered that when I finished solder it, there was no short circuit. But soon after I connect everything, the short circuit happens !

Since the connection seems correct, Enrico suggest that probably because solder problem.. One valid ipotesi is that I use the bad-quality solder flux !

I used the left most one which is quite old so it might have had created problems

So Enrico helped me clean the PCB with alcol, cotton bud and cleaning spray.

And there's no short circuit anymore !! yeah ! So I try to ptogram it.. but life is not easy :(

Since we are using ATmega238PB, not 328P, Arduini IDE doesn't recognize it.I try follow this thread but it doesn't work..

11/6/2016

With a correct ATMEGA 238P, I desolder the ATMEGA 238PB and solder the correct one.

I tried connect with my FabISP but no success..

So I try using Arduino as programmer instead, following this connection scheme with Arduino

And.... it did it !!! :D

VICTORY !!!!

4. Testing

I connect Satshakit with FTDI cable following this connection scheme


Up load blink sketch successfully !! :)

Pin

5. OUTPUT Programming Workflow

I have 3 types of motors :
1) For the arms, 2 Servomotore Parallax IncPower requirements: 4 to 6 VDC
RS link
2) For the book, 1 tower pro mg 995 Operating voltage: 4.8 V a 7.2 V
convert it to 360 rotation ?
3) an anonymous micro pump

Voltage regulators

Here is the workflow :

States :
1. draw 
- dc pump starts
- servo arms move
(L,R); (L,R)...


2. stop 
- dc pump stops
- servo arms close
()
- servo leg closes and then open the book

6. Controlling the pump

Since the pump is anonymous and there is no label on it, I have to test it with different voltage.
In the end it seems to work from 3v to 9 v but the effect of the droplet that I link the most is 3v

Button on Satsha kit controls dc motor

7. Controlling the Arms and the Leg

In order to draw, the two arms will move almost randomly. They must be limited the range in order to avoid the crashes.
In standby mode, the two arms have to be in safe erea to avoid crashing with the leg.

Control the arms and the leg (3 servos).. looks good !

First run with ink ! What a mess !! I spent some time to clean the table afterwards :D

I shortened the ink tube distance under the arm, less messy now ;)


Download files :
Program in Arduino IDE (ino)



<< previous | next >>