+ All Categories
Home > Documents > Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ......

Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ......

Date post: 04-Jun-2018
Category:
Upload: lamtu
View: 224 times
Download: 1 times
Share this document with a friend
37
Coffee Detonator: The TNT Plunger Grinder Created by John Park Last updated on 2017-04-12 08:04:36 PM UTC
Transcript
Page 1: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Coffee Detonator: The TNT Plunger GrinderCreated by John Park

Last updated on 2017-04-12 08:04:36 PM UTC

Page 2: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

236

99

15

192334

Guide Contents

Guide ContentsOverview

Materials

Voltage ConversionAC/DCVoltage Divider

Microcontroller ReadingBuild ItBlast and Grind

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 2 of 37

Page 3: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Overview

Wile E. Coyote's ACME catalog may have never listed a coffee grinder, but if it had, itwould probably have looked a bit like this.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 3 of 37

Page 4: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

This is the guide to controlling a coffee grinder with a TNT blasting plunger you never knewyou needed! It is admittedly pretty darned specific -- however! you can use the techniqueshere to use nearly any high-powered AC device as a switch for your microcontrollerprojects. Plus, the addition of the controllable power outlet module means you can instructyour microcontroller to turn on and off a second AC powered device, such as a blender,drill, lamp, or pump.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 4 of 37

Page 5: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 5 of 37

Page 6: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Materials

Besides the electronics parts listed above, you'll need a 1000uF electrolytic capacitory, andneed a source of AC power that you'd like to use as a switch, such as a TNT blastingmachine or hand-cranked generator.

You'll also need something that can be plugged into AC to trigger, such as a coffee grinder,blender, lamp, or pump.

A small wooden, cardboard, or plastic box to use as enclosure will be helpful, as well as apair of #6 x 1" screws, nuts, washers, lock washers, and wing nuts to use as terminalposts.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 6 of 37

Page 7: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 7 of 37

Page 8: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 8 of 37

Page 9: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Voltage Conversion

The blasting machine works like this: you lift and then push down (hard!) on the plungerwhich 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 downa 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 coupleof things for us to make the signal microcontroller friendly.

AC/DC

The first thing we'll do is take the AC current and convert it to DC. For more detail, checkout this guide on power supplies (http://adafru.it/vAP)!

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 9 of 37

Page 10: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

This image shows us how alternating current is a sine wave that moves from zero topositive to negative voltage. It also shows how a direct current is ideally constant andpositive, for our needs.

An easy way to convert the AC signal is with power diodes, such as the 1N4001, whichonly allows current to flow through in one direction, effectively clamping it to the positive-only half of the waves.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 10 of 37

Page 11: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Turns into this:

This is called a "half-wave rectifier" because we end up with half of the original AC wave

Not bad, but we want to smooth out that signal. Enter: the capacitor.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 11 of 37

Page 12: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

The capacitor acts like a fast charging/discharging battery, so the wave doesn't dip down asbadly 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.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 12 of 37

Page 13: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Including the capacitor for smoothing, here's what the wave now looks like:

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 13 of 37

Page 14: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

This is called a "full-wave" rectifier because we capture the full wave from the original ACwave, but just keep it all positive!

Depending on your setup, you may not actually need a full-wave rectifier. If you're justsensing the device, a half-wave will probably be fine. If you're trying to charge or poweryour 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 thecircuit so I went with the more-useful full-wave!

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 14 of 37

Page 15: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Voltage Divider

Now that the current coming from our blasting machine (or other AC source) has beenconverted 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 -- oneconnected to the positive source the other connected to ground. The voltage at theintersection 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 yourdevice, 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.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 15 of 37

Page 16: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

You can calculate the resistors with this formula: Vout = Vin * (R2/(R1+R2))

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 16 of 37

Page 17: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

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 Protoboard that we can stack onto our Feather.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 17 of 37

Page 18: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Solder 6" lengths of wire to the AC input pads on the FeatherWing Proto board as shown inthe diagram -- these will be connected later to the blaster -- and solder 24" lengths of wiresto the ground and pin 9 pads to run to the relay later.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 18 of 37

Page 19: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Microcontroller Reading

By connecting the output of our circuit to an analog pin on our Feather (or other)microcontroller, we can use software to read the voltage level. Go ahead place theFeatherWing Proto board the Feather -- this will connect the circuit's divided DC output topin A0 on your Feather microcontroller, as well as common ground.

Don't even *think* of connecting the 'raw' 30VAC or 30VDC to your microcontroller, you will

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 19 of 37

Page 20: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

blow it up!

Make sure you can upload code to your Feather -- use this guide (http://adafru.it/ldF) if youare just getting started. Once you can successfully upload to the board (http://adafru.it/s1C),move on to the next step.

Copy the above code, and then paste it into a new Arduino sketch. Save it as acRead.inoand then upload it to the Feather. Open the Serial Monitor in the Arduino IDE (Tools >Serial Monitor) and you'll see the values mapped from 0 to 1023 showing up. Apply yourAC current by plunging a TNT plunger, or spinning a bicycle wheel light generator, orhowever else you like, and you'll see the values increase temporarily.

Or, you can visualize things using the Arduino Serial Plotter Tools > Serial Plotter

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 20 of 37

Page 21: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Now, we can create code to read the voltage level and wait for it to hit a certain thresholdbefore sending the signal to the relay in the power strip.

//Coffee Detonator// Reads TNT blasting cap detonator voltage levels and // triggers a relay to power a coffee grinder// by John Edgar Park// for Adafruit Industries//MIT Licenseconst int analogInPin = A0; // Analog input pin attached to voltage dividerint sensorValue = 0; // value read from the potint controlPin = 12; // pin attached to relayint RUNTIME = 5000; //time to grind in millisvoid setup() { pinMode(controlPin, OUTPUT); //set pin attached to relay as output Serial.begin(9600); //use for monitoring and debugging}void loop() { sensorValue = analogRead(analogInPin); // read the analog in value //Serial.print("sensor = "); Serial.println(sensorValue); delay(2);// wait for converter to settle down if(sensorValue>=1000){ //anything above this threshold will trigger it

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 21 of 37

Page 22: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

digitalWrite(controlPin, HIGH); delay(RUNTIME); digitalWrite(controlPin, LOW); }}

Copy the above code and save it as a new Arduino sketch called coffeeDetonator.ino.Upload it to the Feather. Now, when the voltage goes up to a certain level, the Feather willclose the relay inside the power strip for five seconds. You can adjust this time by changingthe "RUNTIME" variable.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 22 of 37

Page 23: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Build It

We can make a neat little enclosure to hold the circuit, microcontroller, and battery, as wellas provide posts onto which to clip the leads coming from the detonator.

I modified a small wooden box I got at the thrift store for $1.97, but you can use any type ofnon-conductive enclosure you want.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 23 of 37

Page 24: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Mark for holes on your box, leaving some room from the interior walls for the nuts to fit.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 24 of 37

Page 25: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Drill out the wholes with an appropriately sized bit.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 25 of 37

Page 26: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

This is a good stacking order for the posts, with the screw and first washer of each going

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 26 of 37

Page 27: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

inside the box, and the remaining hardware on the top.

Drill out and/or chisel a hole for the panel mount USB extension to fit.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 27 of 37

Page 28: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Plug the LiPoly battery into the Feather's battery connector.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 28 of 37

Page 29: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Wrap the wires for the AC input on the FeatherWing Proto board onto the posts on theinside of the wiring box. (Alternately, you can us crimped spade lugs.)

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 29 of 37

Page 30: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Connect the FeatherWing onto the Feather, plug the USB panel mount extension into theFeather, and place them and the battery inside the wiring box.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 30 of 37

Page 31: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Leave the relay wires running out of the box, and then close its lid.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 31 of 37

Page 32: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Connect leads from the terminal posts on the wiring box to the posts on the detonator orother AC source.

Strip some insulation from the ends of the relay output wire coming from the wiring box,and screw them into the screw terminals on the power strip. Polarity matters here, so makesure you follow your color coding.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 32 of 37

Page 33: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 33 of 37

Page 34: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Blast and Grind

You're ready for action! Plug the relay controlled power module into a wall outlet, then flipits switch from OFF to RESET (which means "on").

Now, plug your coffee grinder into on of the normally off outlets on the power module. Flipthe grinder's own power switch to ON.

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 34 of 37

Page 35: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Dramatically raise the detonator hands. Yell "Fire in the hole!" or some other appropriatewarning. Give the plunger a good plunge, and BOOOOM your coffee is grinding!

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 35 of 37

Page 36: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

© Adafruit Industries https://learn.adafruit.com/coffee-detonator Page 36 of 37

Page 37: Coffee Detonator: The TNT Plunger Grinder · Coffee Detonator: The TNT Plunger Grinder ... cardboard, or plastic box to ... a long line to a set of blasting caps embedded inside sticks

Beautifully ground coffee always tastes best when it's been initiated with a TNT blastingmachine plunger.

© Adafruit Industries Last Updated: 2017-04-12 08:04:35 PM UTC Page 37 of 37


Recommended