Week 3: Embedded Programming

About đź““

  • Group assignment: Demonstrate and compare the toolchains and development workflows for alternative embedded architectures

  • Individual assignment: Browse through the data sheet for your microcontroller Write a program for a microcontroller to interact (with local input &/or output devices) and communicate (with remote wired or wireless connections), and simulate its operation

  • Process ✏️

    This was a super cool week! I enjoyed simulating a range of simulation tools like Wokwi and Tinkerkad. Here is a preview of what I experimented with Wokwi. I tried using an ESP32C3 and accelerometer. I see this as such a valuable step when it comes to producing my electronics for the final project.

    Wokwi Simulation
     Big centered image of project

    Tinkercad Simulation I enjoyed trying to similate blinking LEDs in Tinkercad. It was a strong learning experience to easile view the power of resistors, and easily swap components.
     Big centered image of project
    While the inner workings of microcontrollers are new to me, I have a LOT of experience with them as a user. As an active Garmin, Apple Watch, Whoop nerd, I strive to understand the foundation of each of these wearables and the data they extract.

    That said, my microcontroller of choice: Seeed Studio XIAO SAMD21. ✨

    I was debating between the SAMD21 and RP2040 for my wearable. Based on my initial research, for a basic fitness tracker with a strong emphasis on power conservation, the SAMD21 appeared to be the better option. The RP 2040 is more optimal for more processing power and can manage slightly higher power consumption, or for Python for faster development.

    Key Differences

  • Ease of Use: RP2040 might be easier to start with for beginners due to the Python support, whereas the SAMD21 is straightforward with the Arduino ecosystem but leans more towards traditional embedded development.
  • Performance: The dual-core RP2040 provides better handling for more intensive tasks.
  • Power Consumption: SAMD21 is generally better for low-power applications.
  • Community and Resources: Arduino and its ecosystem offer vast resources for the SAMD21; however, the RP2040 is quickly growing, especially in educational sectors.
  • Once I decided to use the SAMD21, I began experimenting with the Arduino IDE. I chose the most complex task of all, making an LED blink!

    Photo
    Photo

    Photo
    SAMD21, LED
    Photo
    Arduino IDE Board Setup
    Photo
    RP 2040 Wowiki
    Photo
    LED Off
    Photo
    LED on!!!
    Photo
    HAPPINESS!

    Reflection 🤔

    I’m excited to work on electronics in the weeks to come. For my final project, I strive to create a wearable for young female athletes, so these projects will be crucial. A New York Times Article was published this week on the strengths and weaknesses of wearable tech.

    Today, many fitness trackers and GPS watches, including those from Garmin and Coros and the Apple Watch with the most recent software update, use algorithms to approximate training load and present that data alongside other stats like step count and heart rate. Because there’s no standardized way to calculate training load, and different trackers use different scales to express it, your stats from different trackers can vary significantly.

  • Garmin uses heart rate data to estimate “post-exercise oxygen consumption,” or EPOC. That measurement is meant to be a proxy for the question: “How big of an impact did that training session have on your body?” said Joe Heikes, a lead product manager at Garmin.


  • Coros bases intensity on heart rate or pace data — depending on the form of exercise — and rates the training load of a workout on a scale of low, medium and high.


  • Apple Watch ranks the difficulty of a workout on a scale of 1 to 10, using inputs like your height, weight, exercise history and heart rate. But users can manually change the difficulty rating if it doesn’t match how they felt during the activity.

  • For data die-hards and some athletes training for specific events, the more data the better. But there’s a lot that training load does not calculate, and one number can’t tell the full story of a workout. For my project, I am curious if we can evaluate workouts in a more holistic way, diving into how an athlete feels.

    Project Resources đź”—

    Wokwi Simulation

    Arduino Blink File

    SAMD21 Wiki

    SAMD21 Datasheet

    New York Times Article