Projects - Edwin R. Lopez Portfolio

Embedded Systems Design

During the first years of my career I have focused mostly in software development projects, keeping my hardware skills in the back burner. However, as the world turns and the industry shifts from personal computers to mobile devices, edge computing and Internet-of-Things (IoT); Embedded Systems Design is rapidly moving into the front seat of my career path.

In recent years I have been focusing in strengthening my hardware skills to match my software skills. This has been a collective effort of returning to school, attending professional seminars, grinding through white papers in PCB design and Signal Integrity, and leave-taking a sabbatical to do research in embedded systems. This has given me ample time to get hands-on experience in the design and prototyping of real hardware projects while also learning about new and cutting-edge technologies trending in today's industry.

Below are some of the projects I completed during my research sabbatical; a mixed display of skills that include Embedded Hardware Design, Firmware Development, and both Machine-to-Machine (M2M) and Human-Machine-Interface (HMI) designs.
An IoT Gateway for the Smart Home
IoT Gateway for the Smart Home - Edwin R. Lopez Portfolio Project Gallery:
Watch Demo:
This is a Cortext-M7 based single board computer (SBC) with a handful of features that makes it suitable for home and industrial Internet-of-Things (IoT) applications.

The board is equipped with a fast 300MHz ARM Cortex-M7 MCU (ATSAMS70), 64MB of SDRAM, 2GBit of NAND, a 240x320 TFT color display with capacitive touch, a hi-fi audio codec, an IEEE 802.15.4 wireless transceiver, a Bluetooth Smart module (BLE 4.0), a Cellular module, a micro-SD Card slot, a USB device high speed connector, and a built-in charger for a LiPo battery backup.

This system is meant to work as a gateway between Bluetooth 4.0 enabled phones & tablets and a plethora of low power wireless mesh networking devices spread across a home. The cellular feature allows a user to "call home" and use system's voice prompts along with the phone's touchtone DTMF keys to remotely monitor or control devices in the home. In addition, the user can receive text messages (SMS) when the sensors in the home detect something unusual. Since this device uses cellular communication, it can be deployed in a remote location where Internet services or Wi-Fi hot spots are not available, e.g. your cabin on the mountains. The board's audio output can be connected to a centralized home speaker system for listening to MP3 music stored in the micro SD card or listening to voice alerts triggered by important events, such as a window getting opened in the middle of the night.

A Smart Home Sensor for the IoT
Smart Sensor - Edwin R. Lopez Portfolio Project Gallery:
Watch Demo:
This is the Smart Sensor, a wireless board powered by a coin cell battery used to monitor state changes of wired switching sensors such as magnetic switches used in doors and windows, infrared motion detectors (PIR), or passive mechanical limit switches or buttons. This board is very small and is easy to place virtually anywhere in a home or industrial building.

The board is built around an ultra-low power ARM Cortex-M0+ SoC (ATSAMR21) with a built-in IEEE 802.15.4 wireless transceiver, has four channel inputs for monitoring sensors, and a CR2032 battery slot.

When inactive, the firmware keeps the chip in sleep state, drawing as little as 15uA of current. When a state change is detected in any of the input channels, the chip wakes up, broadcast the event information to other peers in the mesh wireless network and quickly returns to sleep. This broadcast operation is short and quick; only requiring up to 10mA of current to complete. This sleep/wake approach saves power and extends the coin cell battery life well over a year.

An Outlet for the Smart Home
Smart Outlet for the Smart Home - Edwin R. Lopez Portfolio Project Gallery:
Watch Demo:
This is the Smart Outlet, a wireless-controlled relay board used to switch 120VAC home appliances ON and OFF. This board sized to fit inside a standard two-outlet enclosure.

The board is built around an ultra-low power ARM Cortex-M0+ SoC (ATSAMR21) with a built-in IEEE 802.15.4 wireless transceiver, has a built-in AC/DC power converter (RAC02-05SC) for powering the small electronic components, and two 10A latching relays for controlling the large AC loads.

The latching relays allows this board to be energy efficient as the relay coils do not need to be constantly energized while in their ON-state; in addition, the latching feature preserves the relays ON/OFF state after power resumes following a power outage.

A KeyFOB Remote Control for
Smart Devices
KeyFOB for Smart Devices - Edwin R. Lopez Portfolio Project Gallery:
This is the KeyFOB, a general purpose wireless remote control board no much bigger than your grocery store club key tag.

The board is built around an ultra-low power ARM Cortex-M0+ SoC (ATSAMR21) with a built-in IEEE 802.15.4 wireless transceiver, has six general-purpose, and it is powered by a small coin cell battery.

When inactive, the KeyFOB is in sleep state, draining as little as 15uA of current from the battery. When a button is pressed, the chip wakes up, sends the appropriate wireless command to a target device, and quickly returns to sleep. This sleep/wake approach saves power and extends the coin cell battery life well over a year.

The KeyFOB can be programmed to control devices in a wireless mesh network – from turning relay switches ON and OFF to unlocking doors to controlling volume and playback functions in a music player.

USB Dongle for Smart Devices
USB Dongle for Smart Devices - Edwin R. Lopez Portfolio Project Gallery:
This is the USB Dongle, a USB device that allows a desktop PC or server to join a low power wireless mesh network.

The board is built around an ARM Cortex-M0+ SoC (ATSAMR21) which contains both a built-in IEEE 802.15.4 wireless transceiver and a full speed USB port. This board draws power from the USB bus consuming as little as 14mA when actively transmitting.

The USB Dongle works as a full-duplex communications way between a PC and mesh network devices. Applications for the USB Dongle ranges from implementing standard HID mouse and keyboards devices to wireless devices that can remotely launch and execute a custom script (e.g. python, node.js, bash, etc.) for performing an elaborated and complex task in a server.

A Ring-Controlled MP3 Player
A RF-Ring Controlled MP3 Player - Edwin R. Lopez Portfolio Project Gallery:
Watch Demo:
If you are like me, when I listen to music, I tend to press NEXT a lot, looking for a song that I might like, skipping over the songs I'm bored of. This task becomes a daunting when you are exercising, (e.g. running, mountain biking, or on the rowing machine at the gym). It is a pain in the butt having to stop your workout activity to pull out your phone or music player to change a song.

Wouldn't be nice to have a remote control the size of a ring you can wear in your index finger, easily accessible by your thumb, allowing you to surf you music playlist without having to reach out for any device elsewhere? Imagine… changing a song while mountain biking down a rocky trail without letting go of the bike handle bars, changing the volume of your music without losing you rowing stride rhythm, running up and down in your stairs workout without a Bluetooth phone bouncing in your pockets… nice isn't it? That is what this project solves!

This project is made out of two boards: The first board is a MP3 player based on a Cortex-M4 MCU (ATSAM4S), along with a micro SD Card slot, a Hi-Fi headphone audio codec, an IEEE 802.15.4 wireless transceiver, and a rechargeable LiPo battery; this compact board is "Velcro'ed up" to the headphones' head band (yes, in a very prototypal fashion) for on-the-go operation. When the board is connected to a PC via the USB connector, it appears in the computer as a removable drive where MP3 music can be easily copied to.

The second board is built around an ARM Cortex-M0+ SoC (ATSAMR21) with a built-in IEEE 802.15.4 wireless transceiver. This board is very tiny, and includes a surface mount five-button thumb-joystick (SMD) and a small button cell battery for power. The board is wrapped around the user's index finger using a soft Velcro band (again, in a very prototypal fashion) forming a "ring-like" ubiquitous device. For all intents and purposes, the joystick in "the ring" allows the user to issue wireless commands to the player attached on the headphones head band to perform the NEXT, PREVIOUS, VOL-, VOL+, and PLAY/PAUSE operations.

Edwinux: A Linux Single Board Computer (SBC)
Linux Single Board computer (SBC) - Edwin R. Lopez Portfolio Project Gallery:
In the past, I have worked in projects involving off-the-shelf embedded Linux development boards; however, I always wanted to experience building my own Linux board from the ground up - the Edwinux, a Linux Single Board Computer (SBC).

The Edwinux is a 400MHz ARM926EJ SoC (SAM9G25) based board which include a 32MB SDRAM, a 2GBit NAND (for the OS root file system), a serial-flash EEPROM (for storing the MPU bootloaders), a 10/100 Ethernet interface, one USB-host port and one USB-device port, a micro-SD card slot (for additional storage), custom user LEDs and buttons, and an array of GPIOs for interfacing external components such as displays, CMOS image sensors, and/or parts using UARTs, I2C, SPI, I2S, PWM, DAC, or ADC.

The intentions of the Edwinux were purely scholastic – to gain experience in designing the hardware (encompassing topics ranging from signal integrity to IBIS files to boundary scans) as well as getting familiarized with bringing Linux up and running on a custom board. My studies included:
  • Setting up a cross-compile GNU toolchain, Makefiles, and automating builds.
  • Installing 1st and 2nd-level bootloaders on non-volatile memory.
  • Setting up TFTP and NFS servers to boot Linux over the network, which greatly reduce the development and debugging effort of the initial Board Support Package (BSP).
  • Configuring the u-Boot environment and passing parameters in the kernel's command line.
  • Patching device tree files to configure the SoC's pinmux to work with on-board devices.
  • Building the Linux kernel, the Linux image, and the device tree blob files
  • Using tools such as Yocto/bitbake recipes or Buildroot to create the root file system and add software packages such as ssh, busybox, httpd, hostapd, python, nodejs, java, etc.
  • And finally when it all works, formatting the NAND with UBIFS and deploying the root file system on-board so Linux can boot and run locally in a standalone system.

The experience I gained in this project was invaluable and though this board is simply a general-purpose one, I now have a working blueprint for making new embedded Linux machines that can meet more specific requirements.

A Cortex-M4 Development Kit  
Cortex-M4 Development Kit Project Gallery:
This is a general-purpose Single Board Computer (SBC) based on a 120MHz ARM Cortex-M4 SoC (ATSAM4S) which include a 512KB SRAM, a 2GBit NAND (for using with YAFFS2-direct or a proprietary NFTL), an USB device port, a micro-SD card slot (for removable storage), a custom user LED and button, and an array of GPIOs for supporting hardware extensions.

As part of this project I also created a Board Support Package (BSP) that implements numerous libc system calls (a.k.a. syscalls), making programming for this board not much different than programming for a Linux desktop; you can use functions like printf, fopen, fclose, fread, fwrite, ftell, fseek, mkdir, opendir, readdir, link, unlink, stat, and gettimeofday as if you were programming on a PC. The BSP takes care of routing file IO requests to appropriate underlying subsystems: e.g. YAFFS2 (used for NAND storage) or FATFS (used for SD cards and serial flash NOR memories). This decouples the application business logic from the intrinsic details of each memory storage type, making the application code more portable.

In addition to system calls, I also ported libraries like libjpeg, libz, libpng, libMAD (used for MP3 decoding) to this board; and rolled out my own libraries for drawing primitive graphics, sprites, and anti-aliased fonts in memory-based frame buffers that can easily be DMA'd onto an attached serial or memory-mapped display.

This board is a great development and debugging tool when it comes to understanding and writing drivers for new components I haven't use before. The GPIOs make it easy to connect and prototype with parts that use an 8080/6800 parallel bus, UART, I2C, SPI, I2S, PWM, DAC, and ADC interfaces.

A Cortex-M7 Development Kit
Cortex-M7 Development Kit - Edwin R. Lopez Portfolio Project Gallery:
This is a general-purpose Single Board Computer (SBC) based on a 300MHz ARM Cortex-M7 SoC (ATSAMS70) which include a generous 64MB SDRAM, a 2GBit NAND, a high-speed USB device port, a micro-SD card slot, a 45-pin connector that supports a parallel TFT display with capacitive touch (PDA TM2800), has four user LEDs, one 20-pin GPIO connector (for supporting hardware extensions), and a DC power barrel connector.

Just like the Cortex-M4 Development Kit, this board has also a Board Support Package (BSP) that implements libc system calls as well as library ports for YAFFS2, FATFS, libjpeg, libz, libpng, libMAD and my proprietary libraries for drawing primitive graphics, sprites, and fonts.

All of the 20 GPIO pins in the extension connector are also wired through surface mount test point hooks. These hooks facilitates attaching logic- and protocol-analyzer probes to the board for tracing and debugging UART, I2C, SPI, I2S, PWM, DAC, and ADC communications signals between the MCU and a test device connected on the 20-pin GPIO connector.

This board is intended to serve as a development sandbox for quickly learning and using an unfamiliar device from a Cortex-M MCU.

Meet the Edwin3Player              
AVR32 MP3 Player - Edwin R. Lopez Portfolio Project Gallery:
The edwin3player is a very basic MP3 player board based on a 66MHz AVR32 SoC (AT32UC3A0512). It consists of a stereo headphone amplifier (TPA6130A2), a micro-SD card slot (for storing the MP3 music files), one 128x32 monochrome graphic LCD (to show the current song title), four status LEDs, and five navigation buttons. The board is powered either by a USB cable or a LiPo battery with a JST connector.

This board does not use an I2S audio codec; instead it uses the two 16-bit Hi-Fi DACs built into the AT32UC3 SoC. All is needed to drive a pair of headphones is passing the output signals from the DACs through the amplifier and out to the headphones jack. The firmware simply reads MP3 files from the micro-SD card (via SPI) using FATFS, decodes the MP3 stream into PCM chunks using libMAD, and flushes the decoded PCM chunks out the DACs using DMAs. The graphic display shows the current song title, and the navigation buttons let the user perform the PREVIOUS, NEXT, VOL+, VOL-, and PLAY/PAUSE operations. The amplifier volume is controlled via I2C from the MCU.

The edwin3player was my final project for the Embedded System Design course (ECEN5613), part of the Embedded Systems Engineering Professional Certificate at the University of Colorado at Boulder. ECEN5613 is offered by professor Linden McClure. This course was by far my favorite in the certificate program for the hands-on approach to the lectures and lab projects and the passion and attention to detail professor McClure puts into teaching it –a remarkable job. If you live in the Boulder area and want to re-acquaint yourself with your hardware design skills, I highly recommend this class. You don't need to enroll in the Masters EE program to take the class, busy working professionals can enroll as "continuing education" non-degree students. Check the CU Embedded Systems Certificate Program page for more information.

Home | Embedded Design | Application Development | Graphic Design | Live Demos | Resume | Contact     /     Raster API
© 2018 Edwin R. Lopez