element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Hats Off Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Hats Off Design Challenge
  • More
  • Cancel
Hats Off Design Challenge
Blog Spy Hat progress 1
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bowdends
  • Date Created: 30 Oct 2014 6:01 PM Date Created
  • Views 967 views
  • Likes 0 likes
  • Comments 5 comments
  • hats_off
  • adafruit_gemma
  • spy_hat
Related
Recommended

Spy Hat progress 1

bowdends
bowdends
30 Oct 2014

This hat was actually pretty simple to make.  It only had 4 electronic parts: The Gemma, the HC-SR04 sensor, one NeoPixel, and the battery.  Once I connected all the parts and downloaded the software, it just worked!

 

I originally planned to mount the ultrasound sensor on the size adjustment strap at the back of the hat, since it was about the same dimensions as the sensor, but that would have left the hat non-adjustable, so I chose to move it to the open space above the adjuster.

image

 

I quickly mocked up a breadboard version of the hat and wrote some code to check its operation before I started sewing.  I verified that the LED lit up in different colors depending on what direction the sensor was pointing, and was good to start sewing!  It's hard to see in this photo, but the NeoPixel's at the center of the nest of alligator clips between the hat and the laptop.  It's currently glowing green because the sensor's pointing away from everything.

image

 

I sewed the ultrasound sensor upside down to the rear of the hat, so that its pins were tucked up and into the hat instead of facing down.  This will hide the wires better, and make the hat look neater when worn.

image

 

I sewed the LED near the front of the rim, but I only sewed it by the serial pass through pin, which will be unused for this project, since I’m only planning to use one LED.  The remaining pins will be soldered using silicon covered wire.  The brim of the hat is too thick to sew through with the stainless thread, and that would take too long and not look as nice.  I’ll finish securing the LED by sewing around the wire after it’s installed.

 

The soldering was quick – there were only seven wires total to solder so there was little work involved. I left enough length in the sensor wire that they could be sewn to the hat for better security, but they’re just tucked into the hatband for now.

 

The hat we chose was coincidentally starting to come apart at one of its seams, which left a convenient hole near the brim for me to feed wires through for the NeoPixel LED.  I'll sew that back up when I find some color matched thread.

image

 

The hat has a nice folded band about the bottom which is about the size of the Gemma, so it will be easy to tuck the Gemma and the battery into the band and have them hidden inside the hat.  I’ll attach the LED to the front brim, as far out as I can so it’ll be visible to the wearer, and of course the ultrasound sensor will be very obvious on the rear of the hat. Since it’s intended as a plaything for a 9 year old boy, the obvious technological upgrade will be a bonus instead of a detraction from its purpose.

 

Here's the gemma ready to hide behind the hatband.

image

And this is how it looks tucked inside.

image

Done!  The code’s already downloaded from the breadboard test, so all I need to do it connect the battery and try it out.  I tried it on, and took a selfie with my phone – it looks pretty innocuous from the front.  You can sort of see the green glow from the LED reflecting off my forehead, telling me that there’s currently nobody sneaking up behind me.

image

 

Here’s a different angle, with a warning that the bookcase is about to grab me!

image

 

And as I step forward, away from the bookcase, the warning changes to yellow (which is pretty white in this photo -- I may need to adjust the color).

image

 

Here’s a couple POV shots of what it looks like wearing the hat.

In this one, the wall behind me is close enough to deserve a warning.

image

But when I take a step forward, I'm safe. (I had to turn the lamp off to avoid overexposure from standing too close).

image

The kids have a party to attend this evening.  I’ll bring both hats along, and see what the reactions are!

  • Sign in to reply

Top Comments

  • DAB
    DAB over 10 years ago +1
    Very nice build. Simple, but effective. I could see bike riders using your hat to see if anyone is tailgating them on the road. Well done. DAB
  • mcb1
    mcb1 over 10 years ago in reply to bowdends

    Bluetooth adapters are cheap now

    Even a simple RF transmitter that sent Okay, Warning, Danger state to the hat would work.


    Your light could then be Green, Orange, or Red and we tend to use Blue for unknown (ie no status within x)

    For this purpose the simple light as you've demonstrated is quite effective.


    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • bowdends
    bowdends over 10 years ago in reply to mcb1

    I do like that idea.  Bluetooth adapters are cheap now, as are sensors.  A heads up display would be cool too -- then a lot of data could be sent out.

    I'm not sure what the rider would do with all that data, but it'd be kind of fun to build.

     

    David

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 10 years ago in reply to bowdends

    The concept is great.

    You could adapt it to have the data from a mounted sensor send to the hat and drive the light.

     

    So many possibilities.

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • bowdends
    bowdends over 10 years ago in reply to DAB

    That could be useful for bikes behind you, but it would be less useful looking out for cars -- the effective distance measurement of the sensor I used is only about 2 meters.

     

    Thanks for reading about my projects, and for your comments!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 10 years ago

    Very nice build.

     

    Simple, but effective.

    I could see bike riders using your hat to see if anyone is tailgating them on the road.

     

    Well done.

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube