Electrical – Connection between MDB Peripheral and Arduino

arduinocommunicationisolationrs485

I'm working on making a custom vending machine controller using an Arduino as the master. The bill acceptor I'm using implements the MDB communication protocal, which is (I think) a variant of RS-485.

The MDB specs say that the communication is a current loop system. (https://reaktor23.org/_media/projekte/mate_dealer/mdb_version_4-2.pdf section 4.2 page 53) I've successfully sent the reset command using an Arduino's serial port and a transistor to handle the current. However, I am not receiving any information back from the peripheral when I should be receiving ACK (0x00).

I have a transistor with the base pulled high to 5v and connected directly to the peripheral's transmit line. The collector is connected to 5v and the emitter is connected to the Arduino's Rx pin and pulled down to ground with a 1k resistor. The Arduino's ground is tied to the communications common on the peripheral. According to the recommended setup on page 60 of the MDB spec sheet, this setup is what should work. However, I'm still not getting any data back from the peripheral.

The only reason I know the reset is working is because the status LED resets and the motors start up.

If anyone could look at the MDB spec sheet's recommended circuit and reccomend a new or improved setup or just point out anything I missed, that would be great.

Best Answer

That is not RS485, they just drive a opto. Get a scope off ebay; they are cheap. You probably have the serial inverted or something. Basic stuff to check.