09. Output devices
Hero shot.
Assignement
Assignement requirements
Group assignment:
- measure the power consumption of an output device
individual assignment:
- add an output device to a microcontroller board you’ve designed, and program it to do something
Group Assignement
Here you can find the link to the group assignement here
it is also embedded directly in the webpage below.
Individual Assignement
For my output devices board i choose to work on spiral, of my final project FabAcademy. A board with XIAO ESP32-C3 who allow us to control servo motors with buzzer and led. I have also I2C connectors to communicate with other board.
To start with the design, I did some research to identify the different pins and functionalities of my microcontroller.
1- Creating a schematic of my board in KICAD.
2- Moved on to making the PCB, again in KICAD.
3- Switched to Flatcam to generate the Gcode
4- Move to milling after generating the Gcode
5- Move to soldering the various pins on the board
6-Programming the microcontroller
To program the microcontroller, I wrote an Arduino code for each output device.
// the setup function runs once when you press reset or power the board
int buzzer = 10;
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
tone(buzzer,450);
delay(500);
noTone(buzzer);
delay(500);
tone(buzzer,900);
delay(500);
noTone(buzzer);
delay(500);
}
File
What went wrong/What went well
Sincerely i have a lot of problem which CNC milling machine to realise the board this time. The problem was about the plate calibration. But fanaly it was fixed.