Step 4:
Next, I wired up a PIR motion sensor. When the sensor is tripped, the diffuser turns on and a timer (20 seconds in the test program, but 30 minutes for the actual product) is triggered. Once the timer runs out, the diffuser shuts off. This ensures that the diffuser is on when there is someone present in the room (don't want to waste those expensive oils).
I had a few issues with this step. My sensor was alternating between the HIGH and LOW state even though there was no motion. It took me hours to realize that I had mistakenly plugged the sensor into the 3.3V pin and not the 5V VIN pin. I won't make that mistake again.
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .