Author Archives: Bobby Chan

Qwiic GPS Clock

via SparkFun: Commerce Blog

Ah, I remember it now - walking through the halls of the old SparkFun building and being amazed by all the cool projects. One project that caught my eyes was Nate's alphanumeric GPS wall clock.

Nate's Alphanumeric Clock

Serial GPS Clock

The alphanumeric GPS wall clock project inspired me to build my own one day. After working in technical support on a few cases related to GPS, I started getting familiar with GPS receivers and libraries. I gathered the parts and built a GPS clock of my own.

This required me to solder the parts together. I decided to use Mikal Hart's TinyGPSPlus library that did most of the heavy lifting to parse the serial data and wrote some code to display the current time as a challenge. It was big with wires sticking out, as expected from a prototype. I was quite satisfied with how it turned out and just left it mounted on a piece of cardboard.

Just like Nate, I had the same issue where we had to fall back and spring forward the time whenever daylight savings time hit. I had to adjust the code and re-upload back to the Arduino a few times. I decided to update the code by adding/subtracting an hour using a piece of jumper wire acting as a switch. It still works to this day!

Bobby's Old GPS Clock with UART Pins

Qwiic GPS Clock

Time flies and there have been advances in technology. With uBlox GPS modules and Qwiic-enabled devices, it's even quicker to build a GPS clock! For this version of the GPS clock, I managed to bring down the size of the clock using the Qwiic Micro with SAMD21 and Qwiic Micro OLED breakout. The Qwiic cables are more aesthetically pleasing to the eye compared to the dangling jumper wires connecting to a breadboard. What's great about the Qwiic Micro OLED is that it has the ability to draw characters and objects on the display. Thus, time can be displayed as a digital or analog clock.

Qwiic GPS Clock with Qwiic micro OLED and Qwiic Micro (SAMD21)

If you are looking to build a Qwiic-enabled GPS clock, check out the tutorial below! The tutorial uses the RedBoard Qwiic with ATmega328P for those that have an SparkFun Inventor's Kit v4.1 and were looking for another project. However, it was tested to work on the Qwiic Micro's SAMD21 should you decide to go smaller and want to try a different microcontroller as well.

The code can be adjusted for 12-hour/24-hour format depending on your personal preference. You'll need to tweak the code for daylight savings time depending on your region. If you decide to use a different output, you can grab the template to modify the code with your choice of display! At the time of this writing, I managed to squeezed in examples with the SerLCD and 7-segment serial LED display to display the date/time.

New!

Qwiic GPS Clock

September 14, 2020

What time is it? Time for you to... Qwiic-ly build a GPS clock and output it to a display! This project provides you with the current date and time using GPS satellites. Read the date and time as a digital or analog clock. Or even configure the clock for military, your time zone, or automatically adjust the time for daylight savings time!

Making It Better

So what are the next steps to the project? I'd probably want to mount the Qwiic GPS clock on a panel or inside an enclosure. Or maybe add a Qwiic button to easily switch between modes depending on the display. To prevent the OLED from screen burn-in, I'd probably turn off the micro OLED when not in use and wake it up using a distance sensor. Until next time!


comments | comment feed

Enginursday: Qwiic Digital Indoor Thermometer

via SparkFun: Commerce Blog

Is it cold in the room or is it just me? That's the question that came up a few times when I was working in the building. I thought to myself, what is the current temperature? I dug into my storage box of parts to quickly build a thermometer. After testing a few temperature sensors, I finally decided on using the TMP117.

Reading the output on the computer was great, but I usually have several windows and tabs open. Rather than have another window clutter my screen, I wanted to have the output on a separate display. There are several options available in the catalog. I decided to take advantage of the small Qwiic 1.0"x1.0" size and opted for the Qwiic micro OLED. Instead of using the RedBoard Qwiic, I decided to go small as well with the Qwiic Micro.

With some standoffs and Qwiic cables, I built up my Qwiic tower of sensing power! Coding was a breeze by looking at the examples for the TMP117, TMP102 and microOLED. One piece of code that I also added and thought was useful was a progress bar from SparkFun Inventor's Kit for Photon (thanks Jim!). I wanted the option to scroll through different views (degrees Celsius, Fahrenheit, or both temperatures at the same time) so that I knew when to expect the next view. However, if that's not your cup of tea, there is an option to just display one view depending on your personal preference.

Qwiic Stack

So if you are looking to measure the ambient temperature of the room with either the TMP117 or TMP102, check out the tutorial below!

New!

Qwiic Digital Indoor Thermometer

July 15, 2020

Qwiic-ly build a digital indoor thermometer to measure the ambient temperature of the room and display it using an OLED on an I2C bus!

Well that was some "Qwiic" fun. Onto the next project!

comments | comment feed

Wireless Remote Weather Station with micro:bit

via SparkFun: Commerce Blog

Did you install your micro:climate kit in a remote, hard-to-reach location and need to pull weather data easily from the comfort of your own home? Or, maybe you want to add a timestamp. With the radio blocks, a second micro:bit and the gator:RTC, you can obtain these readings wirelessly with ease.

Check out the tutorial to add additional functionality to your micro:climate kit!

New!

Wireless Remote Weather Station with micro:bit

May 11, 2020

Monitor the weather without being exposed to it through wireless communication between two micro:bits using the radio blocks! This is useful if your weather station is installed in a location that is difficult to retrieve data from the OpenLog. We will also explore a few different ways to send and receive data.

comments | comment feed

Raspberry Pi Safe Reboot and Shutdown Button

via SparkFun: Commerce Blog

Pulling the plug on your Raspberry Pi before it safely shuts down... is a bad idea! This can result in a corrupt microSD card and file system. Normally, we can use the menu bar from the GUI or type a command in the terminal window to safely shutdown the Pi.

If you are looking for a quicker solution (especially if you are using a headless setup), have no fear! You can safely turn your Raspberry Pi off using a general purpose button and a Python script! We use this ability with the Pi AVR Programmer HAT in production after programming and testing certain boards. For more information, check out the tutorial below!

New!

Raspberry Pi Safe Reboot and Shutdown Button

April 20, 2020

Safely reboot or shutdown your Raspberry Pi to avoid corrupting the microSD card using the built-in general purpose button on the Qwiic pHAT v2.0!

comments | comment feed

Enginursday: A Qwiic Comparison of Temperature Sensors

via SparkFun: Commerce Blog

It all started when I wanted to measure the ambient temperature of a room at SparkFun. But what is the best option? Well, it depends on what you are looking for in your project. Let's compare three temperature sensors from the SparkFun catalog!

Temperature Sensor - TMP36

Temperature Sensor - TMP36

SEN-10988
$1.50
16
SparkFun Digital Temperature Sensor Breakout - TMP102

SparkFun Digital Temperature Sensor Breakout - TMP102

SEN-13314
$5.95
4
SparkFun High Precision Temperature Sensor - TMP117 (Qwiic)

SparkFun High Precision Temperature Sensor - TMP117 (Qwiic)

SEN-15805
$13.95
1

My initial choice was to grab the TMP36 from my parts kit. It only required three connections and an analog pin. However, after viewing the output, I noticed a majority of the time that the temperature would jump 1°F to 2°F. At other times, the value would spike. Unsatisfied, I placed the project off to the side as this would require a bit more planning to average the values and add additional parts in order to throw out the errors.

TMP36 Output on the Arduino Serial Plotter

Click image for a closer view.

The project sat there on my desk for a bit until I noticed the TMP117 high precision digital temperature sensor in the catalog. I thought it would be a good opportunity to revive the project and see if I could obtain more stable readings using a different temperature sensor. I decided to compare the TMP36 against the TMP102 and TMP117. I wrote some code [1] to output the readings to the Arduino Serial Plotter.

Looking at the TMP102, it performed better than the TMP36 when measuring the ambient temperature of the room. The temperature readings remained stable and it was not as noisy. The temperature readings for the TMP117 performed better than the TMP102 and TMP36. The data points were more smooth and less prone to noise.

TMP117 vs TMP102 vs TMP36

Click image for a closer view.

Good, Better, Best?

So, you might ask, which of the three temperature sensors is the best? Well, that really depends on how you plan to use it. In my opinion, the Qwiic TMP117 is a winner. The sensors performed as expected when looking at the datasheet. The board did not require any soldering. There was no additional circuitry or code needed to average the temperature sensor readings. The power supply did not cause as much of a fluctuation with the digital temperature sensors like it did with the analog temperature sensor.

The TMP102 could work as well if I was not looking for such a precise temperature reading. While it is not as expensive as the TMP117, it does require some soldering for this version of the TMP102 board. The TMP36 is good but it would require a bit more effort to filter out the errors.


What is your favorite temperature sensor to work with in your projects? Until next time - I'm off to build my digital indoor thermometer!

comments | comment feed

Enginursday: Non-Addressable RGB LEDs

via SparkFun: Commerce Blog

I recently wrote a tutorial on how to connect and control non-addressable RGB LED strips. Non-addressable (a.k.a. analog) LED strips can only have one color turned on at a time over the entire strip. However, they are lower cost and are easier to use compared to their digital counterparts. Since these can be powered at 12V, daisy chained strips do not require power to be injected as often as the 5V.

Non-addressable LED Strip Powered

While you could just apply straight power to the non-addressable LED strips, you are limited to seven colors. You would also would need to adjust the connection every time you need to change the color. Using a microcontroller with PWM pins and a few power transistors enables you to be more flexible with your color options, adjust the brightness and include basic animations.

For more information, check out the tutorial linked below.

New!

Non-Addressable RGB LED Strip Hookup Guide

February 19, 2020

Add color to your projects with non-addressable LED strips! These are perfect if you want to control and power the entire strip with one color for your props, car, fish tank, room, wall, or perhaps under cabinet lighting in your home.

Happy blinking! ^_^

comments | comment feed