In the last post, I described the inputs and outputs to the system but left the main guts for this post.First, lets define a couple features which we should try to build into the black box:
- The shop vac should turn on when a tool turns on – this is a simple one but its the base functionality to which we build off of.
- Provide the ability to run small loads off the system without turning on the DC.
- Provide the ability to connect multiple tools to the system, all which can independently turn on the DC.
- Provide the ability to keep the DC on for a variable amount of time after the tool turns off.
- Provide the ability to turn on the DC for other purposes like cleaning the shop or sanding.
- Provide the ability to actuate a blast gate when its specific tool turns on.
- Provide the ability to delay the start of the DC for a variable amount of time once the tool turns on.
#6 and 7 are features that haven’t been built into my existing system but will be discussed as options.
So right now we have a black box, we know the input, the amount of current being drawn by the tool which is sensed by the ACS712 current sensor. And we know the output. Closing a relay to apply 120vAC to the shop vac which is achieved by means of a electro-mechanical relay like the Omron G2RL-1ATP5. So the schematic currently looks like this:
Before we get started on the black box in the middle, you should notice there are a couple of voltage supplies which are required to power this thing, namely a +5vDC and 120vAC supply. Plus we’ll also need a +12vDC supply to actuate the relay. The 120vAC is easy as this is the voltage out of the wall socket. The other two can be created by use of a transformer, diode bridge, a 7805 regulator and some small caps. Since the +12vDC is only used to actuate the relay, it doesn’t need to be regulated and can be derived directly off the diode bridge. But the +5vDC will be powering ICs and logic chips so it should be regulated and filtered. This is achieved through the 7805 regulator. Now adding this to the schematic we have:
Transformer and Relay Selection:
Looking at my original post for the project, you can see the transformer I used. Its the gold colored box in the middle of the case with the black writing on it. This is one I had salvaged from a old paper shredder and that just happened to match with the Omron relays I had. If you plan on building a circuit like this, pick your transformer ratio so it will have an output voltage about 2 volts above the coil voltage for the relay. This is what allows me to derive the +12vDC voltage to be used for the Omron relay. In my case the transformer steps 120vAC down to about 13.33vDC and after the diode bridge I get about 11.5vDC .
For European 220vAC users:
First a clarification, this is for single phase, one hot to neutral of 220 volts. Not to be confused with the US 240 volts which is two hots, each 120volts out of phase when measured hot to hot is 240 volts. When selecting components for 220vAC, be sure to select a transformer and relay that can handle this additional voltage potential. Most will be able to, but just keep this in mind. Check the data sheets. On the relay data sheets look for switching capacity and on the transformers look for nominal input voltage. Here’s a sample of the Omron G2RL relay datasheet I used. Other than the ACS712, the transformer and relay are the only two components that will see 220vAC. From here on out the rest of the components are operating off DC.
Understanding the output from the current sensor
As I described in the previous post, the ACS712 is a bi-directional current sensor for AC or DC current and outputs a voltage proportional to the current its sensing. For AC currents it will output an AC voltage centered around 2.5vAC that increases 66mV for each amp of current up to ~4.5 vAC for 30A. Since we need to do something with this signal using digital logic, the first thing we need to do is transform this into a DC signal. This is easily done with a single diode, 2 resistors and a capacitor. So the AC signal will now be DC and range from ~2.2vDC to 4vDC (There is a small drop across the diode). Depending on which diode you use there can be a varying vDrop. Typical diodes will take approx 0.7v but if you use a Schottky diodes the Vdrop will be reduced. I had some which had about a 0.3 volt drop. Read more about diodes here. The resistors and capacitor help to smooth and filter the DC signal. I used 1uF capacitors, a 2k ohm resistor on the output from the sensor, and a 1M resistor in parallel with the capacitor. Adding this into the schematic (removing the power supply portion for clarity) we have:
Using the output from the current sensor
Now we have a signal that can vary from 2.2vDC to 4vDC. To implement feature #2 above, we can compare this value to some adjustable voltage to determine if the current is high enough to turn on the DC. This is achieved using a comparator circuit based off an op amp. This is just a small circuit that has two inputs V1 and V2 and one output. When V1 is higher than V2 it outputs a +5vDC signal. And when V1 is below V2 the output is 0vDC. Read more here. This circuit allows us to compare the analog value to a threshold and output a binary “1” signal when its above it and a binary “0” when not. This is overly simplifying multiple things but to avoid going too deep into the technical details this should be good enough.
To implement the comparator circuit, we’ll need an op amp and one potentiometer. The potentiometer will create a voltage divider what is adjustable by turning the potentiometer. I used a 10k ohm potentiometer. Adding these components to the circuit expands the schematic a bit further. Eroding that black box a bit more.
Next post I’ll talk about expanding the system for more than one tool and connecting everything to the output.
If you made it this far thanks for reading. I feel a bit funny since this is a woodworking site yet I’m posting a detailed electrical write up on circuits. But I guess its all good since its for DC. Hopefully I didn’t loose too many people along the way but if I did please feel free to ask questions.