ESE 516 (1 cu) In "Controlling the World", students will fabricate their own IoT board, complete with microcontroller, network, and sensors that connects with real-world cloud services. Additionally, the class will focus on a comprehensive analysis and creation of a custom bootloader for over the air firmware updates, a critical addition for any modern electronic device and will also dive deep into Altium, an electronics CAD package, that will expose students to rapid IoT focused circuit design and prototyping. Finally, each student's device will be linked up to the cloud for data logging, control, and automation. We'll discuss all things Cloud, Edge, and Fog, as well as trends in the embedded industry. Field trips will supplement these lectures, with travel to local businesses succeeding in the IoT realm. When the course is through, each student will have completed an accelerated electronics product cycle in the Internet of Things and will have the power to deploy their custom device with web capabilities.
Students will begin the course by learning Altium. They'll design their first round of PCBs and send them out for manufacture within the first weeks of the course. The PCB will be a basic layout with a recommended WiFi capable microcontroller, such as the Atmel WINC or the Espressif ESP32 / ESP8266. It will have a power regulation, sensors, and actuators on-board -- buttons, accelerometers, relays, LEDs, etc.
Students will learn to assemble their custom circuit by hand, using a solder paste stencil and reflow oven. This will provide a better understanding of design constraints in layout. Students will bring up the boards and program them for the first time, noting any issues in design and fabrication. There will be an opportunity to revise their PCB layout, correcting any errors in the first board and adding any extra sensors or actuators.
The class will design and build a bootloader in bare-metal C to support over-the-air firmware updates (OTAFU). An investigation of memory maps and program space will highlight constraints that drive the design of the bootloader, choice of the microcontroller, and decision for external memory usage. The bootloader will implement checksums to verify data and redundant device images in the case of boot failure. Students will create state diagrams that describe the boot process and create their own memory map.
Students will then deploy their bootloader on their custom fabricated and assembled PCBs. Lectures will focus on good firmware practice, protocol implementation (SPI, I2C, I2S, etc.), and effective debugging. Finally, the course will turn towards the web aspect of the IOT -- using cloud services to capture data from connected devices, as well as controlling devices from the web. They will set up their circuits to gather sensor input and send this data to one of the many cloud services out there, such as Amazon AWS or Google Cloud Platform.
The final project for the course will bring all core topics together. Each student's device must successfully implement a custom bootloader for OTAFU, communicate with its on-board sensors and actuators, log data to the cloud, and actuate the device from the web. As a bonus, students may also perform advanced data analysis on logged data to pull out important markers and trends.
Class Prerequisites and Schedule
Prerequisite: ESE350, ESE 519 or undergraduate background in microcontrollers
Maximum class size: 20 students
Class : Monday & Thursday, 6-7:30pm
Anticipate to have 1 lecture a week in the classroom and the remainder of the time in the Detkin lab
Week 1 - Altium (Part 1), Component Selection
We'll discuss the course outline and final goals for "Controlling the World". Students will be posed with brainstorming what they'd like their device to do. The basics of Altium will be taught - design rules, layer stacks, Vault components, designing custom components, pours.
Propose specifications for final device. Include sensors, actuators, and choice of wireless microcontroller. This will be a first draft and will be revised.
Do component research, taking special time to explore the wireless MCU options.
Critical to the decision is price, anticipated development time, MCU development environment, existing code libraries & support. Component research will be summed up in a short 2-page write-up.
Get familiar with Altium. Set up a basic battery powered regulation circuit that supplies 3.3V.
Week 2 - Altium (Part 2), Application notes
We'll review the final project ideas, discuss component selection, and dive into application notes for parts. After, we'll teach more Altium schematic capture & PCB layout skills.
Make revisions to final project specifications.
Select components, capture schematics for device, and layout PCB.
Week 3 - Altium (Part 3), OTAFU Bootloader (Part 1)
We'll knot up any loose ends in Altium, review creating an outjob and resolving DRC violations. Then, we'll go through bootloader basics and best practices.
Complete the PCB design. Each student will share their design with a classmate, and they'll do a "crit" -- going through design decisions and finding any issues that may cause improper function. The teaching staff will then review the PCBs as a final check. All PCBs will be sent out for manufacture at the end of week 3.
Submit a Bill of Materials.
Create a basic memory map of the MCU, building in the bootloader space. Make a state diagram that describes the functionality of your bootloader.
Week 4 - OTAFU Bootloader (Part 2)
We'll review bootloader memory maps and state diagrams from the previous week, and then talk about boot failures & recovery plans. We'll touch on checksums as well, and how to validate data.
Update memory map & state transition diagram.
Start designing bootloader -- what libraries and dependencies need to be included?
Week 5 - Good Firmware Practice, Protocols, Debuggers
This lecture will cover some basics in good firmware design, how to interface with common protocols, and maximizing the utility of a debugger,
Develop the firmware necessary to communicate with on board sensors. Students will effectively have their "board bring-up" code by the end of this assignment.
Continue work on bootloader.
Week 6 - PCB Hand Assembly & Reflow, Large Scale PCB Manufacturing
Custom PCBs will have arrived by this point. Students will learn how to reflow a PCB using solder paste, a paste mask, and a reflow oven. We'll talk about working with contract manufacturers and important practices when releasing PCBs at a large scale.
Reflow your PCB, and load your first LED blinking code.
Determine if there are any issues with your PCB. Fix issues by hand re-work if possible.
Continue work on bootloader.
Week 7 - Cloud Services (Part 1)
We'll discuss popular cloud services and what it takes to get your data up there. Touch on data security, authentication, existing libraries and development.
Fix any issues with your PCB, and add any sensors or components for the final release of the PCB.
Continue work on bootloader, basic firmware.
Week 8 - Field Trip
Release final PCB.
Continue work on bootloader, basic firmware.
Week 9 - Spring break
No assignments, second revision of PCBs out for manufacture.
Week 10 - Cloud Services (Part 2)
We'll discuss how to handle all the data you've collected, how to draw meaning out of it.
Reflow second PCB and get up and running. Determine if there are any issues.
Connect to a cloud service for web control or data logging.
Week 11 - Final Project Overview
What the final project entails. Rest of the semester will be support within the lab setting.
Using the second revision of the PCB, create a working OTAFU bootloader for your microcontroller. Final firmware must connect to the cloud for input and output.
Week 12 - Field Trip
Work on final assignment.
No Lecture. Work on final assignment & presentation.
Week 14 - Final Presentations
All students will get a chance to show off their custom PCB and what they learned from their sensor analysis. 2 slide max per student, maybe do a 2-minute movie per person.
Instructor : Ed Gardcia
Teaching Assistants (Fall 2019)