Tag Archives: vendingmachine

Vending Machine Update

As per my post on open-manufacturing,
“I’m part of a student-run shop, MITERS, at my university, and we considered stocking things like breadboards and arduinos (and other emergency project materials), but that’s really not in our budget as a club. We sort of have a “if the person who knows where the secret cache and can deal with money” system set up, but I wanted to make a countertop vending machine. Used vending machines on ebay are hundreds of dollars and gigantic (we’re tight on space). I decided that the relative portability/stealibility would be fine at MITERS since everyone that comes in is a student.”
From January 13th 2013:

i “finished” my vending machine prototype from mas.863 all in one go, it took ~a day to find all of my supplies (i swear, i had to think like a squirrel to figure out where i buried all my microcontrollers). by finish i mean only that the dispensing aspect works without being plugged into a computer. lasercut wood, buttons and spring off the internet, servos modded to be continuous rotation, arduino uno, and a wall wart. toward the end you can see some of the issues: i made the spacings large to accommodate larger items but… it doesn’t actually work that way, etc.

Here is a video of it failing:

One thing I did learn is that wall warts _will_ reset your arduino uno continuously if you are trying to draw current from them.

a 9V wall adapter: 5V to 23V…

I ended up adding a giant (1000+ uF) cap to smooth out the huge voltage swing, and that solved my stranger errors. I made a short video on this topic. http://www.youtube.com/watch?v=AHoJZ-IKcRs
“300uF (not shown) may not solve your external power supply issue, but 3300uF will! 
In other words, if your arduino sketch runs on usb power but not external power (i.e. crappy wallwart), add a large smoothing cap across the rails and that might fix the issue x.x
Embarrassingly, I had this issue with a side project at my internship last summer and didn’t know how to fix it.”

In progress pics:

drill out hole to inner diameter

I actually got some that lit up, but only at 24V or something silly

Yea, even at 9V (I think I had a 9V wall wart) they are just barely lit up.
The buttons were from my trip to China, but nowadays you can get arcade buttons from places like sparkfun and adafruit.
The vending machine is set to be dismantled. Maybe one day I will build one from scratch.
The status of the money accepting problem, as per my post on open-manufacturing as well:
“I made this prototype (uh… keep in mind this was mostly made over 48 hrs in final project crunch mode, it was a cardboard prototype that looked like this 24 hrs earlier) but my budget was more like $50 than $200, so I got stuck figuring out how to accept payment, because you really can’t mechanically accept bills. (Maybe some sacrifice can be made where I make a bill reader that’s not $$ because it doesn’t have to check for counterfeits. But then I think something this flimsy is a bit sketchy with lots of cash in it. Hmm. I think for our own use probably an RFID reader + student ID would do the trick). It also has so many mechanical issues (but yay learning things from prototypes). “
eric hunting replied:

That laser cut box shape looks like it could be endlessly customizable. For instance, one might make a front panel with engraved graphics and extend its edges beyond the bounds of the box to accommodate any sort of decorations or stick-on sign graphics.
 It’s interesting how many vending machines today use those spiral/coil carrier mechanisms. When looking into this I found you could buy these as more-or-less generic modular units made in China that could be used in any cabinet design–though they’re still a bit expensive. So, apparently, there is more of a food chain of standardized parts for larger vending machines today akin to that of general electronics. It seems to me that the popularity of this kind of mechanism may come from its combination of greater reliability and flexibility. Vending machines with these are definitely more ‘solid state’ than those of the past and accommodate a wider variety of items in the same machine, with the ‘tuning’ between product types a matter of software/firmware. Different size item, different spacing in the coil, different number of turns to dispense. I wonder if the pro machines have modules pre-wired for a certain number of turns relative to the product size or if they are programmed by other means. The compromise, of course, is that the machines of the type tend to be rather generic in design because they’re relying on the packaging of the items to attract customers rather than design and graphics on the machine itself. The Japanese recently took a new angle on this, though, with the addition of display windows that double as touch screen displays. So the machine acts rather like a video bill-board when not in use then turns more transparent when you approach it with the window serving as a control panel for choosing items. 

===
Well, that’s all I have to say about vending machines for a long time. I need to dismantle it sometime this summer and free up my shelf space at MITERS.

Happy summer everyone!

I made a video about hexapods.

I made a video about hexapods! yay. I’d estimate it was a full 4 or 5 days working on it, learning final cut pro along the way. It basically covers my journey through 2.007 two years ago, and is meant to be a resource for students in the class.

Note to self: shortcuts: < > ctrl-= alt-w

Meanwhile, I think an instructable a week sounds like an excellent plan for Spring semester senior year.

vending machine / start of epic asia trip

well speed update
made cardboard proto of vending machine, final project of mas.863

then CAD’d and emergency lasercut one, but still didn’t have time to do electronics :/ (buttons are just stuck on there, and i didn’t leave space to route servo wires, and i’m using janky self-made continuous rotation servos / zip tie couplers to springs

but first time really CADing the full thing before creating it! compare hexa-not-quite-dancingpod, which was cut by hand and then CAD’d

anyway, open house happened, then I emergency packed and we took T Red line > south station > lucky star bus to NYC (11:30 pm) … arrive around 4 am and take J nyc metro to JFK airport.

derp! didn’t get on flight seattle > narita, (yay standby) due to some weight balancing fail. (flight left with 34 empty seats)

that’s okay, we got to meet cathy’s family! (cathywu.posterous.com)

well got on next day

ack! have to get on flight narita > taiwan now.

[edit: for more updates on vending machine, see: http://www.orangenarwhals.com/search/label/vendingmachine]

Spring making, round one + glass etching on lasercutter

round bottle did better than I expected, I guesstimated size with ruler and tried to get it roughly straight with respect to the bed. no “lathe”-like turning tool, but I etched a fairly small area — approximately straight then, good enough for laser to focus on.

lasercutter: etching glass — went very quickly. I suspect the anodized aluminum setting may be overkill and can go much faster (perhaps they’re settings for straight up etching metal?).

What was this?
last minute crvftmas (everything you give must be “crufted” aka freely obtained, our hall’s version of secret santa) gift: laseretch lab glass bottles (clean autoclaved) I got off of reuse a while back

I meant it when I said 50 lbs of lab glassware. 4 boxes. I only took about half from the reuse post too…
pre-etch

Had issues due to irregular shape of bottle with placement and getting it straight :/ oh well (you can’t really tell from the photos)

I ended up doing putzputz, winning MASLAB robot, (this year’s hall tshirt design, MASLAB team composed of 4 putzen including dfourie), on the back

Also, thicker bottle could not use due to limit of how deep z wise the bed can move o.o

BTW lasercutter settings for 100kw epilog co2 with gas assist:

200 ppi, 40-60% power, 60 speed.

and more pics on picasaweb as always.
https://picasaweb.google.com/113942194695013581888/LasercutterFun#

Spring making round one — I am still going to investigate manufacturers. but diy:
http://www.instructables.com/id/Make-your-own-springs-in-seconds/
Someone legitimized it in a comment:

“Many years ago I used to make springs this way on a lathe. We used commercially available untempered spring wire and after we finished we heated up the spring to red hot and dropped it into fish oil to temper it.Some times we would make special custom springs by soft annealing standard off the shelf springs and straightening them to salvage the wire. Then we would rewind them to suit the job at hand and re-temper.”

my Emergency!Labduein60minutes!results:

comparison between real vending machine coil off of ebay and my hand-wound in 2 minutes one
I compensated for non-spring steel (unlike Real Coil) by getting thicker diameter (plain steel) wire.

Material acquisition trip to TAGS (right off of porter square T stop in cambridge, MA, next to shaws and radioshack)

hi, receipt for techfair grant. also if you click for larger pic you can see what I bought
everything I could find at MITERS and that I bought, includes some thin spring steel.
Also, ~2” OD pvc pipe I wanted to wrap my spring around
First, safety equipment check:

Well, find out pvc pipe does not fit inside chuck (compare to hole) and is just too small to be gripped by OD jaws.

Definitely too big for drill. I’d considered making an adaptor — smaller pipe that fits in drill with two keys slotted through it, or turned plastic that more closely fits pipe and then has a “handle” that the drill grips — similar to larger sized drill bits. but then weekend passed and emergency!lab dictated I do simpler thing.

Learned about “flipping” jaws, or in this lathe’s case swapping out OD jaws for ID gripping jaws. Thanks shane colton and matthew hon

step one, take jaws out by backing it out all the way with chuck key
they’re numbered 1-3 (or 4) and must be engaged by scroll (spiral thing that turns when you turn the chuck key) in that order to have an even grip

Well I can’t find the right sized ones,

they’re curved. top one’s threads are “inner diameter” gripping, but too small for  the chuck currently on the lathe

so I gave up and used the smaller diameter aluminum rod stock seen above.

starting it was difficult. There was a preexisting throughhole in the (hollow) rod that I stuck the end of the rod through
So, then I twisted it upward and pressed it to the rod with the glove. This was awkward to do. I immediately applied the square steel stock but you can see I had issues getting it pressed against the stock and creating a uniform spacing, since I only had one hand (spinning the lathe with the other). Surprisingly easy and fast.

yea, very uneven result, will need to do more trials (there went $5 of weldable steel rod, ⅛’’). went very quickly, even by hand.
you can see starting out I didn’t get it to follow the rod closely like in the vid, though I am using thicker diam rod

end result again

probably still need use light sensor detect when item vended, safer b/c of uneven nature of coils (can’t dead reckon with degrees of rotation)
==== todo: order light-up buttons, rfid reader, more servos (or hijack from hexadancingpod :/)

(tangentially, this is a ref for designing springs, linked off of makehttp://home.earthlink.net/~bazillion/intro.html)
look how they do it automagically / industrially: http://home.earthlink.net/~bazillion/Trusprings/index.html and sexy video: http://www.youtube.com/watch?v=Ix4-UUelDc4

Nyancat cake mold, working PoV [not so yoyo], vending corkscrew test (mod servo for continuous rotation)

nyancake
Uhh I’ve been doing a lot of blogging and neglecting my other work, so here is minimalist style ftw.

nyancake? nyangummi?

My hall’s thanksgiving (putzgiving, alums come back for this) was two Saturdays ago. I tested out the nyancat cake mold:

for ease of “parameter optimization” runs, I used even-simpler-cake-recipe: cake mix and sprite as the only ingredients (apparently a dieting trick. comes out fine, although for molds probably want to let bubbles settle for a bit after pouring and before intensive mixing).
apply release agent, aka cooking spray / pam — otherwise doesn’t come out well. also,  sprite+cakemix mixture should not be too gloopy. add flour if accidentally pour too much sprite.

many fail results. Here, did not let bake long enough. (much longer than box says — I baked a bit lower temp based on silicone mold research, ~325deg C, and for say 1 or 2 hours)
demolded too quickly, also did not cover in saran wrap to retain moisture afterward
nyancake party~! nyan nyan nyan
probably the best of all my nyancakes. you can see that the minimum mold feature size — the sprinkles — were too small for the resolution of the cake mix and actually resulted in holes.
speed cooling jello in freezer. recipe used: the lego gummies from instructables
nyanjello = almost perfect mold replica. you can see the sprinkles are supposed to stand out, as opposed to how the nyancakes turned out. however, more limited / difficult coloring opportunities with jello than with cake (which you can just apply frosting / food coloring to)
Persistence of Vision Yoyo
I also figured out the issue with the MAS.863 makefiles causing my weird “compiler” bug (actually, compiler options / makefile bug):

Class-based makefile includes:
avr-objcopy -j .text -O ihex ./v0.1.45.out ./v0.1.45.c.hex
man avr-objcopy
       -j sectionname
       –only-section=sectionname
  Copy only the named section from the input file to the output file.
  This option may  be  given more than once.  Note that using this
  option inappropriately may make the output file unusable. >__> <__<
So the class makefiles should be fixed to include “-j .data”The internet says
“The makefile above DOES NOT create a proper HEX image and is a bad example. When creating an  image, not only does the text section (which holds the code) need to be included but the data section (which holds any initialized data) also needs to be included.
The remedy for this is correct .hex rule to to copy the data setion as well
Example:
$(OBJCOPY) -j .text -j .data -O ihex $(PROJECT).out $(PROJECT).hex
http://www.micahcarrick.com/avr-tutorial-digital-output.html

bmayton: that actually explains a lot of odd bugs that I’ve been seeing with people

using constant arrays, since the array data is never getting copied into the
program

So the actual model of what was causing my bug was, I believe, without calling another function the compiler goes ahead and uses the array to insert the correct commands into the compiled code. But when I used a subfunction, the compiler loads the subfunction which the microcontroller calls, but the ucontroller does not have the array data to look up what to set DDRB and PORTB to.

Anyway, then I proceeded to hack together terrible!code and get PoV working. I used oloepede’s sample image ‘cos I’m all about the laziest and quickest tests and ‘cos olopede is awesome.

eheh derp ripped off ISP traces / headers
works fine waving it by hand (without camera extended exposure time, hard to see entire “olopede” message — can see maybe three letters at a time. dead reckoning PoV timing — no sensors.) 

Doesn’t do so hot on the drill. Mess with timing? Although I spun it slow and fast (and in-use yoyo spins quite fast). May require sensors (fan pov as seen on dealextreme — product designer has better idea of speed of motor while yoyo has more variable speed. maybe they used hall effect sensors, ‘cos it was resilient to me slowing down the blades.) to get stable image.

See video:
https://picasaweb.google.com/113942194695013581888/PoVYoyoPersistenceOfVision#5681157457783660930

Vending machine
Right, essentially two weeks until final projects due. Aka time to start cramming on vending machine.

What do I have on hand? Arduino uno, extra servos leftover from when I bought out all the old 2.007 servos., zipties, handheld drill, a corkscrew. Found some rectangular metal thing to act as guiderails lying around MITERS scrap pile. Also found a block of wood lying around the floor.

Mod a servo  to be
continuous rotation servo
(essentially turn it into a cheap RC motor that comes with motor speed controller in a convenient package for mounting) —
aka remove mechanical stop on gear 

apply flush cutters to stop on gear

and remove pot, which like all pots doesn’t turn infinitely — make sure to be gentle ‘cos pot is held in by internal screw, why it doesn’t just fall out normally

see blurry screw at bottom. Also, I wasn’t gentle and cracked the PCB. Maybe it is inevitable for these servos (motor is soldered onto pcb so not much flexibility there) to get to pot screw. Surprisingly the servo still works…
stick pot on outside, chew a hole for it in the casing — i abused flush cutters

see How to Hack a Servo by Daniela Faas http://stellar.mit.edu/S/course/2/sp11/2.007/courseMaterial/topics/topic12/other/Servo_Hack_large/Servo_Hack_large.pdf)

springs / coils
Attach to corkscrew (from real vending machine) I bought off of ebay to see what real mass manufactured ones are like so I can make fake ones DIY like http://www.instructables.com/id/Make-your-own-springs-in-seconds/

Drill out servo horns (1/8” bit fits zipties I found) and attach to corkscrew with zipties

it vends a block! haha. terrible setup is terrible.

Video here:
https://picasaweb.google.com/113942194695013581888/VendingMachineOpenHardware#5681154916854562050

Yea, not a very interesting proof-of-concept (a “duh are you an idiot” one), but it was very satisfying to me.

Oh right, I tried to use hot glue to hold the pot in one place, since that affects how the servo reacts to servo.write() (pot adjusts when it goes fwd/reverse) — I just used
myServo.write(50) with a 0.5 sec delay
myServo.write(90) with a 3 sec delay
myServo.write(130) with a 0.5 sec delay
to calibrate the pot so that servo was completely still at 90. And then attempted to hot glue. a bit flaky– not good enough for long-term banging around but good enough for dirty proto.

yes, i stole arduino from hexarideablepod. arduino uno with a small breadboard on top and 3 male header pins to connect arduino (Vcc, Gnd, and SIG — arbitrarily pin 2 in my case) and servo. unplugged in this pic.

Not clear from pics, but to test it I’m holding the servo still with my hand.