-->
Page 1 of 1

Turning on machine automatically when other machine turns on

PostPosted: Mon Dec 27, 2021 10:59 am
by donnybahama
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 (one for each dust producing shop machine) 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 the above is unclear, check out the video and just imagine moving the carriage left or right with a motor driven threaded rod, stopping the drive motor when a magnet on the carriage closes the right reed switch.

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

Things I need guidance on:

  • 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?
  • The “sender modules” send “Power ON” and 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?
  • 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?
Anything else I’m overlooking?

Thank you for your time and consideration.

Re: Turning on machine automatically when other machine turn

PostPosted: Tue Dec 28, 2021 3:34 pm
by Bonzo
An interesting idea; I am looking to do something similar but my tools are spaced further apart and I was going to put the blast gates next to the machines.
While doing some research I found other people had the same idea. One is here: https://www.thingiverse.com/thing:3147589 I was going to use a solenoid as well with current sensors in a "plug box" and a nodemcu and esp-12f's on the blast gates to operate the solenoids. Two machines are side by side so I was going to print a double blast gate.

As to your questions :
1/ The GPIO will like a High or Low voltage signal and act on that. If you use an analog signal you may have to add a ADC as depending what processor you have it might only have one analog in.
2. I was going to use a "Hall effect" current sensor in the "plug box" These are cheap enough; four from Amazon for about £10 or £8 from Aliexpress.
3. Each reed switch to a separate GPIO or a "home" switch and count the reed switches.

Re: Turning on machine automatically when other machine turn

PostPosted: Tue Dec 28, 2021 3:35 pm
by Bonzo
Bonzo wrote:An interesting idea; I am looking to do something similar but my tools are spaced further apart and I was going to put the blast gates next to the machines.
While doing some research I found other people had the same idea. One is here: https://www.thingiverse.com/thing:3147589 I was going to use a solenoid as well with current sensors in a "plug box" and a nodemcu and esp-12f's on the blast gates to operate the solenoids. Two machines are side by side so I was going to print a double blast gate.

As to your questions :
1/ The GPIO will like a High or Low voltage signal and act on that. If you use an analog signal you may have to add a ADC as depending what processor you have it might only have one analog in.
2. I was going to use a "Hall effect" current sensor in the "plug box" These are cheap enough; four from Amazon for about £10 or £8 from Aliexpress.
3. Each reed switch to a separate GPIO or a "home" switch and count the reed switches.

Re: Turning on machine automatically when other machine turn

PostPosted: Thu Dec 30, 2021 2:35 pm
by L67GS
Honestly I don't think this approach is the most fool proof or easiest. It sounds like you have a background in electronics so some diy current sensors clipped to the power cords would be simple to make, mostly a bjt like a 2222 and an inductor.
The wireless aspect is neat but really it would just take a piece of 3 conductor bell wire to each current sensor to greatly simplify.
A diy encoder wheel and breakbeam on the lead screw would be enough for positioning to count the number of leadscrew turns.
There exists a simple program to use ladder logic that's crazy easy to learn to program microcontrollers called LdMicro, a simple PIC like 16F328a would have more than enough GPIO and since it doesn't require extreme precision like driving 7 segment displays or sending data it could even run on internal oscillator.