-
Notifications
You must be signed in to change notification settings - Fork 0
2 Bus interface (line driver) hardware
The initial inspection indicates that I will need a bus interface to convert between 3V3 logic levels and the 12-15V required for the long line. There are several around!
I note that user Little Chef has proposed a solution using the MCP2003 chip though this is not confirmed tested at the time of writing (23 Sep 24).
I considered other alternatives, mostly designed for I2C, such as the P82B715 I2C Bus Extender.
Based on apparent suitability for the Scantronic situation, availability and price, my choice is the P82B96 dual bus interface. One chip has two channels (clock and data) with both directions (Tx and Rx). It works up to 18V and down to 2V. The outputs are open-collector, so can be pulled up to any voltage within the permitted range. To prevent an output being fed back as an input, and thus locking the bus, non-standard logic levels are used. In brief, the output low level at Sx or Sy is higher than the input low level -- so an output from the chip is not seen as an input, though it will be recognised by 3V3 processors.
I built two experimental line drivers with P82B96 bus interface chips, both based on the Philips application note AN460.
Either bus interface circuit can be used in the final solution -- I will make up my mind after playing with them for a while. The optocoupler solution appears more robust, but takes up more board space and decoupling is not really necessary because the keypad is powered by the controller, so Vcc and Ground are shared anyway.
The first is a simple version with only clamping and flyback diodes added.

The circuit is based on the Philips application note AN460 fig 7, for a 15 volt Vcc. I do not include any 3V3 pullup resistors because I assume that I will use a microprocessor with internal pullup resistors.
I built one on a prototype board for testing...

I cannot use it in earnest until I know more about the data protocol, so to test it, I simply connected it in parallel with the Scantronic 9651 controller and 9940 keypad. In place of a microprocessor, I connected the driver to a breadboard wth a 3V3 power supply and 10k pullup resistors. I connected those signals to an oscilloscope.

It worked fine.
I also built a version with optocouplers.

The circuit is based on the Philips application note AN460 fig 4, adapted to a 15 volt Vcc. I do not include 3V3 pullup resistors because I assume that I will use a microprocessor with internal pullup resistors.
For optocouplers I used four PC817s (in one 16-pin DIP socket). These are adequate for this low frequency application.
- Note: I do not know why R5 is connected to R4 in the application note, and it does not explain. I made a second variant with all pullups connected directly to Vcc and that works fine.

If you find any of the ideas in this repository useful, please Buy Me a Coffee
If you find the ideas in this repository useful, please Buy Me a Coffee