dcristut
Posts: 10
Joined: Sat Jun 24, 2017 3:27 pm

Multi-drop bus and RPi

Sat Jun 24, 2017 3:36 pm

Hello,

Can someone help me with more information concerning a connection between RPi 3 and a vending machine via a multi-drop bus, please?

I think a RS485 adapter is needed but, due to the 9 bit structure of the MDB packet, I am not sure it will do the job.

Thank you,
Daniel

wh7qq
Posts: 1448
Joined: Thu Oct 09, 2014 2:50 am

Re: Multi-drop bus and RPi

Sun Jun 25, 2017 7:25 pm

If you simply search google for "mulit drop bus" there is an abundance of information there about the interface.

dcristut
Posts: 10
Joined: Sat Jun 24, 2017 3:27 pm

Re: Multi-drop bus and RPi

Sun Jun 25, 2017 7:45 pm

- did that
- found this site
- Stop
- go back to square one ....

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Multi-drop bus and RPi

Mon Jun 26, 2017 3:01 am

dcristut wrote:vending machine via a multi-drop bus

a RS485 adapter is needed but, due to the 9 bit structure of the MDB packet
-a- RS485 is a electric specification ( voltage difference serial signal )
used as 2 (3 with GND ) or 4 ( 5 with GND ) wire system what can be used for multi drop
( 32 devices on that (2) wires )
it requires a final resistor 100 .. 120 ohm ( minimal one, on a longer wire 2 ( on both ends )
and can be one long cable ( not a star connection ) 1200m ( but depending on Mbit/s used )

-b- the protocol used on that serial link hardware is something completely different.
it could be for example modbus multidrop

-c- as you have a device you want to connect you must find out all about what that device is using?
(a) and (b)

-d- for using RPI as partner ( like modbus multidrop master ?) you must find a RS485 adapter what fits to GPIO or USB
and find out if that used protocol software ( as driver ) is available for RPI, as i doubt you could do that protocol code.

dcristut
Posts: 10
Joined: Sat Jun 24, 2017 3:27 pm

Re: Multi-drop bus and RPi

Mon Jun 26, 2017 4:08 am

Thank you,

I am aware of the difference between RS485 as an electrical standard and MDB.
All I want is to know if I can use an 485 RPi adapter to connect to a MDB bus and/or,
even better, if there is someone who already did that and how.
Or do I need some special MDB adapter for RPi? (if there is one)

I've just begun this project and any information is great.

Thank you again,
Daniel

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Multi-drop bus and RPi

Mon Jun 26, 2017 10:46 am

check out
http://www.coinco-europe.com/manuals/US ... En_017.pdf
electric and low level protocol in a ready box

dcristut
Posts: 10
Joined: Sat Jun 24, 2017 3:27 pm

Re: Multi-drop bus and RPi

Mon Jun 26, 2017 11:44 am

Sounds great. Thank you again.

Have a nice day!

KLL wrote:check out
http://www.coinco-europe.com/manuals/US ... En_017.pdf
electric and low level protocol in a ready box

mmame
Posts: 1
Joined: Tue Dec 19, 2017 5:33 pm

Re: Multi-drop bus and RPi

Tue Dec 19, 2017 5:39 pm

As I understand, the coinco adapter is dedicated to be used with a Coinco coin changer - but I could be wrong.

You can also build that stuff from scratch (Hardware with 9 bit Uart, deal with fancy hard low level mdb timeout requirements....

or maybe use a MDB HAT like this....?
https://pinout.xyz/pinout/mdb2pi_hat

dcristut
Posts: 10
Joined: Sat Jun 24, 2017 3:27 pm

Re: Multi-drop bus and RPi

Tue Dec 19, 2017 6:41 pm

Thank you mmame,

That HAT looks exactly like what I was looking for. It is pretty expensive though.
I have pretty much advanced with my project and I am using one of these:

http://www.vendingtools.ro/en/content/r ... raspislave

Thank you again,
Daniel

perdidor
Posts: 3
Joined: Thu Jan 26, 2017 3:27 pm

Re: Multi-drop bus and RPi

Mon Apr 09, 2018 5:27 am

Hello guys.
You can't connect RPi serial directly to MDB bus due to 9-bit format and strict MDB timings. Messages between MDB peripheral and RPi need to be converted on-the-fly and in real-time.
Check this link it will help: https://github.com/perdidor/Arduino-MDB-UART

david.su
Posts: 1
Joined: Sun Feb 24, 2019 10:03 pm

Re: Multi-drop bus and RPi

Sun Feb 24, 2019 10:07 pm

Check out https://mdb.technology
Some info about the technology and both a pi hat as well as a usb based solution.
Seems the software interface is really easy to use.

David

thallwright
Posts: 3
Joined: Sat Mar 30, 2019 1:31 pm

Re: Multi-drop bus and RPi

Wed Apr 24, 2019 7:29 am

It appears to me that most of the devices advertised are designed to allow a rpi to act as the cashless payment device, and to connect to a normal vending machine controller.
Does anyone know of any hardware that facilitates the opposite?

The rpi is the master device that controls the machine, and sends commands to a MDB based cashless payment terminal such as the Nayax VPOS to actually take a payment from people, then send confirmation back to the RPI so the machine can release a product

https://www.nayax.com/cashless_payments/vpos/

I have a feeling this might be the best option so far;
http://www.vendingtools.ro/en/content/r ... -raspivend

negrotico19
Posts: 4
Joined: Fri Nov 11, 2016 6:43 am

Re: Multi-drop bus and RPi

Wed Apr 08, 2020 4:53 am

Re: Multi-drop bus and RPi
Quote thallwright
by thallwright » Wed Apr 24, 2019 1:29 am

It appears to me that most of the devices advertised are designed to allow a rpi to act as the cashless payment device, and to connect to a normal vending machine controller.
Does anyone know of any hardware that facilitates the opposite?

The rpi is the master device that controls the machine, and sends commands to a MDB based cashless payment terminal such as the Nayax VPOS to actually take a payment from people, then send confirmation back to the RPI so the machine can release a product

https://www.nayax.com/cashless_payments/vpos/

I have a feeling this might be the best option so far;
http://www.vendingtools.ro/en/content/r ... -raspivend
Hey, any comments with the outcome of this project? I am participating in something very similar and wondering if you were able to communicate with this Nayax Cashless System.?++ @thallwright

thallwright
Posts: 3
Joined: Sat Mar 30, 2019 1:31 pm

Re: Multi-drop bus and RPi

Wed Apr 08, 2020 7:46 pm

I found that MDB was a fairly outdated protocol that made communication between the two devices ver difficult

The payment terminal i got hold of communicated with a telemetry board via ethernet, and when pluggin in a RPI converter board this didnt really communicate at all.

I realised it would be much easier to interface from the RPI directly to the telemetry board via ethernet, rather than having an additional converter board sitting in the middle

ie payment terminal -> telemetry board (with sim card etc) ----(ethernet)-->RPI
should be much better than
payment terminal -> telemetry board (with sim card etc) ----(MDB)--> MDB to RPI converter---(Serial)---->RPI

This problem however has led me to put this project on hold.
Interested in any solutions floating around out there

mwrich4
Posts: 115
Joined: Wed Jul 25, 2012 1:24 pm
Location: Stuart, Florida

Re: Multi-drop bus and RPi

Thu Apr 09, 2020 6:19 am

RS485 is the electrical format.

MDB implementation can vary without more specs. 9-bit is common for microcontrollers using CANBUS or similar. MDB doesn't need a dedicated master, but that depends on the implementation of the particular protocol. If you don't have system specs, successful communication is a shot in the dark.

I serial monitor helped me a lot. I made a sniffer to read input and output into different text colors with hex decoding using REALterm. A logic analyzer or oscilloscope may help as well to reverse engineer the data frame details.

The last system I made had a supervisory module connected to 10 subordinates within the system enclosure. All modules were autonomous and could initiate data transfers if good collision detection was in place.

Return to “Beginners”