Voltlog

Поділитися
Вставка
  • Опубліковано 6 лип 2024
  • $2 for 5 PCBs Any Color jlcpcb.com In this video I am showing you how I designed and built my FT232H breakout board and how to use it to add a SPI/JTAG/I2C/Serial interface to your PC accessible through Python by using the PyFtdi library.
    →Get the design files for the board shown in the video
    voltlog.com/y/6ug5b
    →FT232H Breakout Board
    Aliexpress voltlog.com/y/cr3p8
    Ebay voltlog.com/y/k2iy6
    Banggood voltlog.com/y/8elgw
    Amazon voltlog.com/y/u964o
    →PyFtdi Project
    voltlog.com/y/pbm4c
    →Support the channel via Patreon, Paypal or Bitcoin
    www.voltlog.com/donations
    →Blog Post
    www.voltlog.com/
    #VoltLog #FT232H #Python
  • Наука та технологія

КОМЕНТАРІ • 34

  • @denizea
    @denizea 4 роки тому +3

    Such a good project, I hope to see more projects like this in this channel!

  • @NiHaoMike64
    @NiHaoMike64 4 роки тому +8

    For those against FTDI after their infamous "bricking" scandal, the MCP2221 is another USB to I2C converter.

    • @brainfornothing
      @brainfornothing 4 роки тому

      Good to know. Thanks !

    • @EgonSorensen
      @EgonSorensen 4 роки тому +1

      Silicon Labs also makes great and reliable products. A lot of USB bridges with different bus types and royalty-free drivers, so yeah - no need for FTDI and their stunts. Highly recommended!
      www.silabs.com/products/interface/usb-bridges

  • @nomadic_rider42
    @nomadic_rider42 4 роки тому +1

    Great little board with lot of functionalities. Looks like there's a bodge at USB protection part, was that fixed on the current version of the design files?

    • @voltlog
      @voltlog  4 роки тому +2

      Yes, the bodge has been fixed in the files released to the public (revB). I actually fixed the error, before ordering revA pcb's but just forgot to hit "update library" which is necessary in EagleCAD to propagate the changes so I ended up with a set of PCBs that had the data lines reversed on the usb connector.

  • @esonchen7899
    @esonchen7899 4 роки тому

    Hi Sir, by using pyftdi for FT232H, can i use I2C interface and GPIO interface at the same time? i am trying to include both I2C interface and GPIO interface in the same project, turns out, it only work for one interface.

  • @TheDefpom
    @TheDefpom 4 роки тому

    Very nice project, I recently purchased some boards (I’m still waiting for them to arrive) for something I am working on too, these would have been perfect for it!

    • @voltlog
      @voltlog  4 роки тому +1

      Well it's never too late to get your own FT232H boards, don't delay, buy today, like someone famous would say :-)

  • @leppie
    @leppie 4 роки тому +4

    Dont think I saw the underside of the board, but maybe some pin labeling for the alt functions (serial, i2c, spi, jtag) would be nice

    • @voltlog
      @voltlog  4 роки тому +1

      Yup, I was just thinking that as I was handling and working with the PCB for this video. Good suggestion, thank you!

  • @brainfornothing
    @brainfornothing 4 роки тому

    Thanks for sharing !

  • @ristomatti
    @ristomatti 4 роки тому

    Great looking board and an interesting chip! I've only got basic level understanding of protocols like SPI/I2C but I've got the impression sometimes the timing might be difficult to get right. IIRC the ESP32 Arduino core's I2C support was initially struggling with such issues. Similarly I believe I2C/SPI are easier to get working with a MCU than a SBC like Raspberry Pi due to OS background processes etc. making exact timing more difficult. Do you think using this chip with your computer would have similar issues as an SBC would have, or does the chip provide features that would help here?

    • @voltlog
      @voltlog  4 роки тому +1

      Interesting but difficult question to answer, referring strictly to timing, I would say you don't need to worry about it.
      However sometimes, clock stretching might be something that the slave devices requires (some sensors for example) but the master doesn't support. This is also true for the FT232H, it doesn't support clock stretching natively but they provide a workaround in AN_411 "The MPSSE does not support clock stretching. However, if the I2C peripheral requires this feature, it may be possible to provide similar functionality using the Adaptive clocking feature of the MPSSE." It appears PyFtdi implements a form of clock stretching.
      Another thing to consider is that this whole idea is based on multiple layers from the hardware all the way up to Python and we also have USB in the middle so it might not be possible to achieve the same performance or bit rate as with a simple hardware peripheral interface present on a microcontroller. In fact PyFtdi documentation has something to say on this "Due to the FTDI MPSSE engine limitations, the actual bitrate over I2C is very slow. As the I2C protocol enforces that each I2C exchanged byte needs to be acknowledged by the peer, a I2C byte cannot be written to the slave before the previous byte has been acknowledged by the slave and read back by the I2C master, that is the host. This requires several USB transfer for each byte, on top of each latency of the USB stack may add up. PyFtdi is therefore not recommended if you need to achieve medium to high speed communication with a slave (relative to the I2C clock…), nor than FTDI devices are for this kind of usage."

    • @ristomatti
      @ristomatti 4 роки тому

      @@voltlog Thank you for the clarifications! I would not expect very high speeds through all three layers either but the question was mostly about successfully communicating at all.

    • @ArjanvanVught
      @ArjanvanVught 4 роки тому

      @Ristomatti Airo re the Raspberry Pi board (or any SBC) using an OS (most likely Linux); is not a prerequisite using an OS. Just use the ARM core on the SBC baremetal and there are for sure no timing issues at all. Please also note when you are using the Arduino IDE you have an OS as well.

    • @ristomatti
      @ristomatti 4 роки тому

      @@ArjanvanVught Surely but I was talking about the most common use cases (for a hobbyist).

    • @robatoto
      @robatoto 4 роки тому +2

      I would expect that PyFtdi provides an interface to perform entire I2C and SPI transactions (and not just single byte operations). If that‘s the case, timing shouldn’t be a major problem. I’ve created something similar with a Teensy LC instead of a FTDI chip. While the turn around to read a single byte is much slower than with a MCU, the throughput was perfect and far beyond what a MCU can achieve. I could feed a color TFT with about 30 full frames a second from an animated graphic, despite Teensy’s small memory used for buffering. @VoltLog I’m looking forward to a follow up video with more details about a project with the board and the Python interface for the FTDI chip.

  • @DipElectronicsLAB
    @DipElectronicsLAB 4 роки тому

    Good

  • @certified-forklifter
    @certified-forklifter 4 роки тому +1

    Cool!

  • @electronic7979
    @electronic7979 4 роки тому +1

    👍

  • @tugalsan
    @tugalsan 4 роки тому

    PLC with Web OS: I wish there is a simple java code tutorial for it + And I wish I can use multiple of them at the very same RasperryPi

  • @ArjanvanVught
    @ArjanvanVught 4 роки тому +1

    Please can someone explain why we need yet another interpreter language such as Python? Why is it such a hype?

    • @UpcycleElectronics
      @UpcycleElectronics 4 роки тому +6

      I think it's like the modern Basic. It's like the defacto academic standard now. It seems really simple and powerful when someone knows how to use it well. I recommend watching Joel over on OpenTechLabs for a great example. He did some seriously advanced level hacking demonstrations recently while trying to gain access into the IT9919 video processor chip. I'm sure other people are just as capable with other languages, but there are people doing some powerful custom stuff with python and things like KiCAD, GIMP, and others. They also make it look simple. Source written in 3.x and up is practically readable even for a complete laymen, at least in my opinion. I can't say that about any other language I've seen, except maybe Forth, if think like_Yoda , you-do ;

    • @voltlog
      @voltlog  4 роки тому +1

      I think @Upcycle Eletronics above is right, it's like the modern Basic, it gives access to a wider audience and so it's appealing to start with.

    • @AttilaAsztalos
      @AttilaAsztalos 4 роки тому +1

      Essentially it's the difference between building with bricks or prefabricated panels. If you want bricks, you can lay down absolutely any shape you want, but your hair might go gray by the time you finish the second room; with panels you just plop four of them down and the room is done, you're free to proceed with whatever you actually wanted to do in it. And that sort of thing counts immensely if you are more interested in doing some actual machine vision or machine learning (don't you dare calling it "AI"...) than getting your doctorate in the intricacies of inheritance.

  • @TruthDigest
    @TruthDigest 3 роки тому

    Hello, important tool but , your video was so fast , I think such content has to be in much much longer video , to let as learn , how to use this device , because there are points has to be in a separate videos like using paython to interface a with ftdi chip, thank you for your efforts , and good luck :)

  • @AttilaAsztalos
    @AttilaAsztalos 4 роки тому

    Ah yes - the MPSSE, of FT2232 ancestry, capable of SPI/I2C/JTAG emulation and other minor magicks, for which I waited a decade and half for any king of -> -_-GUI-_-

    • @voltlog
      @voltlog  4 роки тому +1

      I own a bus pirate and there is a GUI for it but I remember it had some issues, it was buggy. It was like a beta that never made it into production :-)

  • @meanxmeanx1763
    @meanxmeanx1763 4 роки тому

    I2C & SPI in Master mode only with pyFtdi

    • @voltlog
      @voltlog  4 роки тому

      Ok, that's good to know.

  • @Tim_Small
    @Tim_Small 4 роки тому

    Without wishing to sound like a fanboy, have you looked at the Rust programming language? It combines many of the features which make Python attractive, with the ability to write code as tight and low level as C, plus adds a ton of compile time correctness guarantees. It also has a fairly new but excellent hard real-time framework "Real Time For the Masses". For microcontrollers, the best support is probably for STM32 (F4 and F1 are pretty good). You can even run the same e.g. SPI or i2c code on both Linux (e.g. Raspberry Pi) and also microcontrollers using Rust's "embedded HAL".