Skip to content

Week 9: Output Devices

Tasks for this Week

Group assignment

  • Measure the power consumption of an output device.
  • Document your work on the group work page and reflect on your individual page what you learned.

Individual assignment

  • Add an output device to a microcontroller board you've designed and program it to do something.

Group Assignment

Link to Group Assignment
We ended up measuring the power consumption of an LED for the group assignment.

What I got out of the exercise was an understanding of how to measure and calculate the power consumption which is easy to do with sensors you are able to measure with a multimeter, still need more practice with the oscilloscope.

Output Device

I selected to use a Piicodev OLED which is made by a local Lake Macquaire/Newcastle company, Core Electronics.
pico

I plan to use this in my final assignment.

New PCB

I have designed a new PCB for connecting my OLED and other I2C devices to a Xiao RP2040

Board Design

I designed the board in KiCAD.





GCode

I used Mods to make G-Code to use with the SRM-20 to mill the PCB




Board Milling




I soldered on the headers and tested them using the multimeter. The size of the board is small so soldering can be a challenge, I found soldering the 4 pin breakout header first and then the two headers for the Xiao was the easiest way.

Programming

Code

# Original code by Core Electronics 2023, modified May 2023 by Claire Chaikin-Bryan
from ssd1306 import SSD1306_I2C
from PiicoDev_SSD1306 import *
from machine import Pin, I2C
from time import sleep

i2c = I2C(1, scl=Pin(7), sda=Pin(6), freq=200000)#Grove - OLED Display 0.96" (SSD1315)
oled = SSD1306_I2C(128, 64, i2c)

while True:  
    oled.fill(0)#clear
    oled.text("Hello,World!",0,0)
    oled.show()
    #sleep(0.5)

Final Result

I soldered a 4 pit output onto the OLED and then was able to plug it into my board and run the code.

Files

KICAD Schematic
KICAD Board
Traces Cutting File
Dill Holes Cutting File Edge Cuts Cutting File

Code reference files
PiicoDev_SSD1306.py
ssd1306.py