Lab 08 — Project Build/Debugging

If you wanted hands-on with PCBs, this is your moment!

Lab 07 Schedule

Overview

This lab is a continuation of Lab 07.

After completing your final electrical test (all the THT components mounted) with a course staff, you can talk to a course staff member to get the FM radio’s firmware uploaded to the board.

You’ll also receive from the course staff:

  • 4xAA Battery Holder
  • 4 AA Batteries
  • 2 Speakers (depending on availability)

Final Hardware Setup

Cut an approximately 75 cm long wire and strip one about 1 cm of it at one end - this will be your FM antenna.

Attach your speaker(s) and wire antenna to the FM input of the terminal block (do so by pushing down on the orange button then inserting the wire, the terminal block will lock onto the wire when you let go of the button).

Additionally, you can fill your battery pack with 4xAA batteries.

Final setup

Remember, the radio can be powered by both the battery pack and via USB!

Firmware

The FM radio board can be programmed with Arduino over USB. The firmware script is necessary to get the radio and display functionality operating. The board might not be directly programmable with the Arduino IDE for the first-time (the ESP32 by default does not ship in the boot mode needed for Arduino programming over USB), so have a course staff help you get a script uploaded to the board for the first-time.

GitHub firmware repository

Functionality

With the firmware properly uploaded, the board should display the frequency it is tuned at, which is adjustable via the potentiometer. The volume can be adjusted using the + and - buttons. Finally, you can switch between the AM/FM modes by using the SP3T switch then pressing the RESET button.

Functionality is further detailed on the GitHub firmware repository.

Known Issues

Level Shifter

Unfortunately, due to a design error, there is a known issue that will prevent full functionality of the FM radio (staff design) board after you finish assembly. This particular issue concerns the display.

This known issue will only prevent the display from properly working. The FM radio and all other analog/digital functions are unaffected by this issue. You can still get the radio to work by uploading the firmware and not addressing this issue.

The 3.3 V to 5 V level shifter used to connect between the ESP32 and the shift registers is missing 5 V pull-up resistors on its output. Therefore, the display cannot be controlled in its default state after assembly and external pull-up resistors must be added.

In particular, these pull-up resistors need to be attached to the

  • SR_CLR,
  • SR_CLK,
  • SER_IN,
  • STR_CLK, and
  • STR_OE,

nets on the output of the level shifter.

Level shifter

These resistors can be 10 kOhm resistors attached between each net individually and the 5V net.

There are many ways of doing this, one could take through-hole resistors and attach one end to the output pins of the shift register and the other end to 5V. A much more compact way is to attach SMT chip resistors next to the 0-ohm jumper resistors that are on the output of the shift register. Then attach a wire to each pull-up resistor that leads to 5V.

Pullup resistors