How to properly connect a bidirectional data line to Raspberry Pi 5 GPIO? [Project details & documentation inside]
I am new to the Pi community and my head is spinning from learning all about GPIO pins, voltages, and communication protocols. Though it has been fun learning all these new concepts. I am struggling to properly connect a bidirectional data wire from an external machine [coin hopper] to my Raspberry Pi 5. When I use my Pi to send a request to the hopper, I get no response. I'm not sure if I am setting up this data wire correctly, so I would love insights from the community. High-level Project Details and Objective
Details I am trying to connect a Coin Hopper [Money Controls SCH 2 model] to my Pi 5. The SCH2 uses a 10-pin Moxel connection scheme and uses a bi-directional serial data line. SCH2 Online Manual/Documentation SCH2 uses the serial interface ccTalk & UART protocol**. ccTalk** is a very old protocol which makes sense as the coin hopper was produced in 2005. From ccTalk Wikipedia page: https://en.wikipedia.org/wiki/CcTalk The coin hopper is powered by a 24v power supply. Below is what the power supply looks like Power Supply from Amazon: https://www.amazon.com/dp/B07VL8W6MQ I am using a female terminal connector adapter to connect the 24v wire and ground wire from the coin hopper directly to the power supply. [Pins 4 & 6 on the hopper] I read that since the coin hopper uses 24v, it could damage the Pi 5 as the Pi operates at 3.3v logic level. Even though the only connection from the coin hopper to the Pi is with the bi-directional data line. As such, I am using a 3.3V/5V to 3.6V/24V 4 Channel Voltage Converter Optocoupler board. The board is NOT bi-directional. Voltage Converter from Amazon: https://www.amazon.com/dp/B07WFGTNQC To better communicate with the Pi's GPIO, I am using this GPIO expansion board GPIO Extenstion board from Amazon: https://www.amazon.com/dp/B08GKQMC72 This GPIO expansion board has a TXD and RXD port. My current understanding
Outstanding Questions
This has been a confusing journey but I'm excited to get the coin hopper up and running. The idea is to automate my coin sorter so that I don't have to place a coin manually each time. The Pi will communicate with the hopper to queue up the next coin after a coin has gone through the sorter. Edit: Clarification on what I have already done and tested I have already attached the GPIO extension board and voltage convertor to the Pi On the voltage convertor there, on the left side in the picture, are ports indicating Input & Ground. On the right side is Voltage Output and Ground. I connected a 22-gauge wire from IN1 [Input 1] to the GPIO extension board [TXD]. I also connected the wire from the input ground port to the ground port on the GPIO extension board [next to the TXD port. For the connection with the coin hopper, I connected the data cable wire from the hopper to V1 and a ground wire from the hopper in G. I am trying to send a command from the Pi through to the GPIO extension board. That data then goes through the extension board to the data cable wire to the coin hopper. However, the coin hopper does not send a response back confirming communication. Below is what I have done to troubleshoot:
[link] [comments] |