MDB RS232 Quick Start
MDB RS232 Quick Start
SPECIFICATIONS
Communication format:
Baud rate: 9600 Start bit: 1
Data bits: 8 Parity: NO
Stop bit: 1
PC data Send: Hex
PC data Receive: ASCII
Hardware Specification.
Power Min 20 VDC ( Normal working voltage 24...30 AC or DC )
Consumes an idle current < 0.05A (No MDB payment device connected)
Cable MDB connector, Standard RS232 serial cable and DC2.1 Power connector
Dimensions approx. 100 x 42 mm (Not include the cables)
Weight approx. 100 g
Page 1 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
Below is the picture of two types of MDB-RS232, the same function and protocol ,the only
difference is Three LED version will enable the payment device from the start and Five LED
version start with disable status for payment device and user need to use the enable command
to enable.
Page 2 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
(2) Power connector for AC/DC power supply (Normally we use the DC24V)
(3) MDB connector to bill acceptor,coin validator or card reader
(4) GPIO to Raspberry Pi board (Use RXD, TXD, GND and Ouput 5V to Raspberry pi)
(5) Serial port to PC (Can use this port to test with PC software)
Installation is relatively simple; there are only three connections that must be made for full
functioning of the device. There are connectors on the MDB adapter box.:
One cable plugs into a 24VDC power supply. (When connecting the DC24V power supply,
there is no need to consider the specific polarity. The 6-pin Molex connects to the MDB devices.
The final connector is a DB-9 and connects into the back of the computer or any other main
board with RS232 port. There should be an open port on the back of the computer labeled
“SERIAL2” or “COM2.” If you only has the USB port on your computer,then would be easy for
you to order a RS232/USB adapter.
For MDB-RPI board,has two serial port to PC and also to Raspberry pi board GPIO.Also it
will supply the DC5V voltage for Raspberry pi board.
After connected the device,and then Apply power on with DC24V. Check for “Power Status”
LED on the box (RED led) indicating power is OK.
If the MDB device is properly connected and working properly,then the “MDB Status” LED
should start to flash.
On the MDB-RS232 box also has another “PC Communication” LED,that would be flashing if
has any data sendt from MDB-RS232 box to PC.
Software
The MDB-RS232 sends information generated by the MDB device directly to the PC via RS-232
serial communication. There is no need to poll each MDB device. This is done by the
MDB-RS232. By default the MDB-RS232 will poll all known MDB devices. The MDB-RS232 then
sends data to the PC if there is activity. The information sent to the PC is send as bytes in
hexadecimal. For activity data,the first byte sent is the device ID. For example 30 XX means that
a bill validator has sent information. Whereas 08 XX means that a coin mechanism has sent data.
Consult the MDB V4.2 command specification for commands specific to your MDB device.
Page 3 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
How to use the command to communicate with the MDB-RS232 adapter box?
Data sent and reply are all compabitle with the MDB protocol.
PC command: Just use the same command as the MDB protocol for VMC
PC received data1: Any data sent back according to PC query instructions, that is the same
format as the MDB protocol,no need to add the first device ID byte
PC received data2: Any activity data from payment device will be sent to PC automatically
and the first byte is the device ID
For example, Coin acceptor setup command: 09
After sent the data 09 from PC , then adapter box will read and send back the coin acceptor
setup information: 03 11 56 05 01 00 03 01 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 76
For example, Bill acceptor enable command: 0C FF FF FF FF
After sent the data 0CFFFFFFFF from PC , then adapter box will send to bill acceptor and
send back the validator response Data: 00
Above PC received data,don’t have the device ID at the first byte,but following data will have
Activity data from coin acceptor,For example a coin is accepted will be sent to as: 08 51 00
51 00 is the activity data from coin acceptor and when report the data to PC, MDB-RS232
add the first byte device ID 08h
Activity data from bill acceptor,for example,bill acceptor is disabled will be reported as: 30 09
09 is the activity data from bill acceptor and MDB-RS232 add the first byte device ID 30h
(Just simply noted: Automatically reported data will have the device ID byte)
Page 5 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
Send out a 36h to the Bill Validator—It will respond with 2 bytes Z1-Z2
For example,if the bill stacker is not full and already stacked 3 pcs bills,then would reply 03 03
BILL VALIDATOR
All values are in hex MDB data from Bill Validator to the PC
Bill Accepted
$1 30 80 09
$2 30 81 09
$5 30 82 09
$10 30 83 09
$20 30 84 09
Bill Returned All valid bill types disabled in software
$1 30 C0 09
$2 30 C1 09
$5 30 C2 09
$10 30 C3 09
$20 30 C4 09
Bill Held In Escrow
$1 30 90 09
$2 30 91 09
$5 30 92 09
$10 30 93 09
$20 30 94 09
Bill forcibly Removed
$1 30 A1 09
$2 30 A2 09
$5 30 A3 09
$10 30 A4 09
$20 30 A5 09
Page 6 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
COIN ACCEPTOR
All values are in hex. DATA RECEIVED FROM MDB AND SENT TO THE PC
NICKEL 08 50 00 08 50 06 08 40 4C
DIME 08 51 00 08 51 08 08 41 6B
QUARTER 08 52 00 08 52 06 08 42 4B
QUARTER (1) 08 52 00 08 52 06 08 42 15
$1 CANADIAN* 08 44 00
$2 CANADIAN* 08 45 00
* Dollar coins are routed directly to the cash box
MDB STATUS
01 Escrow Request
02 Changer Payout Busy
03 No Credit
04 Defective Tube Sensor
05 Double Arrival
06 Acceptor Unplugged
07 Tube Jam
08 ROM Checksum Error
09 Coin Routing Error
0A Changer Busy
0B Changer was Reset
0C Coin Jam
21 Coin not recognized/slug. Returned
Upon startup one of these values below may be sent to the PC – These are the VMC
Commands.
08 Reset
09 Status
0A Tube Status
0B Poll
0C Coin Type
0D Dispense
Page 8 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
Page 9 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
Command List:
1401 Enable card reader 1400 Diable card reader
1402 Cancel card reader 1300000A0001 REQUEST VEND
1301 VEND CANCEL 13020001 VEND SUCCESS
130500640001 CASH SALE 1304 SESSION COMPLETE
1500 REQUEST REVALUE 1700 REQUEST ID
110001000000 Config the card reader 1101FFFF0000 Setup the max and min price
READER: 03FFFE Reading a valid card and wait the Vend selection
VMC: 1300000A0001 VMC command to card reader after Vend selection
READER: 00
READER: 05000A Card reader send to VMC, confirm the good dispatch
Page 10 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
VMC: 13020001 VMC tell the card reader,already dispatch the selected goods
READER: no reply
VMC: 1304 end the section.
READER: 07
Page 11 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
port to work as the VMC.Of course, if the main controller only has the USB port.then will use a
USB version. And install the USB Chip FT232RL driver to create the virtual com port in the main
controller.
4. If can supply more documents to facilitate the development of applications?
Answer: The MDB box we provide is to forward the data uploaded to the PC by the MDB
payment device. The documents we provide can only make it as easy as possible for customers
to understand the process of sending and receiving data and the structure of the data. As for
the commands of the host, the design of the user's host software requires the user to design
the control process after having a detailed understanding of the payment device and the MDB
protocol. We are not able to provide assistance in customer specific projects and software
design.
5. About the Status reading command of coin acceptor (0F05 command to read the status)
Not all coin validators can report the full working status,especially the old version,even in
Level03,also cann’t provide the proper status report data
Normally after powered on, it should report 01 00 06 00 07 (01/00 means powering up)
Read the status again should report 06 00 06 (coin validator is disabled by default)
After use the command 0CFFFFFFFF to enable,then read status should report with 03 00 03
Must be noted: Some coin validators always report with 030003,no matter in what status and
some only report with 000000. In these cases where the MDB protocol is not followed, please
consult the coin validator manufacturer. Not a problem that MDB-RS232 boxes can solve
6. How to use the 0F02 command to payout the coins
Following is the samples to payout the coins:
Firstly from the setup command 09 to read the configuration data
03 11 56 05 01 00 03 01 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 76
From this configuration data, then two type coins, coin value is 0.5$ and 1$
Then use the 0A to check the tube status, which type and how many pieces in the tube
For example: 00 00 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04
then have two type of the coins and 03pcs 0.5$ and 1pcs 1$
So while the program is running, it must constantly check the status of the TUBE, so
that it can know in real time how many coins can be paid out.
Then you can use the payout command
0F 02 01 to payout one pcs 0.5$ coin.
0F 02 02 to payout one pcs 1$ coin or 2pcs 0.5$ coin
That means you must have the coins in the tube and also that can be read by the 0A
command,then can be payed out.
7. When using a coin validator, a few coins were initially put in, but when using the 0A0A
command, the returned data value did not correspond to a change in the number of coins.
Normally Coin validators have coin tubes that cannot detect the value of coins when the
quantity is small. That is, a minimum quantity needs to be put in to ensure the special coin
sensor can detect it.
Additionally, Don't expect to put in a few coins and use the 0A0A command to accurately detect
a few coins. The correct use of the 0A0A command is to detect dynamic numerical changes
Page 12 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
during the operation of the coin dispenser. For example, during the operation process, if a coin
is put in, the 0A0A value will increase accordingly. When we use the PAYOUT command to
dispense a coin, we also use the 0A0A command to confirm the success of the change and the
corresponding coin value change.
Understanding this allows for better use of the 0A0A command.
8. What is the difference between normal MDB-RS232 and the 2020 Version MDB-RS232?
Normal MDB-RS232 will send the enable command to the connected MDB coin acceptor, bill
acceptor and the cashless device, but the 2020 Version MDB-RS232 will not do the job, just start
to poll the slave payment devices and VMC will need to send these commands. So if we connect
the coin and bill acceptors to MDB box and powered on, Even PC is not connected, Normal
MDB-RS232 will enable the coin acceptor and bill acceptor and is ready to accept the coin or
bills. But V2020 Version box, after powered on, all payment devices are in the disable status.
11. Can the MDB-RS232 adapter support the age verification device interface?
Due to legal restrictions, a variety of products are only allowed to be vended via vending
machines by checking the customers age. The age and the rules vary from country to
country. This is i.e. related in some countries to cigarettes or alcoholic products. Some
services or product contents may restrict a different age, related to the vending machine,
this needs different ages to be checked within the same machine.
We also provide a specific MDB-RS232 box that can support age verification interface. But not
all MDB boxes support it by default. Need to consult when ordering.
12. Can the MDB adapter support two cashless payment devices?
After the MDB-RS232 box is started, it will POLL and test several MDB devices, including Coin
acceptors (Address:08H), Bill acceptors (Address: 30H), Cashless payment device 1
(Address:10H), and Cashless payment device 2 (Address:60H). In addition, Our specific
“Engineer” version will also support AGE verification device (68H) and USD devices (40H). Of
course, most customers only need to purchase standard equipment.
Of course, it should be noted that we also have a version with three LEDs on the panel, which is
also used by many customers, but only supports Bill acceptor, Coin acceptor and Cashless device
01. So If you need to support more devices, please pay attention to purchase the latest version,
or consult customer service before order.
Page 13 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
How can we connect the Pulse type coin acceptors or bill acceptors to PC ?
Answer: WAFER also have the PULSE-PC adapter box,that is used to connect the pulse type
payment device to computer RS232 port.
We also can order the samples from: http://cnkiosk.aliexpress.com
How can we develop a mobile payment solution for existing vending machine ?
Answer: WAFER have the 3G or 4G or LAN version payment module for selection.
We also can order the samples from: http://cnkiosk.aliexpress.com
Where can we get more further information and get the fast technical service ?
http://www.waferlife.com/en/MDB2PC-PC2MDB.html
Page 14 of 15 http://www.waferlife.com
MDB-RS232 Interface Adapter for MDB Coin Changer Bill Acceptor and MDB card reader
Customer service:
Both pre-sales and after-sales can receive help and advice through our online skype technical
support.
Email: [email protected]
Web: http://www.waferlife.com
Tel: 0086-21-51870528
V2023-V0803
Copyright waferstar
Page 15 of 15 http://www.waferlife.com