- Joined
- Nov 28, 2011
- Messages
- 8,393
That's good. I don't normally put a circuit description in my source code - just a summary of the signals on the device pins and for each possible state, what they mean (for inputs) and what effect they have (for outputs), but if you aren't going to document it somewhere else, I guess that's a good place.
Suggest not using DC for "dust collector" here; suggest "... will continue to run for ~10 seconds after the ..."The DC will have a delay, to run for ~10 seconds after the triggering tool has ended operation to clear out the ductwork.
... , and the coil of relay K1 (which controls the dust collector) which is driven by Q1.The +5V output continues and feeds 4 more areas: the PIC microcontroller (PIC12F675), Allegro Hall Effect ACS712 chips, Q1 2n3904 power amplifier and the coil K1.
With no current flowing in the monitored appliances, the Allegro chip outputs will sit at about half the supply voltage. When AC flows in an appliance, the Allegro chip reproduces the current waveform at its output, centered around half supply, with a ratio of (fill in the blank here - I'm not sure which Allegro chips you chose).* When current is sensed in either Allegro chip, (this would be from an outlet in series with the chip via connectors CN2 or CN3, one for 120v and
* one for 240v) pin 7 will send out an analog signal (amplitude varies with current). This signal enters the PIC at pins 3 and 5 - one for each sensor chip.
-MCLR (pin 4) is pulled up, not down, and yes, that's just to stop it from floating when the programmer isn't connected.* C4 and C6 are filter & C5 and C7 are bypass caps for the Allegro chips. I believe R2 pulls down the master clear (MCLR) Pin 4 so it's not left floating
Not relevant; I'd remove that* (R2 allows for 0.15mA of current to pass).
This signal is used by firmware to measure the hold-on time for the dust collector.R3 limits current, but allows mains frequency to to reach pin 2 of the PIC (CKLIN), while C9 filters the signal.
relay* Pins 1 & 8 are V+ and V- or ground with C8 filtering between. Pin 7 is the output, which will trigger the coil
D1 absorbs inductive kickback from the relay coil when Q1 is turned off and the current path is interrupted. It is needed to protect Q1 from excessive collector-emitter voltage.via R4 and Q1. D1 prevents backfeeding the circuit when the magnetic field collapses.
The supply to the dust collector is interrupted and fed through the contacts of relay K1.R5 and C10 help to dissipate power as the field collapses. K1 will the relay separating power from our switched device.