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
Arduino
  • Products
  • More
Arduino
Arduino Forum Turning on a machine automatically when another machine is turned on - using ad hoc ESP8266 network
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 43 replies
  • Subscribers 388 subscribers
  • Views 14418 views
  • Users 0 members are here
  • wifi
  • esp8266
  • relays
  • wireless
Related

Turning on a machine automatically when another machine is turned on - using ad hoc ESP8266 network

donnybahama
donnybahama over 3 years ago

I’m very new to microcontrollers and programming. I probably know just enough to be dangerous. I’m trying to devise a reasonably simple system for turning on the dust collector in my wood shop and positioning the sliding carriage (output side) of a blast gate manifold over the appropriate inlet for the tool that was just turned on. (The first 10 seconds of this video will clarify how the manifold works.)

The way I think I want to do this is using an ad hoc network of ESP8266 modules - 6 “sender” modules which send "Power ON” and [Machine ID] to the “receiver” module (mounted near the dust collector and blast gate manifold) when current is detected for the dust producing machine’s motor. The receiver module then triggers a relay which turns on a motor which turns a threaded rod which moves the manifold’s sliding carriage to position it over the inlet for the tool that was just turned on. Six reed switches - one each attached to the blast gate inlets - are connected to GPIO pins on the receiver module. A magnet mounted to the sliding carriage closes each reed switch as it travels. When the ESP8266 sees that the reed switch for the desired GPIO pin has been closed, it 1) deactivates the relay that’s supplying power (or ground) to the positioner motor, 2) activates a relay that turns on the dust collector, and 3) Turns on a green indicator that can be seen throughout the shop, indicating that the dust collector is on and the proper blast gate is open.

If that’s not the right way to do things, please let me know what the right way is.

Things I need guidance on:

  1. Because I have zero experience with microcontrollers and GPIO pins, I’m not exactly sure what the microcontroller expects to see on a GPIO pin in order to know that some trigger just occurred and some action must be taken. Does it want to see voltage? Ground? A particular frequency?
  2. The “sender modules send “Power ON” ad the machine ID to the receiver module when current is sensed. What’s the simplest/cheapest way to detect the current from a motor turning on and use that to trigger the GPIO pin?
  3. Again, because I have no experience programming a microcontroller, how do I tell the microcontroller to ignore the (momentarily) closed reed switches from the other manifold inlets as the carriage/magnet travels by reed switches 1, 2, and 3 to get to the desired (#4) position?
  4. Anything else I’m overlooking?

Thank you for your time and consideration.

  • Sign in to reply
  • Cancel

Top Replies

  • fmilburn
    fmilburn over 3 years ago +5
    Hello donnybahama That is a relatively complex project for someone new to microcontrollers but doable with effort. The best advice I can give is to break it into pieces and prototype each step before…
  • beacon_dave
    beacon_dave over 3 years ago +5
    Perhaps best to start with Question 4... - Safety. Power tools, mains power and "new to microcontrollers and programming" can quickly result in injury. - Your 5th port (free hose) doesn't have a power…
  • dougw
    dougw over 3 years ago +4
    Nice manifold design. It might be better to use a pulley than a lead screw. A leadscrew wouldn't allow the magnets to align the ports.
  • dougw
    dougw over 3 years ago

    Nice manifold design.

    It might be better to use a pulley than a lead screw. A leadscrew wouldn't allow the magnets to align the ports.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
  • fmilburn
    fmilburn over 3 years ago

    Hello donnybahama

    That is a relatively complex project for someone new to microcontrollers but doable with effort.  The best advice I can give is to break it into pieces and prototype each step before proceeding to a final build.  There are others on e14 that are more knowledgeable than me on this topic but here are some thoughts:

    • As usual, there are lots of ways to approach this and do it - what I've listed below are ideas and not necessarily the best recommendations for your project.
    • I'm going to assume you will use an Arduino compatible board as there are lots of libraries and references on the internet to do the sort of things you have outlined
    • Regarding your question1):  Most microcontrollers including at least some versions of the ESP8266 have one or more ADC pins (a means to convert an Analog signal to Digital).  This is necessary for some of the sensors discussed below.  Arduino compatible microcontrollers also have digital input - that is they can tell if a signal is high or low (i.e. something close to GND or something close to the operating voltage - either 3.3V or 5V - that the microcontroller can handle).  Microcontrollers can also handle certain digital serial communication protocols which some sensors output.  None of the sensors I'll mention below output frequency or use serial communication.  Some industrial sensors use a 4-20mA output.  The answer to your question 1) above is that it depends on the sensor.
    • Regarding your question 2):  I'm going to exclude industrial 4-20 mA sensors but you can have a look at them.  They are generally more expensive and less common in DIY projects.
    • Regarding your question 2):  One approach is to use a Hall sensor.  See for example my review of the Infineon TLI4970-D050T4 here.  You can find many more boards with this type of sensor with an internet search of "hall current sensor".  These sensors are invasive in that they must be wired in series with the load/machine.  They require an ADC and can determine the actual current value.
    • Regarding your question 2):  I'd probably look at a non-invasive current transformer sensor first, e.g. this one from Seeed.  They require an ADC and a fairly simple voltage divider and DC offset voltage to get it in range.
    • Regarding your question 3): In addition to a reed switch, you might also consider a Hall Sensor and magnet, e.g. the Rohm Hall BD7411G I reviewed here which outputs a high or low voltage to indicate proximity.  There are many others available.
    • Regarding your question 3):  All microcontrollers have timers so it is a simple matter of timing how long the GPIO pin is high (or low depending on the logic/wiring used).  If the hall sensor or reed switch is only in the on state for less than say 1 second or however long it takes to move to the next opening then you know to ignore it.

    Hope this helps.  Again, my advice is to break this into manageable pieces.  You will more likely get engagement here on e14 with smaller chunks as well.  Maybe start with sensing current, choose an inexpensive sensor, see how it works, and make another post if there is an issue.

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Cancel
  • phoenixcomm
    phoenixcomm over 3 years ago

    Nice manifold. Question It would be easier to do with separate ports (one per machine)  It would get rid of the machinal of pulleys or lead screws.  I would just use an RC servo to control open closed. The five servos could be wired to an Arduino which could also turn on the vacuum.

    ~~Cris 

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
  • beacon_dave
    beacon_dave over 3 years ago

    Perhaps best to start with Question 4...

    - Safety. Power tools, mains power and "new to microcontrollers and programming" can quickly result in injury.

    - Your 5th port (free hose) doesn't have a power line to sense in order to activate, so you will need some sort of override switch for that. Even if it is the default position when no tool is being used, then you still need to turn the shop vac on and off. 

    - Handling unplanned conditions - two machines are turned on at the same time. 

    - Manual over-ride - how do you operate the manifold manually when your microcontroller solution stops working and it is driven by a threaded rod.

    - Limit switches - if using a threaded rod then you may want separate hard-wired limit switches to stop the motor if your programming fails to detect the port reached sensor and keeps on going, which usually doesn't end well.

    - Power on states - your system could power up with the manifold position not on any sensor, so your initialisation routine will need to work out where it is so you may want soft limit sensors in case you end up past the outer ports.   

    - Motor controller - you will need a suitable motor controller between the microcontroller and the motor which can drive the threaded rod in either direction.

    - Mechanical switch de-bouncing - mechanical switches tend to bounce which can give unexpected behaviour in your programming.

    Question 3 I don't think is an issue, as if you turn machine 4 on you will likely be checking to see if machine 4 power sense is active AND port 4 sensor reached. Your program will likely be ignoring any activity on port sensors 1-3 as it passes them.

    Any reason that you have chosen the ESP8266 for this ? Sounds like you are perhaps planning on Wi-Fi connectivity ? However if you are already committed to running large vacuum hoses to each machine then a wired solution could be simpler / more reliable for starting out.    

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Cancel
  • phoenixcomm
    phoenixcomm over 3 years ago in reply to phoenixcomm

    addendum. as per rc servos you would have to overcome the 4 magnets you might need a cam. with a link for the Torque 

    Small servos have about 9g of torque. but a 20kg torque is about 17 USD. amazon

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • donnybahama
    donnybahama over 3 years ago

    Wow! Thank you all so much! What a terrific community this is! I really appreciate your time and input!

    I need to clear up a couple of things… For starters, the manifold design in the video is not mine but it’s reasonably close to what I’m planning to build. I wasn’t planning to use the magnets to snap the carriage into position; I figured that with a reasonably precise positioning system, the magnets wouldn’t be necessary.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • donnybahama
    donnybahama over 3 years ago in reply to beacon_dave
    dougw said:
    It might be better to use a pulley than a lead screw

    I definitely want to consider alternate designs but I can’t envision how a pulley can move my carriage. Could you please elaborate?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • donnybahama
    donnybahama over 3 years ago
    fmilburn said:
    The best advice I can give is to break it into pieces and prototype each step before proceeding to a final build.

    That definitely seems like great advice! I sometimes write (for work) very long, complex batch scripts and I find that breaking it into many functions/subroutines makes development a lot easier. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • donnybahama
    donnybahama over 3 years ago
    fmilburn said:
    Arduino compatible microcontrollers also have digital input - that is they can tell if a signal is high or low (i.e. something close to GND or something close to the operating voltage - either 3.3V or 5V - that the microcontroller can handle).

    Thanks so much for explaining the types of signals that GPIO pins can work with. I think I’ll mostly be working with the digital inputs and I’ll probably just ground them when I want to trigger something. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • donnybahama
    donnybahama over 3 years ago
    fmilburn said:
    I'd probably look at a non-invasive current transformer sensor first, e.g. this one from Seeed.

    That looks perfect although it says, “used for measuring” which tells me it’s probably going to output a variety of values based on current flow whereas I just want to know if it’s zero or not zero. I guess I’d need to use an analog GPIO pin to handle this device’s non-digital output? Or is there a sensor out there that simply detects current/no current?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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