Blog Archive

The Hackerspace recently acquired a coin acceptor from Sparkfun. We brainstormed a bit and decided that a vending machine was the best use of such technology and work began. The coin acceptor is programmable and can be trained to accept up to three coins, and upon accepting a coin outputs a configurable pulse train. There is some sample code available but we had issues making it reliable and modifying it to work like a regular vending machine, so we cooked up our own available below. TheOtherMike came up with a neat little trick of using the serial port to count coin pulses much more reliably. Though we did find that building up a static charge and half inserting a coin would cause it to increment without actually inserting a coin, this was solved with a decoupling cap on the coin acceptor power rails. Once we got the basic code working we added an HD44780 type LCD to display prices and how much had been deposited.

We plan on adding a handful of new features such a numeric keypad to punch an item number, and debug commands to see how much is in the acceptor and to display inventory. In keeping with the Hackerspace tradition of making something slightly less useful we are also going to add an option to pay less but in return the machine does something annoying. Ideas so far have been attaching a siren, attaching a large off balance motor to shake the machine, and using a camera flash circuit to shock people in return for the discount. Updates will be posted as they develop.

Current Code:


//developed by TheOtherMike and Swiss
 //Licensed under the beerware license
 #define COIN1 2 //type of coin that generates 2 pulses
 #define COIN2 3 //type of coin that generates 3 pulses
 #define COIN3 1 //type of coin that generates 1 pulses
 #include
 #include

LiquidCrystal lcd(8, 9, 10, 11, 12, 13); //HD44780 type display assumed
 SoftwareSerial mySerial (15, 16); //software serial ports, connect COIn or COUNT wire from coin acceptor to RX

int total = 0; //variable for total value of coins
 int total1 = 0; //how many dollars should be in the acceptor
 int dispense1 = 100; //variable for an item worth $1, total must equal this for it to dispense
 int nickel = 5; //set coin names and value here
 int dime = 10; //set coin names and value here
 int quarter = 25; //set coin names and value here

void setup() {
 Serial.begin (9600); //for serial debugging
 mySerial.begin(9600); //software serial to count pulses from coin acceptor
 lcd.begin(16, 2); //this location will vary by lcd size
 lcd.print("Everything $1.00"); //welcome message
 }

void loop() {
 while(mySerial.available()){
 delay(350);
 char count = mySerial.available();
 while(mySerial.available()) mySerial.read();
 mySerial.flush();
 switch(count){
 case COIN1:
 Serial.println("Dime Inserted");
 total += dime;
 break;
 case COIN2:
 Serial.println("Nickel Inserted");
 total += nickel;
 break;
 case COIN3:
 Serial.println("Quarter Inserted");
 total += quarter;
 break;
 default:
 Serial.println("Error!");
 break;
 }
 if(total >= 100) {
 lcd.setCursor(0, 1);
 lcd.print(" ");
 lcd.setCursor(0,1);
 lcd.print("Enjoy!");
 digitalWrite(13, HIGH);
 delay(1000);
 digitalWrite(13, LOW);
 total = 0;
 total1++;
 }
 else{
 lcd.setCursor(0, 1);
 Serial.print((100 - total), DEC);
 Serial.println(" needed");
 lcd.print((100 - total), DEC);
 lcd.print(" needed");
 }
 }
 }

Hi folks. A lot of you know about this, but I wanted to make sure we got the word out. The workshops start this Sunday, March 3rd!

Come on down for some hands on work with Arduino as we build out some cool projects for the upcoming Lucidity Festival (http://lucidityfestival.com)
Upcoming Workshop: Artists & Maker’s Introduction to Microcontrollers.
Learn how to make your projects electronic and interactive with microcontrollers!
Have you ever thought about adding an interactive “Wow!” to a project you’re working on? Microcontrollers, like Arduino, are emerging as the ideal way to create and program interesting electronic interactions using a wide range of input and outputs: buttons and buzzers, bells and lights, lasers and vibrators, video and sound. Everything customized to blink or buzz or move exactly when you want it to.
Fishbon (http://fishbon.org) and the Santa Barbara Hackerspace (http://sbhackerspace.com/) will be running a series of workshops to help creative people make interesting things with microcontrollers. The workshops will be held at the Pescadrome located at: http://goo.gl/maps/uoyeC
The first four Sundays in March, 10am to 12pm.  $15 per person per week. Bring an Arduino (Uno, Duemilanove, or any full size compatible) and a laptop. We’ll provide the rest for a self-driven, tutored introduction to microcontrollers, combining hands-on instruction, fun projects, a clear grounding in the terminology and setup, and plenty of free time to pursue your own ideas.
Now available at Radio Shack for $30
Or a generic version for $17.99 +S&H (no ftdi needed)
Also the protoshield for $10 is HIGHLY recommended.
Contact Joe Andrieu (joe@andrieu.net) to sign up, or for questions. Additional details will be emailed to all who RSVP.
P.S. We’ll also be working on microcontroller projects for Lucidity, including a major Fishbon/SB Hackerspace collaboration that will float up in the sky!

 

The Hackerspace recently acquired a Yamaha YK440 scara robotic arm, QRC-2 controller, and manual. There are all sorts of things this could be used for.  However before we start getting creative with it it needs a little TLC. Currently the controller powers up but it seems that the power supply is not sending power out to the arm. To remedy this the controller has been disassembled and some testing done but no luck as of yet.  we’ll update this post with progress as we work on this shiny new toy.

UPDATE:
After a fair amount of troubleshooting, disassembly, we have given up on using the original controller. Since this arm uses DC motors with optical encoders as servos, building a basic driver for this should be fairly straight forward. The challenge we be supply the 75v at 2 amps to the four motors and driving them, as that will require a fairly beefy power supply and H-Bridge setup. More details on our driver and PSU to come.

a yamaha yk440 and qrc-2 controller

a yamaha yk440 and qrc-2 controller


1 2 3 4
What is the Hackerspace?

We are a group of makers and developers in the Santa Barbara community who love building things. The Hackerspace has a Makerbot printer, piles of Arduinos, and much, much more. Learn More →
Become a Member

Membership Levels
Location

5782 Thornwood Dr
Goleta CA 93117

Contact Us

Current Status

Current status of the Hackerspace: "awesome".
Twitter Feed

Find out what's happening, right now, with the people and organizations you care about.


Bad Authentication data.
Copyright 2012 Builder - Company. Design by OrangeIdea