A Modbus-slave for a handwheel (Propeller)
Nick Mueller
Posts: 815
Hi!
I have built this Modbus-interface (slave) to go to my mill (MAHO 700C). It will handle all the signals (switches, pushbuttons) in a remote-control (a hand wheel for jogging etc.).
Let's start with pictures:
The un-populated PCB (etched by PCB-pool, layout with EAGLE).
Soldering side of PCB. Yes, I made an error in the schematics. Flipped TXD and RXD.
TBC ...
I have built this Modbus-interface (slave) to go to my mill (MAHO 700C). It will handle all the signals (switches, pushbuttons) in a remote-control (a hand wheel for jogging etc.).
Let's start with pictures:
The un-populated PCB (etched by PCB-pool, layout with EAGLE).
Soldering side of PCB. Yes, I made an error in the schematics. Flipped TXD and RXD.
TBC ...
Comments
Board populated.
LCD showing some message.
TBC...
Connections to the outside.
Also needed an RS232 to RS485 converter. I'm already awaiting the first time I connect a DSub-9 the right way.
TBC...
And here part of the control. Not showing the Modbus-interface.
Technical data:
* 24 TTL outputs. Enough to drive a LED
* 24 TTL inputs (with pull downs).
* In and out is done with shift registers. 3 * 74595 & 3 * 74166
* opto-isolated RS232 (with an MAX232). Does up to 115200 Bd.
* isolated two-wire (half duplex) RS485 with an ADM2483, also up to 115200 Bd.
* bus (4-bit) to the LCD (a EA DIP204B).
A few jumpers and LEDs for configuration and signaling.
Code is written with ImageCraft's C-compiler.
Response time (from last bit received 'till first bit sent) is 640 µs.
The LCD is written to over Modbus by writing to 40 assigned registers (a Modbus-register has 16 bit). A complete screen update takes 2 ms at the control.
The software on the Prop also has a configuration menue (by connecting a terminal to the RS232 and setting a jumper). Base-addresses for coils, inputs and LCD can be set. Also baudrate, ASCII- or RTU-mode, response-delay, end-of-message-time-out for RTU and other things I forgot. :-)
Nick