Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: My USB to I2C/GPIO/UART/SPI/ADC/PWM/INT... Adapter Cable

  1. #1
    Junior Member
    Join Date
    Feb 2018
    Posts
    3

    My USB to I2C/GPIO/UART/SPI/ADC/PWM/INT... Adapter Cable

    Hi,

    I've designed a USB adapter cable that's based on Teensy 3.2/LC, and I'm starting to sell it on Tindie in a day or two.
    Click image for larger version. 

Name:	mgtnsy1_topview.jpg 
Views:	52 
Size:	50.6 KB 
ID:	13042

    What can it do?
    It can be used as a USB to GPIO/I2C/UART/SPI/ADC/PWM/INTERRUPTS programmable adapter and as a semi-consumer product to connect the PC/SBC to external hardware.

    Why did I do it?
    Bought too many USB to X adapters over time and some of them are not cheap, have proprietary driver/software. This one is free as it can use the Teensy libraries to accomplish all with one device.
    And as part of my work I had to supply an adapter from Android to I2C that will look like a part in a commercial product, so this type of cable did my work easier.

    Hope it will be useful for you out there.

    Here are more photos:
    3D Design:
    Click image for larger version. 

Name:	mgtnsy1_3ddemo.png 
Views:	55 
Size:	124.9 KB 
ID:	13043

    Profile:
    Click image for larger version. 

Name:	mgtnsy1_profile.jpg 
Views:	45 
Size:	35.9 KB 
ID:	13044

    Prototype Before Assembly:
    Click image for larger version. 

Name:	mgtnsy1_prototype_disassembled.jpg 
Views:	52 
Size:	61.5 KB 
ID:	13045

  2. #2
    Senior Member
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    154
    This is pretty cool! What's the plan for the software side?

  3. #3
    Junior Member
    Join Date
    Feb 2018
    Posts
    3
    My initial thought was to preinstall a program that will act as a usb-peripheral device with serial port, it will allow the user to configure it with a few basic commands and act as a serial port to (I2C/SPI/UART/etc..)

    For example things coming on the uart you will get as:
    Code:
    UART1_OUT:ping
    UART1_IN:pong
    I2C Commands can be used:
    Code:
    I2C_OUT: START
    I2C_OUT: READ.0x9A
    I2C_IN:  ACK
    I2C_IN:  0x64
    I2C_OUT: STOP
    But then I thought people who will use it more professionally might want a libusb low-level interface with a reference design so they can create a more specific product.
    Now I think more into that direction

  4. #4
    Senior Member
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    154
    Nice. Any reason not to do both?

    I have a console library that works over USB serial that might be a good fit for controlling the thing. https://github.com/blackketter/Console

    I'd love to have a simple command-line interface to do things like I2C commands/monitoring and GPIO control...

    Is it safe to assume that the software will be open source and up on GitHub?

    Looking forward to seeing it on Tindie!

  5. #5
    Junior Member
    Join Date
    Feb 2018
    Posts
    3
    Actually thats not a bad idea at all!
    I will check the code, a console with CLI can be very simple and quick to use.

    And the software will be open source, the cable has a small hole that you can use a needle to put it to programming mode, so basically people can debug and develop their own cable program if they have such need.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •