Get started with IoT: How to build a DIY Blynk Board

The SparkFun Blynk Board is based on the ESP8266 and comes with 10+ preloaded projects.
395 readers like this.
Internet-enable your microcontroller projects for under $6 with ESP8266

 

Billie Grace Ward on Flickr. CC BY 2.0

This tutorial is for those with some DIY hardware experience, though advanced beginners may find it a fun challenge. Also, experienced users might find it fun to set this up for beginners to learn from. To make this board without the SparkFun IoT Starter Kit with Blynk Board, you'll need sensors and other components to complete the built-in projects. For instance, the SparkFun Blynk Board comes with onboard WS2812 RGB LED, so you'll need a similar module to make projects using the device. You can purchase the components individually from Sparkfun

I organize workshops in my local community to introduce people to open source hardware platforms such as Arduino and Raspberry Pi. With all the buzz around the Internet of Things these days, everyone wants to start tinkering and prototyping. The enthusiasts are usually designers, web developers, or students, and most want to get going with little coding.

ESP8266-based Blynk Boards come with preloaded projects and are ideal for introducing Internet of Things and basic electronics concepts.

About the hardware

The ESP8266 is a great chip with built-in WiFi. It was originally used with Arduino boards to WiFi-enable hardware projects but soon became a cheap standalone Arduino-compatible development board. It comes in many shapes and forms and is most famous in development boards such as NodeMcu, Adafruit HUZZAH, or the SparkFun ESP8266 Thing.

David Egts wrote this terrific article about the ESP8266.

ESP8266 chip

While the ESP8266 is great open source hardware for getting started with the Internet of Things, Blynk is an ideal platform to control Arduino, Raspberry Pi, and the like over the Internet. Essentially, Blynk includes three components: a Blynk app for the smartphone, the Blynk server, and Blynk library (firmware), which is compatible with a variety of makers’ hardware.

Both the Blynk server and Blynk library are open source, while the Blynk app is available free for iOS and Android. The Blynk app allows you to build a graphic interface for your IoT project by simply dragging and dropping widgets. Blynk includes widgets such as LCD display, Joystick, and Buttons so you can start hacking away with just an IoT development board.

Blynk server

Blynk partnered with SparkFun to create the SparkFun Blynk Board based on the ESP8266. It comes fully programmed and includes more than ten pre-loaded Blynk projects. The SparkFun IoT Starter Kit with Blynk Board is a solid introduction to the world of Internet of Things (IoT) technology with no difficult programming.

Sparkfun board

If you're like me and have several ESP8266-based development boards lying around, you can use the firmware and turn them into DIY Blynk Boards. This would be ideal for running boot camps or workshops using existing boards. You'll still need sensors and other components to be able to complete the built-in projects. For instance, the SparkFun Blynk Board comes with onboard WS2812 RGB LED, so you'll need a similar module to make projects using the device.

Making a DIY Blynk Board

Gather the gear

  • An ESP8266-based development board such as NodeMCU, Wemos D1, Sparkfun ESP8266 Thing, etc.
  • Computer with Arduino IDE and proper drivers for development board
    You should already be able to flash an Arduino sketch onto the development board.
  • USB cable to connect board to a computer
  • WiFi network
  • Smartphone
  • An LED for testing
  • Blynk app: iOS and Android
    Before going any further, download the app to your smart device.

Install the required libraries

  1. Open the Arduino IDE
  2. Go to Sketch --> Include Library --> Manage Libraries

    Manage libraries
  3. Search for “blynk”, then install:

    install libraries
  4. Install the following additional libraries, using the latest version available:

    SparkFun HTU21D:

    Sparkfun HTU21d

    Adafruit NeoPixel:

    Adafruit Neopixel

    SparkFun TSL2561:

    TSL2561 Luminosity

Flashing the ESP8266 board with Blynk Board firmware

  1. Download the Blynk Board firmware.

    Extract the content of the zip file:

    Blynk Board firmware
  2. Open any of the .ino files, which will open the Arduino IDE with several tabs:

    Arduino IDE .ino files
  3. Scroll down on the BlynkBoard_Core_Firmware tab and uncomment the line:

    //#define DEBUG_ENABLED

    Comment the line:

    #define SELF_TEST_ENABLED

    Self test enabled before editing

    Debug enabled after editing
  4. Select the appropriate board (I’m using NodeMCU):

    Select the board
  5. Verify the sketch. The build should be successful.
  6. Connect your board to the computer via USB cable and upload the sketch.

The board is now flashed with BlynkBoard firmware.

Provisioning your DIY Blynk Board

In the provisioning process, we'll use a smartphone, laptop, or computer to connect directly (over WiFi) to the Blynk Board. Once connected, your smart device will send the necessary data and tell the Blynk Board to connect to your Internet-connected wireless network and Blynk.

The Blynk Board is initially configured to operate as a WiFi access point (abbreviated "AP," kind of like a router). A smartphone or WiFi-enabled computer can briefly connect to the Blynk Board, and using either the Blynk app or a browser, send all of the necessary information over to it. After the Blynk Board receives that info, it'll transition from AP to WiFi device and connect to your WiFi network. The AP has SSID in the format BlynkMe-XXXX:

Blynkme-RRYR

Note: The SparkFun Blynk Board has a built-in RGB LED. When powered on, it blinks with a unique sequence (randomly allocated) of four colors, including either red, green, blue, purple, or yellow, with a long stop in between. If you have a WS2812 RGB LED, you can connect it to Pin 4. In my case, the LED would blink red, red, yellow, and then red.

Follow one of the alternative provisioning methods in Sparkfun's Getting Started with the SparkFun Blynk Board tutorial.

Alternative provisioning Blynk board

Testing the board

(Source: SparkFun tutorials)

Blynk setup

1. Make sure your project is not running – the upper-right icon should be a triangular play button.

2. Touch anywhere in the blank gray project space. A toolbox should open up on the right side with all of your widgets to choose from.

3. Select the Button widget by tapping it. You'll find it at the top of the "Controllers" list.

4. Tap and hold the button widget to drag it anywhere within the project space. You've got a lot of room to work with right now.

 

5. Touch the Button Widget to bring up the settings page, and modify these values:
a. Name: "LED" – While the widget is a button, we'll be using it to control an LED.
b. Output: 5 – in the "Digital" list.
c. Color: Click the red circle to change the color of the button. Try blue, since we're toggling a blue LED.
d. Mode: Use “Switch” mode.

 

6. Confirm the settings:
If you're using an Android, hit the back arrow in the upper-left corner
If you're using an iOS device, hit the OK button.

Adding an offboard LED

Wire the LED as shown in the diagram below. The LED’s positive pin (the longer leg) should be connected to GPIO Pin number 5. Accordingly, on the NodeMCU GPIO 5 is Pin D1. Identify the correct pin for your board by referring to its pinout reference. The other LED pin should be connected to a ground pin (“GND”).

Wiring an offboard LED

Blynk run

Now that the button is all configured in the Blynk app and the LED is properly wired to the board, run the project by tapping the Play button in the upper-right corner of the screen in Blynk app.

Once the project is running, tap the Button widget. When the widget is set to ON, the LED should also turn on.

Final DIY Blynk boafd

Congrats! You have successfully made a DIY Blynk Board. You can now follow the above steps for any other ESP8266-based boards you have, and gear up for introducing IoT to enthusiasts in your community.

Tags
Avatar
Linux Foundation Certified System Administrator | Medical Graduate | Lifelong Learner | Developer | Maker | Volunteer

8 Comments

Thanks for a great article. You have provided a great deal of resources and reading material for me.

Thank you for reading. Stay tuned for upcoming articles on how to have fun with some of the built-in projects!

Thank you for the links in the article. I had not heard of SparkFun before and now I have some new projects that I can do with my kids.

thanks

You are welcome... feel free to share photos of your DIY blynk board if you made one or some...

In reply to by dunka (not verified)

Great article. I'm planning to do next week :)..

Hello, how did it turn out? Any feedback would be helpful as I am preparing a write-up for how to use the built-in projects... Thanks

In reply to by Kumar B

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.