Embedded Programming

Group Assignment

Class Week 8

Setup

We decided to compare some architectures:

Arduino UNO (ATmega328p)

Arduino Uno is a microcontroller board based on the ATmega328P (see here the datasheet). It has:

Some special features of the board, according to the Arduino Official Website:

Arduino Leonardo (ATmega32u4)

Arduino Leonardo is a microcontroller board based on the ATmega32u4 (datasheet. It has:

Some special features of the board, according to the Arduino Official Website:

NodeMCU (ESP8266)

The NodeMCU board (v1.0) is based on the ESP8266 WiFi chip.

Special Features:

ESP32 DEVKIT DOIT (ESP32)

Special Features:

Comparison

They can all be programmed through the Arduino IDE and connected to the computer with an USP cable. Simple codes can be easily modified to run in all of this boards, more complex codes can be more specific, some examples can be:

Performance-wise ESP32 should be the faster and most complete board of all, as it has a lot of features, better CPU and more memory. We found this comparison chart that took all of this CPUs into against each other on clock speed:

So the Arduino UNO and Leonardo runs at 16MHz, the ESP8266 at 80 or 160MHz and the ESP32 at 160 or 240MHz. We can see that with more power comes bigger energy consumption as the ESP32 presents picks around 150ma, ESP8266 on 70ma and the Arduinos around 25ma.

The costs also rise with the processing power:



Invidual Assignment

In this week assignment we programmed our PCBs, that we produced in the assignment Week 6 - Electronics Design.

Programming with Arduino

To get my PCB programmed I followed the steps this chapter: "ATtiny Embedded Programming with the Arduino IDE", which I found in this tutorial.

Before programming the microchip, we went back and studied the Data Sheet of the AVR Microcontroller ATtiny44. The microchip provides an 8K byte of In-System Reprogrammable Flash memory for program storage. This is not a lot, so I had to consider this before installing the needed Libraries and programs to the microchip.

Libraries and Bootloading

In the next step I had to connect the pins, considering the different numberings between an Arduino and my ATtiny44.

After this the PCB was ready to be programmed doing something.

Blink Tests

I tested the PCB, using the Arduino sample from its library, and made up three blink test:

This circuit is a basic constellation, which is also known as Charlieplexing.

Conclusion

The blink tests were successful, the only difficulties I had, were to understand the theoretical part regarding data sheet and libraries. An interessting experience was also, that see what changes, when you modify the circuits of the tutorial, in my case left out the button and added a second LED into it.
Assignment accomplished...