Output Devices

Output Devices

By Saheen Palayi | 22 April 2021 | FAB Academy 2021

week 12 assignment is to add an output device to a microcontroller board I've designed, and program it to do something

Like I planned before I'll be continuing my Tachometer project which started during my input week,This week of output devices I'm adding an OLED Display device to the PCB that I already made.


 machine-week

This is the schematic of the board that I already Design


 machine-week

And this is the board layout

Check my Input Devices week to know how I designed the board and how did I added the input sensor and all

OLED Display

An OLED Displays are a Type of Display technology which use Organic Light Emitting Diode for each Individual pixel


 machine-week

The above Diagram is shows a Physical OLED Structure.This is a modern achievement in Display technologies that finlay we can create almost true black or dark colours while displaying pictures. Because,The main advantage of OLED Displays are we do n't need a huge backlight to power up the entire display .each individual pixel light up itself .

There are many different type of OLED displays module Available in the market


 machine-week

These are the commonly use for prototyping purpose.These type of Module have I2C Protocol to communicate with it.Fablab Kerala has one of these in it's Inventory stock.It's a 0.96" I2C yelLow Blue color OLED Display

I2C Protocol

The Inter Integrated Circuits AKA the IIC or the I2C is a two wire serial Interface communication Protocol just like USB in our Computers.It can communicate between almost upto 128(112) devices when using 7 bits addressing and almost upto 1024(1008)devices when using the 8 bits addressing.

 machine-week
From analog.com

From the figure You can see mainly 2 wires used.one is SDA or Serial Data and other one is SCL Serial Clock

The OLED That I have is using the I2C protocol to receive data for displaying on it.I will do more documentation about I2C in upcoming Networking and communication week. for more checkout the documentation from Howtomechatronics.com

Testing

the Fabrication and design of the my PCB is already done during the Input Devices week,so I can connect the OLED module then start programing.The OLED that I'm Using was based on SSD1306 chip which support both SPI and ISP

Then I edited the OLED Hello world program from Professor Neil ,found on fab output devices class page for the Attiny412 chip with the help of it's data sheet


 machine-week

I loaded the code into the arduino IDE and selected the chip Attiny412,port,programmer etc...


 machine-week

I inserted the OLED Display in place on the PCB and connected to the UPDI board That I made then connected the FTDI cable and finally to my PC.I didn't soldered those pins of OLED,It still get contact because I used copper revet for the Through holes


 machine-week

I got an unexpected error!.It was an Upload error.I did programed the board before during the input week.I tried to debug the board and the software,USB plugs..etc.. at last I found out the problem.


 machine-week

Look at this picture the OLED Pins order is different the left one is Neil's Board and the right one is from our LAB.I was following Neil's board while designing the PCB.Now I have to either redesign the PCb or have to buy a new OLED Module with correct pin order.

After removing the OLED I tried to program the IC again because I can wire the OLED to my board by soldering.But the board not responding! That was strange! and unbelievable .The OLED PIn order mistakes some how course damaged the Attiny412 Chip.


With Arduino

I has to replace the chip in order to continue but because of the Covid 19 protocols I can't access the lab these days.So I'm at home,but have some components with me not the Attiny412 .So I did tested the OLED with an Arduino UNO board


 machine-week

I connected the OLED Display module to the Arduino UNO development board like in the picture.with few jumper wires the hardware very simple!


 machine-week

I couldn't edit the Nei's c file for the Atmega328p chip on the Arduino UNO,so I followed the suggested Adafruit library for the SSD1306 OLED Modules.found trouble while programing


 machine-week

with little bit of research and some effort I found another library for the OLED called u8g2 from Github/olikraus .still got trouble while adding the zipp libary to the arduino,but I mangged to clear the trouble here is the simplified and easy to install version of the u8g2 by me


 machine-week

after adding the zip library to the arduino ide I loaded the hello world program for the OLED by following File >>Examples >>U8x8lib >>HelloWorld


 machine-week

As per the instructions I uncomment the line for selecting the OLED display type and compiled successfully

Then I plugged the arduino uno board and selected the board, as well as the port then uploaded the sketch


 machine-week

It's working!.This is not my first time with the OLED module I worked with 0.91" IIC 128x32 type module before

week 12 Group assignment is to measure the power consumption of an output device

Back to Top Back to top