Giter VIP home page Giter VIP logo

pico_fogger_controller's Introduction

pico_fogger_controller

Pi Pico Code to control a fog machine via variable timer or motion sensors

Background

I bought this fog machine for Halloween. It worked great, but almost too great. The automatic mode ran 30 seconds every 2-3 minutes which seems fine ... until after about 30 minutes and there's smoke all over our front yard into the street.

I wanted a way to control the duration it is on and off to not put out as much fog. But it didn't offer that. It only offered the automatic mode, a wireless button, and a mechanical button.

So I built a small microcontroller circuit to control it the way I wanted, with parts < $10.

Design

So I did the following:

  • Soldered two wire leads to the inside switch of the mechanical button,
  • Bought a Raspberry Pi Pico,
  • hooked it to a 5V relay module,
  • Hooked relay to the switch leads,
  • Wired this PIR sensor module to a GPIO pin, and
  • Set the pin as an interrupt to trigger the fogger on motion as well as timer.

The relay module was a useful way to activate that mechanical switch with circuit isolation.

Source Code

The main.py can be uploaded to the Pico via a tool like Thonny after you flash it with MicroPython firmware.

The main.py is a timer that switches the onboard LED and relay pin ON/OFF. When the pins are OFF, it can be optionally interrupted via the interrupt pin (i.e. with a PIR motion detection event), which will turn the LED/relay back on.

References

pico_fogger_controller's People

Contributors

tszumowski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.