Page 1 of 1

Multiple Serial Device Interface

PostPosted: Tue Aug 08, 2017 10:22 am
by IoT Cashless
Hi.
Please welcome me as a new guy trying to learn open source electronic devices.
I have a project to set an interface between smartphone apps online payment web server to a self vending machine.
The situation is.
1. Self vending use TTL serial with no addressing.
2. Command in multiple byte HEX Code
3. Link at most 15 unit machine in 1 shop.
The idea,
1. Use TTL to RS485 adapter pull up to a gateway(Currently have Arduino YUN, Maybe change to Raspberry PI)
2. Pull 1 to 1 connection for each machine.
Question:
1. If Raspberry Pi HAT could be connect to 15 unit serial port?
2. Do I have to use 4 port HAT and stack to 4 unit to get 15 port?
3. My boss say have to install REST API to the Raspberry PI so it can send specific hex command.
Please help because i'm not tech savvy person. Just learning as it flow.
Thanks

Re: Multiple Serial Device Interface

PostPosted: Wed Aug 09, 2017 6:03 pm
by Idris
Hi Mr Amir,

Question:
1. If Raspberry Pi HAT could be connect to 15 unit serial port?
Raspberry Pi only have 1 serial port. You might need specific IC to multiplex serial, for example MAX14830 - Quad Serial UART with 128-Word FIFOs.

2. Do I have to use 4 port HAT and stack to 4 unit to get 15 port?
You need 4 units of MAX14830 to multiplex 16 serial port.

3. My boss say have to install REST API to the Raspberry PI so it can send specific hex command.
I'm not sure about REST API, however you can develop a python program to access the Serial port.

Thanks, hope this helps.

*This is only a suggestion, I never test or develop this kind of project.