I recently bought a barcode scanner for a hobby project. I want to connect it to my Raspberry PI 3 B+. The interface for the camera is RS232 TTL serial. It has a flex cable about half the size of the standard Raspberry Pi camera cable. The specs are below.

After reading around, it seems that this is a CCD flex cable (w/ 12 pins) and that the standard Raspberry Pi accepts a CSI flex cable (w/ 15 pins). So, the TLDR is how can I connect the CCD flat cable to the Pi?


  1. BOOT0 (Input): Low level FLASH to startup

  2. VDD: 5V Input

  3. GND

  4. RX (Input): TTL-232 Input

  5. TX (Output): TTL-232 Input

  6. USB_D- (Input/Output): USB_D-Singal

  7. USB_D+ (Input/Output): USB_D+Singal

  8. NG

  9. Buzz (Output)

  10. LED (Input)

  11. NG

  12. nTrig (Input): Trigger Input Signal

The product listing states that:

TTL Barcode Scanner that works with Arduino, Raspberry Pi and all other microcontrollers that support TTL serial.

2 Answers 2


With a lot of difficulty I expect.

You can't plug it into the CSI connector and expect anything good to happen. There are many such flat cables and their only similarity is they look similar.

You need to find some way of connecting wires to flat cable pins 2, 3, 4, and 5.

  • The other end of 2 you can connect to a Pi 5V pin.
  • The other end of 3 you can connect to a Pi ground pin.
  • The other end of 4 you can connect to Pi TX (pin 8).
  • The other end of 5 you need to connect to a device which drops 5V to 3V3 which can then be connected to Pi RX (pin 10).

For the Raspberry Pi expansion header pinout see


  • Are the Pi connectors you reference part of GPIO? Where would Pi TX and Pi RX be found on the device? Also, is there a name for a device that goes from flat cable to exposed pins? Alternatively, I could strip the end of the flat cable... Trying to see what I need to buy to make this happen. Apr 7, 2019 at 16:22
  • Something like this to act as an adaptor? RX and TX pins are on the GPIO header, see here Apr 7, 2019 at 16:27
  • @RogerJones - Yeah, I was thinking something like that or a simple adapter like this? The link you shared can't be delivered in the U.S. Apr 7, 2019 at 16:37
  • That's just the connector for the FFC --- depends how good your soldering is :) . How about one of these on US Amazon site: amazon.com/Calvas-Cable-Connector-Adapter-through/dp/B07KNP1M2S amazon.com/Calvas-welding-connector-adapter-straight/dp/… ? Apr 7, 2019 at 16:55
  • @RogerJones awesome! Just ordered. Thanks a ton for your and Joan's help! Apr 7, 2019 at 21:59

I think the scanner is TTL RS232 compatible and easily interface with Rpi UART.

The picture in the ad seems misleading. I think the CCD camera does not go into Rpi's CSI connector, but integrated into the cheap module.

You may like to check out a similar module to see more details of the TTL RS232 interface which is compatible to Arduino (which has no CSI, of course!) and Rpi.

Barcode Reader/Scanner Module-CCD Camera

Rpi UART Compatible Barcode Reader

Update 2019apr08hkt1302

You can also find many other much cheaper, hobbyist friendly, USB/UART/Wifi barcode readers form eBay, AliExpress, Amazon etc.

AliExpress USB/RS232 barcode scanners

AliExpress Wireless Barcode Scanners

  • What does "integrated into the cheap module" mean? What other module is there besides the reader and the RPi? I believe the first answer is likely more relevant to the CCD module I purchased, as the flat cable needs to be terminated into some connector with which to connect jumper wires to RPi's GPIO (as there are no exposed pins)? Apr 9, 2019 at 13:02
  • @williamrfry I mean a barcode reader should consist of two parts, the main part which has TTL RS232 interface, and the CCD camera which should be already connected to the main part, using a flat cable. Perhaps you should ask the shop for a user manual.
    – tlfong01
    Apr 9, 2019 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.