Introduction: A Monitor That Rings a Bell Every Time a Person Supports a Crowdfunding Campaign
When we were being crowdfunded, we built an Indiegogo monitor that rang a bell every time a new person supported our campaign and purchased a Kinoma Create device. We want to share this project with you.
Kinoma Create runs an app that scrapes our Indiegogo campaign page periodically and displays the total amount contributed on the screen. When new contributions are made, it physically rings a bell by striking it with a solenoid.
The core parts list for this project is small. We need a solenoid to ring the bell, batteries to provide a high-voltage power supply to the solenoid, a protection diode to keep our batteries and Create safe from the kickback of the solenoid, and a transistor to allow the Create to switch the high-voltage power on and off. Beyond that, we just need some breadboard jumpers, a resistor, and a breadboard to stitch it all together.
- Download Kinoma Studio
- Kinoma Create
- Breadboard jumper wires
- 12-14 AA batteries and battery holders (something like this would do, though you would need two)
- General purpose NPN Transistor (we're using a BC337)
- Schottky-type protection diode (we're using a MUR420)
- 1 kilohm resistor
- 24v solenoid
- Desk bell
- Post-it Notes
Step 1: Breadboard Wiring
We start by wiring everything up. The connections to/from the Create are very simple: one GPIO pin to drive our transistor “switch” and one ground that will be tied to the battery pack ground. We bring the + and – sides of the solenoid assembly (discussed below) back to the breadboard. Finally, two jumpers connect the battery pack to the power rails of the breadboard.
A: The white jumper connects a Kinoma Create GPIO to the breadboard. The green jumper is a ground.
B: The yellow jumper connects our high voltage power supply to the protection diode/solenoid assembly. The green jumper is the ground side of the protection diode/solenoid assembly.
C: The red and black jumpers connect the power and ground from our high voltage power supply to the breadboard.
Step 2: Breadboard Connections
We need two components on the breadboard: a transistor (B) that acts as a switch, allowing Kinoma Create to turn on and off the high-voltage power supply to the solenoid and one 1 kilohm resistor (A) to limit draw along the path from Kinoma Create's GPIO to ground.
- GPIO from Kinoma Create to 1 kilohm resistor to Base leg of the transistor.
- Emitter leg of the transistor to ground rail of the breadboard (common ground between battery pack and Kinoma Create).
- Collector leg of the transistor to ground side of the protection diode/solenoid assembly.
Step 3: Protection Diode
We need a protection diode to prevent unexpected consequences from the kickbase phase of our solenoid. It is best to use a fast-responding Schottky-type diode for this purpose. The cathode side of the diode (with the grey marker) connects to the high-voltage power supply from our breadboard and the + side of the solenoid.
The anode side of the diode connects to the collector leg of our transistor and to the – side of the solenoid. Being the rough-and-tumble prototypers that we are (and because our soldering iron was stuck in a crate being shipped back from SXSW), we have combined the components and jumpers using electrical tape.
Step 4: Additional Power for Solenoid
We are using a high-voltage solenoid to get a nice, crisp ring out of our bell. Kinoma Create (like most platforms) can output a maximum of 5v—plenty for most purposes, but not nearly enough here.
So, we have built a high-voltage power supply from AA batteries. Here, we're using 16 AAs wiried in series, for a total output of roughly 24v. More electrical tape to keep everything together.
Step 5: Solenoid and Bell
The last major challenge is getting the solenoid to strike the bell in a satisfactory manner. We have achieved the desired effect by elevating the solenoid on a stack of post-it notes and positioning it about 4mm from the bell. The solenoid, the bell, and the post-it stack are all affixed with double-sided scotch tape.
Step 6: Ringing the Bell
There are two particularly interesting aspects of the application code. The first is what we use to ring the bell: a short script that is invoked every time the main application detects that a new contribution has been made to the campaign.
There are a few interesting things to see in that snippet. The first is that these scripts can be parameterized. Here we use a parameter to specify how many times in a row to ring the bell. Second, setting GPIO pins is simple: just specify an array of the pins to be set and a value. Third, we can delay execution of the script to achieve useful effects (in this case, waiting for the solenoid to extend before allowing it to bounce back). These delays have no impact on the rest of our application—they are local to this script.
Step 7: Scraping the Indiegogo Campaign Page
In this snippet we see the handler that fetches and parses the Indiegogo campaign page. When it is invoked, it invokes a Message to request the web page. When that completes, we look for a regular expression to find the currently contribution total for the campaign. We update the code.
To see these snippets in context, check out the full sample code.
You’ve done it! Or if you got stuck along with way, we’re here to help — come visit us at our forum and let us know how we can help.