Skip to content

12. Output Devices

Output devices are those elements that allow a system to communicate with the outside, for example: Engines, screens, leds, etc.

Equipment and materials

the milling cutters we use are:

  • Milling cutters 1/64 SE 2FL
  • Milling cutters 1/32 SE 2FL

Seeed XIAO microcontroller power consumption

With the same circuit that we saw in assignment 6 Embedded Programming, we did consumption tests, we used an external source that gives us the voltage and current that is consumed.

In the video we can see that the voltage is: 4.8 Volts, and the current in the source is 0.02A, so we take a multimeter and measure the current. - The multimeter gave us two measurements that oscillated, when the led was on it consumed approx 28mA, and with the lex off approx 21mA.

  • I will take 21mA as the basis, since in that situation the led was not on and did not consume additional current.

then to say the energy consumption we can base ourselves on the power, which would be the voltage and the amperage being P = V*A, in our case it would be P = 4.8x0.021, which gives us P = 0.1008 Watts.

Electronic Design

For this assignment we used an old acquaintance, our Seeeduino, which we made in assignment 4 Electronics Production, you can check it Here

Display OLED

Now let’s see the circuit to control an OLED display. we will use our old friend.

This is another caption

The screen is controlled by I2C, and if we only use the Arduino Wire.h library, it would be very complicated to control the screen because we would have to devise some way to give instructions pixel by pixel on the screen, so before venturing to develop a technique or libraries to write texts and numbers on the display, I started researching some libraries, and found: adafruit_SSD1306.h and adafruit_GFX.h. I recommend reviewing the following Guide for I2C OLED Display with Arduino, and I take this opportunity to give credits to “Random Nerd Tutorials” for making this guide.

This is another caption

the code is:

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

float Time = 0.0;

void setup() {
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  delay(1000);
  display.clearDisplay();
  display.setTextColor(WHITE);
  display.setTextSize(1);    
}

void loop() {
  Time = millis()*0.001;
  display.setCursor(0, 0);
  display.println("Fab Academy 2023");

  display.setCursor(0, 10);
  display.println(Time, 2);
  display.setCursor(35, 10);
  display.println("Seconds");

  display.setCursor(0, 20);
  display.println("Albert. J.");

  display.setCursor(0, 30);
  display.println("U. Continental");
  display.display();
  display.clearDisplay();
  delay (10);
}

Finally, I leave all the designs.

  • Download the files here

This is all for this time.


Last update: April 4, 2024