1.Group Assignment.
.measure the power consumption of an output device
2.Individual Assignment.
. add an output device to a microcontroller board you've designed,and program it to do something
You can access Group Assignment in details here
In this week was another opportunity for me explore more in electronics,this was really an interesting week because I learnt many things regarding electronics and mostly I made a progress regarding my final project, In this Output_devices week I used LCD screen in order to be familiar with the output devices that I will use in my Project,unfortunately it first failed and I tried for the first time with Blinking the LED.
Output devices:is any piece of computer hardware that converts information into a human-perceptible form or, historically, into a physical machine-readable form for use with other non-computerized equipment. It can be text, graphics, tactile, audio, or video. Examples include monitors, printers, speakers, headphones, projectors, GPS devices, optical mark readers, and braille readers. Here for more information.
Back in week 7 of electronic design, I designed my Programmer with CH 340G chip on my board,I used my Programmer in order to program my board the one i used in producing the outputs.
Below are the steps that I followed in designing,cutting and programming my Board..
In designing my Programmer I followed this process;
Firstly was identification of the components to be used in my Board,the components were:Connectors (Pin header),MCU(ESP32) ,Regulator,capacitor,resistor and LEDs,push button.
I do have KICAD Software which is is used to create schematics, printed circuit board (PCB) layouts and also perform simulations
Soldering The Components.
After Soldering the compnents on the board.
Blinking LED
For the first time I used the blinking led my first proposal because the LCD was not responding displaying nothing in the screen.
Then I blinked the LED
The codes to blink the LEDs
int RA = 14;
int GA = 12;
int delayon = 500;
int delayoff = 600;
void setup() {
Serial.begin(9600);
pinMode(RA, OUTPUT);
pinMode(RB, OUTPUT);
}
void loop() {
//RB,GA
// Serial.print(random(10,200));
digitalWrite(GA, HIGH);
delay(delayon);
digitalWrite(GA, LOW);
delay(delayon);
digitalWrite(RA, HIGH);
delay(delayon);
digitalWrite(RA, LOW);
delay(delayon);
}
Displaying Static Text Message and Dynamic Text Message On LCD Screen.
I have used LCD 16*2,The term LCD stands for liquid crystal display. It is one kind of electronic display module used in an extensive range of applications like various circuits & devices like mobile phones, calculators, computers, TV sets, etc. These displays are mainly preferred for multi-segment light-emitting diodes and seven segments. The main benefits of using this module are inexpensive; simply programmable, animations, and there are no limitations for displaying custom characters, special and even animations, Here
Regarding my final Project I continued to try if the LCD that I had was working, I spent alot of the time in debugging and later it works but it was not having the bright screen but the Letters was visible, and I found that the codes are working the problem was the output device.
An interesting moment
Was that later I found new LCD Screen which works well and I was really excited to get it working
Here are the codes I used in Arduino software.
#include
// set the LCD number of columns and rows
int lcdColumns = 16;
int lcdRows = 2;
// set LCD address, number of columns and rows
// if you don't know your display address, run an I2C scanner sketch
LiquidCrystal_I2C lcd(0x27, lcdColumns, lcdRows);
String messageStatic = "Static message";
String messageToScroll = "RUGANJI Prince Fab Academy 2023";
// Function to scroll text
// The function acepts the following arguments:
// row: row number where the text will be displayed
// message: message to scroll
// delayTime: delay between each character shifting
// lcdColumns: number of columns of your LCD
void scrollText(int row, String message, int delayTime, int lcdColumns) {
for (int i=0; i < lcdColumns; i++) {
message = " " + message;
}
message = message + " ";
for (int pos = 0; pos < message.length(); pos++) {
lcd.setCursor(0, row);
lcd.print(message.substring(pos, pos + lcdColumns));
delay(delayTime);
}
}
void setup(){
// initialize LCD
lcd.init();
// turn on LCD backlight
lcd.backlight();
}
void loop(){
// set cursor to first column, first row
lcd.setCursor(0, 0);
// print static message
lcd.print(messageStatic);
// print scrolling message
scrollText(1, messageToScroll, 250, lcdColumns);
}
Below is the picture while working.
Below is the Hello shot while the screen working displaying the sliding the text.
As summing up I can say in this week I learnt more,but major thing I have realised Working with machines requires a variety of skills,knowledge and mostly it's to work with more attention to PCB because any slight mistake can damage the whole work you have done, I have seen it while soldering and cause some short circuits which became more difficult to debug.
hereyou can download the files.