Menu

Week 12

Output Device

Make things move

In many many cases, you will generate a movement. In most of the time, this movement is generated by a type of motor. They are really fun to play with and even if the base movement genereted is a circle, we can easily transform them in eliptical, straight line, zigzag etc. You can see thang010146, he modelizes tones of movement that you can inspire yourself. Here is the group assignementBomi

Create a output movement

This week is all about output. I plan to output a movement from a servo motor. In my final project step 2, I need one movement to unfold the wing and one other movement to be a artificial pectoral. My goal of this week is to choose a motor, make a code that will make it move, make a PCB, program it and test it.

Servo motor main three components are the motor, the potentiometer and the drive gears

To make it move, it gives different length of pulse.

This project needs to be affordable and accessible so I need something that can be purchase a anywhere and cheap. I also need to have a certain control on this kind on motor because the position of it will influence on the wing position. I don't want a single motor, controling the position if this component doesn't seem well adapted. The motor can be controled by on/off but not position, so I eliminated the motor. The stepper motor can be a possibility, but needs additional drivers so it will make the board at a hight price. Then the servo, we have one very small in the lab from the Kuman. They make affordable servo motor. The precision is not exeptional, but still perfect for my needs. Fun thing, you can easily see the systeme throught the case. You can control it by 3 wires:

  • GND (color brown)
  • 5V (orange)
  • Controle (Yellow)
Like the picture describes, a servo is a motor link with a potentiometer who can give little electric pulses to control the angle of the servo. This one can move between 0 deg and 180 deg on both directions foward and backward. Unlike a normal motor, I cannot create fool turn on itself. Like you can see in week 16, you can create enought motion with these servo to do something really interesting. In week 11, the input week, I create a circut that can allow me to link directly my 2 servos on it. To not miss information, you need to read both weeks to follow the process I use.

How to

1-Coding and create a movement

  1. Like in the previous week, I start by completing my code using a Arduino uno to verify if everything is working well. I try with a old servo motor from Hobby king (very similar one and after few smoke, I discover that inside of the servo the alimentation wire is touching the ground wire...oops. With the Kuman one everything was fine.
  2. Like the previous week, I start the coding process with the Arduino library.
  3. Then looking on servo project on internet I gatter multiples way to work with the servo. I decide to create object to same the servo.
  4. I create sequence to synchronise both movements.

Start by exploring the exemple code of arduino servo sweep

I modify the code creating 3 objects and putting in annotation the original code

I try to synchronise both servo

3-The board

  1. As I explained in the week 11, I made one board for input and output. I take the code that I test to test the week 11, and I mixte it with this previous one. I put my 2 servo motor on pins 9 and 10, both PWM so it will be easier for them. The result: WORKING! So I take the code from the previous week to test the sensor with led and I mixte both of them so if the sensor read a a value, it will make the "bird fly" (moving both servo)

Here is the result.

The mixing code. If I read a data than I activate the servos

The moral of this story

The output week, was very satisfying. After all I did in the previous week I did all the questionning and research on the previous week. Overall I understand much more the importance of the serial communication with the FTDI cable to make the board talk. It's really a life saving to have tips to find what is wrong with the code. The anotation in the code helps me to understand and make sure that next time I will see many delay and servo I can figure if the bird unfold his wing or fly, really helpfull.Files

Contact

Annie Ferlatte

ferlatte.annie@gmail.com
Montreal, QC, Canada