Grace Schwan Silva
  • Home (current)
  • Student Agreement
  • About me
  • Final Project
  • Assignments
    Week1:Principles and Practices, Project Management Week2:Computer Aided Design Week3:Computer Controlled cutting Week4:Electronics Production Week5:3D Scanning and Printing Week6:Embedded Programming Week7:Computer Controlled Machining Week8:Electronics Design Week9:Output Devices Week10:Mechanical Design, Machine Design Week11:Input Devices Week12:Molding and Casting Week13:Networking and Communications Week14:Interfaces and Applications Programming Week15:Wildcard Week Week16:Applications and Implications Week17:Invention, Intellectual property, and Income Week18:Project Development Final Project

WEEK 11

OUTPUT DEVICES

What are output devices?

Output devices in electronic systems transfer energy from electrical energy that has been processed to another type of energy, often light, sound, or motion (kinetic). Output devices can be digital or analog.

This week we have the task of programming an output device with our electronic board, teacher Neil showed us several output devices among them we have LEDs, speakers, LED arrays, RGB LEDs, LCD , OLED, servo motors and stepper motors, etc. I am very excited because electronics is not my strong point but little by little I am learning and I will be able to achieve it. You can find the video of the class here .

Individual Assignment:

Moving an SG90 RC 9g Servomotor

I selected a servo motor as my output device. I decided to try and program a SG90 RC 9g servo motor and will make it work.

Now we will know more about this servomotor. So before I start to control the servo motor, I have to check the specifications, one of the important things is to know the power requirements and operating power of the servo motor.

We note in the specification that the operating voltage is 4.8 V - 5.0 V, it is enough to operate it with the microcontroller.

What we also need is to know about the pinout and to know where each pin goes on the microcontroller, from the datasheet

there are three main pins on the servo:

The PWM pin: which should be connected to the digital pwm pin on the microcontroller,

The VCC: must be connected to the power pin and must be in the range of 4.6V to 6.0V

The GND: This is the ground pin.

Part Description Feature Manufacture Datasheet
SG90 Micro Servo SG90 9 g Micro Servo Tiny and lightweigh t with high output power.
  • Servo can rot ate approximately 180 degrees (90 in ea ch direction), and works just like the standard kinds but smaller.
  • You can use any servo code, hardware or library to control these servos.
  • Good for beginne rs who want to make stuff move without building a motor controller with feedba ck & gear box, especially since it will fit in small places.
  • It comes with a 3 horns (arms) and hardware.
  • Specificati ons
  • • Weight: 9 g
  • • Dimension: 22.
  • 2 x 11.
  • 8 x 31 mm approx.
  • • Stall torqu e: 1.
  • 8 kgf·cm
  • • Operating speed: 0.
  • 1 s/60 degree
  • • Operatin .
  • Tower Pro Download SG90 Datasheet

    Using the test code

    I will use the example found in Arduino to test the servo motor:

    Master Ulises Gordillo, one of the great instructors, showed us the use of the code, I learned something new for me in terms of programming the servomotor

    #include is used to call the servo library that allows an Arduino board to control RC (hobby) servo motors.

    myservo.attach(pin) The syntax is used to declare the pin number the servo motor is attached to.

    myservo.write()The syntax is used to control the axis of the motor and set the angle.

    What I do first is look under "examples" for the programming code for the servomotor in the arduino menu. Then I compiled and ran.

    First I do the simulation in TINKERCAD

    Testing the operation of the Servomotor

    I wanted to test the operation of the servomotor with the arduino UNO to make sure it works well before doing it with my electronic board.

    Now it was the turn of my Attiny 85, I connected it to be able to record the arduino code for the servomotor.

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

    WE CONTINUE
    • © Untitled. All rights reserved