-
1Step 1
Since this is a pretty open ended project there are lots of ways you can implement it. If you don't have a part called for in the instructions, find another way! I prototyped the whole thing with cardboard and tape before getting all the brackets and things I needed to make something I could hang on the wall.
So, things you will definately need:
Imp, Imp Breakout, Cowbell, Solenoid (or something to hit the bell), 2x NFET (I used a Sparkfun mini FET shield), Diode (I'll explain that below), power supply, Some way of holding it all together (I used wood, angle brackets, nuts and bolts, but anything should work).
Here are the electrical steps I went through:
-
2Step 2
Power
First, we need to get power to everything. If you are using a smaller solenoid which operates at 5V, you can use the USB connector. I have a big bell and wanted to hit it hard so I went with a 12V/600mA solenoid so I needed to use a 12V wallwart. I happened to have a nice female power connector which matched up to my wallwart, so I figured out which was positive and negative and soldered them onto the corresponding battery pads on the Imp Breakout Board. If you are using a breakout board from Sparkfun, checkout their guide to getting a power selector soldered. If you are using the battery pads for your power supply make sure you move the jumper over to the BAT side of the power selector, if you are using the USB, you'll need to select USB. I hate jumpers and want this to keep functioning so I just shorted BAT to VIN.
Now's a great time to see that what you have is working. Go ahead and power it up and put the imp in. It should start flashing it's LED. If you are new to the platform check out the getting started guide to get things up and running.
-
3Step 3
FET Shield
FETs allow you to drive more current at a higher voltage on a pin than you can straight from the Imp. The Imp is only capable of 4mA at 3.3V, but my solenoid requires 600mA at 12V. You can use discrete FETs to drive each load, but I wanted something that would look nice and be reliable so I bought the Sparkfun Mini FET Shield.
The only problem is that it includes a boost power supply that I don't want and isn't rated for 12V. I took my heat gun to it and pulled the power supply parts off the board. This gets it ready to start hooking things up.
-
4Step 4
Hookup
Checkout Sparkfun's Hookup Guide for the FET Shield. We are going to hook GND to GND, VIN to 3V3 and Pin2 to Fet2. (you can use any of the Imp pins you'll just need to tweak the software, you can also use any of the Fet pins as long as you also hook your solenoid up to the corresponding Fet output).
Now solder your Solenoid leads to the inner row, labeled 3V3 and 2.
One big problem with using solenoids is that they can store up lots of energy and when you turn them off that energy needs to go somewhere. Rather than using that energy to burn up our FETs we are going to add a Flyback Diode. Get a decent sized diode with a reverse voltage which is higher than your power supply, it can be standard diode or schottky. You will need to add it to the FET board across the solenoid leads with the Anode end (the one with the stripe) connected to the power rail.
-
5Step 5
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.