Contact sales

How to build a smart hard hat with Particle

Learn how to build a smart hard hat with Particle Boron, sensors, and Zapier for proactive safety alerts

Chris DeLaurentis article author avatarChris DeLaurentisJanuary 24, 2025
How to build a smart hard hat with Particle

The problem:

Hard hats are an essential part of any construction or hazard work site. However, hard hats have barely evolved beyond pure impact protection. In addition to being cumbersome, hard hats also tend to be hot and the risk of heatstroke on a job site is ever present.

The solution:

A smarter hard hat is needed to bring safety on the jobsite up to date. Instead of just preventing injury, a hard hat can proactively warn about hazardous situations, such as gas leaks or heat stroke, as well as raise alarms when an event, such as a helmet impact, has occurred. 

The background

Continuing from my prior post about an industry near and dear to my heart, construction, I’d like to demonstrate another use for a versatile, network-cable MCU like the Particle Boron. In this case, I’d like to talk about… The Hard Hat. When thinking of construction one of the first images to come to mind is the iconic hard hat. This protective device has not long been in use, however, and has seen little innovation in recent years other than stronger, more durable materials. 

The construction industry, already fraught with hazards intrinsic to the trade itself, also is plagued by another danger; Heatstroke and heat-related injury. According to the CDC ”between 1992 and 2016, 285 construction workers died from heat-related causes, more than a third of all U.S. occupational deaths from heat exposure”. In fact, the CDC goes on to state that “a study of heat-related injuries among outdoor construction workers in the state of Washington found a 0.5% increase in the chances of experiencing traumatic injuries per 1 °C increase in maximum daily humidex (a measure of how hot it feels that combines temperature and humidity)”

Wouldn’t it be great if we could proactively get ahead of heat-related injuries and warn both the worker and construction site overseers of danger in real-time? And why stop at heat? What if we could proactively detect other threats like noxious gasses? In this post, I present to you, the Smart Hat

Project plan

My approach to this project was to start with the helmet and back into what I could reasonably build into such a small space without becoming a nuisance to the wearer. This means I have to trial and error my way to a design instead of designing ahead of time. For the sake of time, I’m just going to focus on temperature sensing but other sensors could easily be added to the design and take advantage of the Boron’s ample GPIOs.

Compute:

The Particle Boron is the perfect choice for this project due to its compact size and cellular networking capabilities.

Power:

For powering the unit we’ll be using a reasonably sized 2000mAH LiPo. This battery will sit nicely under the mount I’m creating in the hard hat. 

Event Delivery:

For this project, I’m going to only focus on sending 2 events. One for when there’s a sudden spike in temperature and one for when the temperature exceeds a specific threshold.

Data Visualization:

I’m not going to do any visualization with this project but instead, send a real-time alert via email out when the aforementioned temperature events occur.

Bill of materials

Skills & tools

For this project you’ll need

  • A Particle account and a basic understanding of the particle pub/sub capability
  • Some light soldering to perf board the components compactly inside the hard hat
  • Access to a 3D printer to print the mount
  • Particle-flavored, Arduino-style, C++ development experience

Assembly:

The assembly for this project is relatively simple. The above fritzing displays the set on a breadboard. I then soldered headers to a perfboard for mounting. 

Mount:

In order to fix the MCU inside the helmet I created a custom mount for the perf board in which the MCU is seated. You can grab the STL here

 

Using some small screws I mounted the perf board to the 3D print

Then slide the full assembly into the arch of the helmet with the fins of the 3D print sliding nicely into the helmet’s top vents.

 

For the RGB LED I simply attached the perf board with the LED to the edge of the hard hat rim so that it was not obstructing the wearer’s vision but the flashing light would alert in their peripheral vision. 

Software & platform setup:

For the human temp sensor I found this great library on github to help with communicating w/ the sensor over I2C. This made the code exceptionally simple. 

The code:

The code for this can be found here.

For debugging and utility I added a couple of Particle functions and variables that can be used from the console. The functions are “cycleColors” to run through all the colors the RGB LED can create and “setColor” to test setting an individual color.

The variables I created are:

  • READ_INTERVAL_MS: to set the interval at which to take a temperature reading. 
  • OVERHEAT_THRESHOLD: to set the threshold at which we trigger an overheating event. This is in Celcius
  • SPIKE_THRESHOLD: to set how great a change in temperature is to trigger a spike event. This is in Celcius
  • TEMPERATURE: to read the current temperature in Celsius
  • CURRENT_COLOR: to represent the current color of the RGB LED

Product setup:

In order to tie this all together we need to add our device to a Particle Product so I created my “Proactive Hardhat System” product.

Then I added my Boron to the product.

Logic function:

In order to massage the events coming off the Boron I created a Logic Function to pick up on the 2 events “proactive_hardhat_overheat” and “proactive_hardhat_spike” that were emitted by the Boron. I then massage the incoming data and republish these events as “proactive_hardhat_alert”. This new event will be picked up by my Zapier integration next. 

Zapier integration:

I then added a Zapier webhook integration to receive the “proactive_hardhat_alert” and send it off to Zapier. 

On the Zapier side I created the receiving webhook and chained it to an outbound email sending step.

I took the payload details that my “proactive_hardhat_alert” sent across in the webhook and put them into the email template body for sending. 

Triggering a rapid change in temperature on the hard hat kicks off an email like so:

Summary:

So that’s it! It was exceptionally easy to wire up a human temperature sensor inside a hard hat with the Particle Boron and then trigger events that can notify someone of a health and safety problem. This is obviously a very simple example of what can be done but with very little code, the Particle Platform, and the power of friendship, you can see how easy it is to create an IoT device that can have real-world applicability. 

Comments are not currently available for this post.