The blasting machine works like this: you lift and then push down (hard!) on the plunger which has a rack gear on its shaft. This in turn rotates a type of generator called a magneto. Which converts your kinetic energy into electrical energy -- around 30-60V of AC (alternating current) at about 1.5A! This is enough to send a decent amount of power down a long line to a set of blasting caps embedded inside sticks of TNT.
This is also enough to totally fry a microcontroller! So, we need to build a circuit do a couple of things for us to make the signal microcontroller friendly.
The first thing we'll do is take the AC current and convert it to DC. For more detail, check out this guide on power supplies!
This image shows us how alternating current is a sine wave that moves from zero to positive to negative voltage. It also shows how a direct current is ideally constant and positive, for our needs.
An easy way to convert the AC signal is with power diodes, such as the 1N4001, which only allows current to flow through in one direction, effectively clamping it to the positive-only half of the waves.
Turns into this:
Not bad, but we want to smooth out that signal. Enter: the capacitor.
The capacitor acts like a fast charging/discharging battery, so the wave doesn't dip down as badly as it did before.
We can do one more simple thing to improve that wave from the half wave into a full wave, by essentially mirror the negative peeks of the original AC current up to positive.
Four diodes arranged like this will give us what we need.
Including the capacitor for smoothing, here's what the wave now looks like:
Depending on your setup, you may not actually need a full-wave rectifier. If you're just sensing the device, a half-wave will probably be fine. If you're trying to charge or power your project, a full-wave will get you 2x as much power, so its more efficient!
Personally, I wasn't sure what I'd be using the prop for when I first started laying out the circuit so I went with the more-useful full-wave!
Now that the current coming from our blasting machine (or other AC source) has been converted to DC, we need to drop the voltage down to a lower level.
For this, we'll use a resistive voltage divider. This uses two resistors in series -- one connected to the positive source the other connected to ground. The voltage at the intersection of the two resistors will be the "divided" or reduced voltage we need.
We just need to sense the voltage, not power something. If you want to actually power your device, use a regulator or buck converter to take the high voltage down to 12V or 5V, whatever you need.
By choosing a 100k resistor and a 4.7k resistor, we'll get our original, say, ~30-60VDC (maybe a little higher depending on how hard you push it) dropped down to around 1.3-2.6VDC.
Try building the above circuit on a breadboard and testing the voltage with a multimeter. Once it's working well, it's time to solder the circuit to a permanent FeatherWing Proto board that we can stack onto our Feather.
Solder 6" lengths of wire to the AC input pads on the FeatherWing Proto board as shown in the diagram -- these will be connected later to the blaster -- and solder 24" lengths of wires to the ground and pin 9 pads to run to the relay later.