MDB to UART: hooking up a vending machine to an Arduino

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
swmmrmn
 
Posts: 2
Joined: Sun Apr 03, 2011 12:17 am

MDB to UART: hooking up a vending machine to an Arduino

Post by swmmrmn »

I was hoping this forum might be able to give me some perspective on how easy/difficult it would be to hook-up a vending machine to an Arduino. I have a pretty solid background in programming (e.g. C, Java, etc), but basically no understanding of basic circuits and the different serial interfaces.

Based on the little bit of research I've done so far, it sounds like Arduinos use UART while most modern vending machines use a MDB-based protocol (the official vending machine standard can be found here: http://www.vending.org/technology/MDB_Version_4.pdf). It'd be great if the solution was as simple as connecting the proper pins from the MDB connector (see section 4, page 7 of the MDB PDF) to the appropriate pins on the Arduino, but I'm guessing there's probably more to it than that. Any suggestions or pointers to similar projects would be greatly appreciated. Thanks!

User avatar
Franklin97355
 
Posts: 23940
Joined: Mon Apr 21, 2008 2:33 pm

Re: MDB to UART: hooking up a vending machine to an Arduino

Post by Franklin97355 »

4.4 example on page 56 seems to imply it will work with the addition of a transistor between the MDB and the Arduino.

User avatar
opossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am

Re: MDB to UART: hooking up a vending machine to an Arduino

Post by opossum »

Do want to do master or slave? The circuit is different for each.

User avatar
len17
 
Posts: 394
Joined: Sat Mar 14, 2009 7:20 pm

Re: MDB to UART: hooking up a vending machine to an Arduino

Post by len17 »

As to the data protocol, according to the MDB spec every byte has an extra "mode" bit so I don't think you can use the Arduino's Serial library to send & receive the data.

I think the Arduino's UART can actually handle 9 data bits but you'd have to program it directly, basically duplicating the Serial lib.

Alternatively you could use the digital I/O functions, like the SoftwareSerial library.

swmmrmn
 
Posts: 2
Joined: Sun Apr 03, 2011 12:17 am

Re: MDB to UART: hooking up a vending machine to an Arduino

Post by swmmrmn »

oPossum wrote:Do want to do master or slave? The circuit is different for each.
I'd like to setup the Arduino as a slave.

betocom77
 
Posts: 1
Joined: Thu Mar 15, 2012 5:17 am

Re: MDB to UART: hooking up a vending machine to an Arduino

Post by betocom77 »

Did anyone happen to finish this project?

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”