Home Table of Contents Previous week Next week


This page presents the assignments for week 11 of Fab Academy 2020: “Output Devices”.


To do list:



Group Individual

Week 11 CAD files:

gimbal_controller.kicad_pcb (own work)

gimbal_controller.pro (own work)

gimbal_controller.sch (own work)



Sweep_test.ino (BARRAGAN and Scott Fitzgerald details inside)



Week 11 "hero shot":





Figure 0: Control a servo

Table of Contents

Group assignment

To do when the Fab Lab is open again.

Individual assignment

Add an output device to a microcontroller board that I have designed

Already done during week 8! :)


Schematics V3


PCB layout V3


PCB 3D view V3


SVG for the laser cutter

Control a servo with my board



Sweep_test.ino
As in week 9, interfacing the output device to the microcontroller is easy when they are available libraries that do the hard work for us...

I simply use the demo code "sweep_test" from BARRAGAN as a programming process:

Include the library "Servo"

Define the object "myservo".

Define the integer "pos".

In the setup function attach the "myservo" object to pin 6. (PWM pin for arduino board and atmel A328p)

In the loop function

Do a for loop for pos starting at 0 and ending at 180 with an increase step of 1 to move the servo from 0 to 180 degree with a delay of 15 milliseconds between each degree.

Do a for loop for pos starting at 180 and ending at 0 with a decrease step of 1 to move the servo from 180 to 0 degree with a delay of 15 milliseconds between each degree.



The video below shows a longer single sweep.





Servo rotation

Add and program an output device to a commercial board

Work done during Covid lockdown

In this section, we will use a raspberry pi 3 with a NAVIO2 hat from EMLID to control servo of a drone.

Figure 6 shows a snapshot of the code

Video 1 shows IMU reading from Navio2 placed inside a fixed wing drone.



Figure 2: "Servo.cpp" code snapshot




Video 1: Navio2 servo control