days
-4
-4
hours
-1
-7
minutes
0
-2
seconds
-4
0
search
Tips and tricks for IoT success

3 tips for developers learning to build IoT hardware systems

Craig Oda
IoT
© Shutterstock / Paolo De Gasperis

The divide between software and hardware is a well known one. But it’s not as hard to bridge the gap between the two in IoT. In this article, Craig Oda explains three things developers should do when they want to start learning how to build IoT hardware.

In two years of organizing IoT workshops and IoT meetups, I’ve spoken to thousands of developers with hardware or software backgrounds. It’s rare to meet people with both skill sets. Combining hardware and software development is a hot area right now and it’s surprisingly easy to build IoT hardware prototypes with professional tools.

If you’re a software developer and want to learn more about IoT hardware development, here are three tips.

1. Use an existing IoT cloud

Your hardware will need to connect to the cloud for you to test it. Don’t waste time building your own cloud infrastructure.  Amazon, Google, Microsoft, and IBM all provide extensive cloud-based services for IoT data and device management. Instead of building your own system, review the following services:

As the bigger cloud services can be difficult to get started with, I suggest two smaller services with an easy learning curve.

All of the cloud services above use IoT standards for data transmission, so it’s possible to move your hardware device between clouds. Bug Labs is the easiest service to use. You can send IoT sensor data to their cloud in minutes. My personal favorite is Medium One as it offers an easy way to connect as well as a good online IDE to build custom Python workflows to process the IoT data.  Setting up Bug Labs or Medium One will take less than 30 minutes. In my experience, the average attendee takes 15 minutes to connect their IoT board to these services.

All of the services provide a dashboard to see the data from your IoT board. In the example below, my IoT board has onboard sensors for humidity, sound, air pressure, and temperature.

IoT

Medium One and Bug Labs are free to use for development. No credit card necessary.

SEE MORE: “Project Things” aspires to change the future of IoT

2. Use a professional IoT dev kit

Although many people start with a Raspberry Pi or an Arduino, this approach is usually only good for a small prototype. A large-scale commercial IoT system has tens of thousands or hundreds of thousands of devices. To get the hardware size, sensors, connectivity, and power usage matched to the IoT system, developers will need to develop a custom IoT hardware device, starting with the microcontroller or MCU.

Initially, this sounds daunting to a software developer with no background in electronic engineering. If they look at electronics parts distributors like Arrow, Avnet, or Digi-Key, they’ll see thousands of MCU developer kits. The number of choices is overwhelming and drives many people to go back to the comfortable Raspberry Pi or Arduino.

A good choice is to use a $35 dev board from Renesas, a large global electronics company. Renesas is the world’s largest maker of microcontrollers. Renesas was formed by a joint venture with NEC, Hitachi, and Mitsubishi Electric. It recently acquired Intersil for $3.2 billion. Renesas is offering a 50% off coupon on their IoT Fast Prototyping Kit.

The Renesas board connects to all of the cloud systems mentioned above and includes free access to a full IDE called e2 Studio, which is based on Eclipse CDT. The design files are also open source.

Here’s a picture of my board.IoT

In the project below, I’m using the onboard temperature sensor to send data to the cloud. The cloud analyzes temperature variation and then sends a signal back to the board to turn on a fan.

IoT

The above example was set up by using simple Python scripts in the cloud.

There are IoT dev kits from many other companies, including Samsung ARTIK and Particle.  Look for a full development and cloud environment that meets your needs.

SEE MORE: Spectre and Meltdown make anything with chip in it vulnerable, but Raspberry Pi is safe

3. Build your own IoT Blinky

In the software world, the introductory program is often, “Hello, World.” In hardware development, the equivalent is “Blinky.” This is the easiest way to show output from your program.

IoT

Although the boards come with on-board LEDs, the people that make the most progress are building their own circuits. You can buy basic parts kits for between $5 and $20. I purchased the kit below for $15 from SparkFun. You’ll also need a breadboard and some wires.

IoT

An “IoT Blinky” extends a standard blinky by processing the on/off signals in the cloud. I’m including the full code for a simple Python script that runs in the cloud. The code references a few Python modules, including MQTT, a messaging protocol commonly used with IoT devices. MQTT runs on top of TCP/IP. Most IoT devices use the public Internet for data transmission. The board I’m using can connect to a network with WiFi, Ethernet, Bluetooth LE, cellular and other adapters.

The board I’m using can connect to a network with WiFi, Ethernet, Bluetooth LE, cellular and other adapters.

SEE MORE: IoT trends for 2018: Digital Twins, Eclipse IoT integration and more

You can see from the code that “Blinky” is actually controlled by sending an electrical signal to pins 4 and 1 on a standard peripheral connector called a “Grove” connector.

'''
Renesas Data Intelligence GPIO
'''

def turnOff():
    MQTT.publish_event_to_client('s5d9', 'G4:11:0;G1:1:0') # sets pin 4_11 low and pin 1_01 low 
    log("LED turned off")
    return 0

def turnOn():
    MQTT.publish_event_to_client('s5d9', 'G4:11:1;G1:1:1') # sets pin 4_11 high and pin 1_01 high
    log("Grove connector on")
    return 1
    
import MQTT
import time

ledState = 0

#Toggle 
if IONode.is_trigger('in1'):
    toggle = IONode.get_input('in1')['event_data']['value']
    if toggle == 1:
        ledState = turnOn()
    elif toggle == 0:
        ledState = turnOff()

#Blink
elif IONode.is_trigger('in2'):
    blinkNum = IONode.get_input('in2')['event_data']['value']
    # modify code to blink external LED
    for blink in range(0, blinkNum * 2):
        if ledState:
            turnOn()
            ledState = 0
        else:
            turnOff()
            ledState = 1
        time.sleep(.7)
        log("it blinked")
    log("LED blinked " + str(blinkNum) + " times") 

I put the Python code above to show how easy it is to control basic hardware functions from the cloud by toggling the electrical current on individual wires. Software developers are already using Python and JavaScript to parse the IoT sensor data and process it. Controlling electrical signals should be easy for them.

SEE MORE: DevOps for IoT: Getting ready for the next phase

Summary

A full IoT system can be intimidating due to the need for expertise in both hardware and software. Even if you’re only going to build the software infrastructure in your IoT project, you’ll be able to play a more valuable and strategic role if you can work with the hardware group. The best way to start learning is to dive straight in and start building an IoT hardware project. There are many free workshops and meetups available, including the group that I’m involved with in Silicon Valley, Learn IoT Community. The group is free and also gives out free equipment at the meetups.

If you have any questions about learning IoT hardware for software developers, please put a comment below.

 

Author

Craig Oda

Craig Oda is a partner at Oppkey, a consulting firm in Silicon Valley for IoT, VR, and cloud developer communities and workshops. He is the first elected president and co-founder of Tokyo Linux Users Group. Craig is also the co-author of “Linux Japanese Environment” book published by O’Reilly Japan. He was part of the core team that established the first ISP in Asia. Craig is also the former VP of product management and product marketing for major Linux company.


Leave a Reply

1 Comment on "3 tips for developers learning to build IoT hardware systems"

avatar
400
  Subscribe  
Notify of
Fazilat of Subhanallah Alhamdulillah La Ilaha Illa
Guest

I really like your post because it will be useful for readers so thanks for writing a such useful information