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
Fighting Germs
  • Challenges & Projects
  • Project14
  • Fighting Germs
  • More
  • Cancel
Fighting Germs
Blog Social Distancing Reminder Hat
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Fighting Germs to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: robogary
  • Date Created: 26 Apr 2020 11:54 PM Date Created
  • Views 1379 views
  • Likes 7 likes
  • Comments 5 comments
  • stem
  • isd1820
  • fightinggermsch
  • arduino
Related
Recommended

Social Distancing Reminder Hat

robogary
robogary
26 Apr 2020
image

Fighting Germs

Enter Your Electronics & Design Project for a chance to win an $200 Shopping cart of product!

Submit an EntrySubmit an Entry  Back to homepage image
Project14 Home
Monthly Themes
Monthly Theme Poll

 

Keeping social distance and wearing a mask greatly reduce the risk to transmit/receive coronavirus.

 

While our attentions are usually focused on other tasks, we (or others) may need a reminder to stay 6 feet apart.

 

This hat looks for an object within 6 feet of the wearer. If an object approaches within 6 feet of the wearer, my voice will announce "please respect a 6 foot distancing"

If an object is within 2 feet of the hat wearer, the hat sets off a 90 dB horn for 1 second to get their attention.  nyuk nyuk nyuk

The electronics platform rotates to detect objects 360 degrees of the wearer - No Sneaking UP on the wearer from behind !  :-) 

 

Using the ISD1820 sound recorder chip allows instant re-recording of the message should it need to be changed quickly to a different language, or make the message multi-lingual.

The social distancing hat is clearly marked around its circumference to respect a 6 foot distance.

 

The hat in action can be seen on this video:

https://youtu.be/nFs1KOz2dAw

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

imageimage

 

 

 

parts

image

 

schematic

image

Future Modifications:

1) I'd like to get a modified PixyCam2 that could detect IR images.

This would allow the control to distinguish close objects and people, and add important features:.

An infared PixyCam2 would allow the ping sensor  to be put on a tilt/pan device to get a distance reading at a specific infared target.

It would allow accurate annunciation from a standing position as well as a sitting position.

2)  I'd like to use a better speaker to improve audio intelligibility

3) This packaging is awkward and spread out. A next prototype would be compact , lower center of gravity, and attractive.  

4) The turntable motor is mounted on top of the hat, with electronics on a platform riding on a bearing

   Next prototype version, the motor would be on the rotating platform.

   This allows the use of one battery, and the turntable motor could be temporarily stopped when an object is detected

 

 

code:

/// SocialDIstanceHat.ino

//// setup needed VARS --------------------------

    // pinging VARs

    unsigned long Pingmicroseconds =0;

    unsigned long PingDistanceInches =0;

    int PreviousPingDistanceInches;

       

      int pos = 0;    // variable to store the servo position

      unsigned int Ping_cm; // ping distance in cm

      int loopNR=0; // generic register for loops

//********

void setup(){

//  Serial.begin(9600);

    pinMode(2,OUTPUT);   // Edge trigger output to ISD1820 to play a voice message

    pinMode(3,OUTPUT);   // Ping trigger

    pinMode(4,INPUT);   //  Ping echo

    pinMode(6,OUTPUT);   // Turn on LED flasher module

    pinMode(7,OUTPUT);   // Turn on turntable motor

    digitalWrite(2, LOW);

    digitalWrite(3, LOW);

    digitalWrite(6, LOW);

    digitalWrite(7, LOW);

                }

 

void PING ()

  {

   digitalWrite(3, HIGH);   // HC-SR04   pulse high TRIGGER

    delayMicroseconds(10);        // pauses for 10 microseconds

    digitalWrite(3, LOW);    // sets the TRIGGER pin off         

 

    // ECHO PIN measure microseconds taken to hear pulse, third number is wait time in microseconds( unsigned long int 0 to 4,294,967,295)

    Pingmicroseconds = pulseIn(4, HIGH, 13000);

    PingDistanceInches = (Pingmicroseconds/149); //formula from HC-SR04 spec sheet   , assume solution is an integer

 

   if (PingDistanceInches<=9){PingDistanceInches = 543;}   ///just for troubleshooting

   if (PingDistanceInches==0){PingDistanceInches = 12345;}  //just for troubleshooting

 

      // 340 meters/ second  * (39.37 inches per meters) =13385. inches per usec = .0133856 inches per microsecond;; 74.7 usecs/inch , multiply by 2 for send/return path

      // test and debug

      //    Serial.print("PingDistance=");

      ////    Serial.print(PingDistanceInches);

      // Serial.print("inches ");

      //   Serial.println();

  }

 

void loop()

{

  PING();

  if ((PingDistanceInches<72)&&(PingDistanceInches>24))

     {

     digitalWrite(2,HIGH);// edge trigger audio module

     digitalWrite(6,HIGH);// turn on LED flasher relay

     delay (200);

     digitalWrite(2,LOW);// edge trigger audio module

     delay(8000); //allow 8 seconds for the audio track to finish

     digitalWrite(6,LOW);// turn off LED flasher relay

     }

  if (PingDistanceInches<=24) ////less than 9 inches the pingdistance will be set to 543

     {

     digitalWrite(7,HIGH);// turn on siren

     digitalWrite(6,HIGH);// turn on LED flasher relay

     delay (1000);

     digitalWrite(7,LOW);// turn off siren

     digitalWrite(6,LOW);// turn off LED flasher relay

     }

//if ping distance is greater than 65 inches, do nothing

delay(100); //give ping some time to rest

 

       // Serial.print ("RunByIRRemote flag= ");

     //   Serial.println (RunByIRRemote);

     //    Serial.print ("LeftSPD = ");

     //   Serial.println (LeftSPD);

}

  • Sign in to reply

Top Comments

  • dubbie
    dubbie over 5 years ago +3
    I think if you were wearing this hat people would most likely stay more than 2 metres away anyway. A good solution although it looks a little top heavy - perhaps it is a top-hat. You might try using a…
  • robogary
    robogary over 5 years ago in reply to dubbie +3
    Thanks Dubbie - The suspension on the bump cap came apart on the inside and the hat is top heavy from the turntable motor and gearbox used. Definitely the gearbox motor could be downsized, but its what…
  • ralphjy
    ralphjy over 5 years ago +2
    I don't think that I could manage a 2 hour walk wearing one of these . I bet the kids love it!! Ralph
Parents
  • dubbie
    dubbie over 5 years ago

    I think if you were wearing this hat people would most likely stay more than 2 metres away anyway. A good solution although it looks a little top heavy - perhaps it is a top-hat. You might try using a hard hat safety hat instead of the soft-cap. These provide  a much more rigid structure with the potential to hide the electronics inside the hat, between the webbing and the plastic of the hat. You could also try placing multiple PIR sensors around a hat to achieve the same outcome.

     

    Dubbie

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • robogary
    robogary over 5 years ago in reply to dubbie

    Thanks Dubbie - The suspension on the bump cap came apart on the inside and the hat is top heavy from the turntable motor and gearbox used. Definitely the gearbox motor could be downsized, but its what I had in my inventory. 

    A baseball helmet or motorcycle helmet definitely work better for stability as well.

     

    The PIRs sense motion, but dont return distance measurements, maybe you meant multiple ping sensors. 

    The main idea of the spinning platform is to have the speaker and the flashing light pointing in the direction of the perpetrator, thats the reason I opted for one ping sensor   :-)

     

    If this were being designed for a production model,  I considered removing the 90 db horn, the ISD1820 IC, audio amp and speaker, and just using a smoke detector piezo-speaker and driver IC.

    These changes significantly simplifies the control, reduce size, power consumption, weight and cost ................but the hat just wouldn't be novel and fun anymore..................

    Gary

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • robogary
    robogary over 5 years ago in reply to dubbie

    Thanks Dubbie - The suspension on the bump cap came apart on the inside and the hat is top heavy from the turntable motor and gearbox used. Definitely the gearbox motor could be downsized, but its what I had in my inventory. 

    A baseball helmet or motorcycle helmet definitely work better for stability as well.

     

    The PIRs sense motion, but dont return distance measurements, maybe you meant multiple ping sensors. 

    The main idea of the spinning platform is to have the speaker and the flashing light pointing in the direction of the perpetrator, thats the reason I opted for one ping sensor   :-)

     

    If this were being designed for a production model,  I considered removing the 90 db horn, the ISD1820 IC, audio amp and speaker, and just using a smoke detector piezo-speaker and driver IC.

    These changes significantly simplifies the control, reduce size, power consumption, weight and cost ................but the hat just wouldn't be novel and fun anymore..................

    Gary

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
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