Hello,
Does FT232H support PWM? Looking at top frequency of 25 KHz , need to drive a two MOSFET. I bought 2 FT232H for development and testing.
Thanks
Robert
FT232H & PWM
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: FT232H & PWM
No, it doesn't have PWM
- nmz787
- Posts: 1
- Joined: Sun Feb 01, 2015 7:48 pm
Re: FT232H & PWM
You can use D1 in SPI mode and just vary the number of bits you have 'HIGH' in each packet (or series of packets), and also vary the clock speed. Tried it here with an LED and got OK results with a little bit of Python code to construct the list of bytes for a given 'pulse width', then just while() looping two lists that ramped up and down.
- rootscript
- Posts: 43
- Joined: Sat Mar 08, 2014 11:39 pm
Re: FT232H & PWM
Do you think we could use this (Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685) with the FT232H https://www.adafruit.com/products/815 ? So FT232H to PCA9685 via I2c, so we can control motors using PWM?adafruit_support_rick wrote:No, it doesn't have PWM
I was also hoping that we could use the Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board, with the FT232H too? to control a Stepper Motor. Will that be possible?
https://www.adafruit.com/products/2448
thanks :)
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: FT232H & PWM
That should work.rootScript wrote:Do you think we could use this (Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685) with the FT232H https://www.adafruit.com/products/815 ? So FT232H to PCA9685 via I2c, so we can control motors using PWM?
Well, you'd still need the PWM driver to run the TB6612, but sure!rootScript wrote:I was also hoping that we could use the Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board, with the FT232H too? to control a Stepper Motor. Will that be possible?
https://www.adafruit.com/products/2448
- rootscript
- Posts: 43
- Joined: Sat Mar 08, 2014 11:39 pm
Re: FT232H & PWM
Great news. In terms of software, Do I have everything I need with the Adafruit Python GPIO Library?adafruit_support_rick wrote:Well, you'd still need the PWM driver to run the TB6612, but sure!
https://github.com/adafruit/Adafruit_Python_GPIO
I would really appreciate some detailed advice on how to wire it all up, from the 'FT232H' & '16-Channel 12-bit PWM Driver I2C PCA9685' to the 'TB6612 1.2A DC/Stepper Motor Driver Breakout Board'
thanks again, knowing that this is all 'possible' just made my day.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: FT232H & PWM
Follow the FT232H tutorial for wiring up I2C. The FT232H driver in Adafruit_Python_GPIO will give you an I2C object, but you will still need to write actual control software for the PCA9685.
- rootscript
- Posts: 43
- Joined: Sat Mar 08, 2014 11:39 pm
Re: FT232H & PWM
Thanks Rick, that is a good starting point, in terms of wiring.adafruit_support_rick wrote:Follow the FT232H tutorial for wiring up I2C. The FT232H driver in Adafruit_Python_GPIO will give you an I2C object, but you will still need to write actual control software for the PCA9685.
The PCA9685 & the TB6612 are both used in the 'Adafruit DC & Stepper Motor HAT for Raspberry Pi'. Can I use the Adafruit Python Github library code https://github.com/adafruit/Adafruit-Mo ... on-Library as the control software for the PCA9685 & the TB6612?
Is it straight forward to use the HAT code (with some tweaks?), or is it something that I might need someone with more experience to help with?
The FT232H is a great platform, and to have some libraries for it to drive DC motors & steppers would be beneficial to all of us FT232H users, especially if the existing HAT code can be repurposed. What are your thoughts on this?
Adafruit PCA9685 16-Channel PWM Servo Driver
https://github.com/adafruit/Adafruit-Mo ... _Driver.py
class Adafruit_StepperMotor (which I am guessing is relevant to TB6612)
https://github.com/adafruit/Adafruit-Mo ... otorHAT.py
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: FT232H & PWM
I don't know. You would modify the PWM Servo Driver code to get the I2c object from the FT232H instead of using the regular Adafruit_I2C object. That should work.
After that, I suppose the motor code would work as-is. But I don't know. Try it out and lets us know how it goes!
After that, I suppose the motor code would work as-is. But I don't know. Try it out and lets us know how it goes!
- rootscript
- Posts: 43
- Joined: Sat Mar 08, 2014 11:39 pm
Re: FT232H & PWM
@adafruit_support_rick @tdicola - I've decided that although I have no experience with any of this, that I will try to put together an FT232H guide (for people like me (who know very little, but want to learn)).adafruit_support_rick wrote:Try it out and lets us know how it goes!
I'm starting with some circuit/wiring diagrams, and will move on to drivers/python code for devices later.
So far, I've managed to start using Git, and have created a public repo of my FT232H diagrams here:
https://github.com/rootscript/FT232H-diagrams
I'd would be grateful, if you guys with FT232H experience (This is my 1st attempt at this), could check out the repo & make sure they are accurate, please.
I've included the Affinity Designer files (Breakout board images with vector wiring & labels).
My goal is to have a complete set of FT232H wiring diagrams, driver code & python examples for each Adafruit breakout board I have. I think the FT232H is a great platform, and would love for there to be more learning resources for beginners who want to learn.
If you guys have any 'rough & quick napkins drawings' diagrams that COULD be drawn up for the FT232H connected to I2C breakout boards etc.. I would be more than willing to draw them up & test them. Next on my list of things to do is the FT232H connected the PCA9685 breakout for PWM.
Here are a few examples, please check them for errors (these are just my guesses of how this stuff should be wired):
FT232H I2C pull-ups:
FT232H NeoPixel Level Converter:
Last edited by rootscript on Mon Jul 13, 2015 7:33 am, edited 5 times in total.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: FT232H & PWM
Cool!
Looks like power to the FT232H is missing from the neopixel ring picture.
Looks like power to the FT232H is missing from the neopixel ring picture.
- rootscript
- Posts: 43
- Joined: Sat Mar 08, 2014 11:39 pm
Re: FT232H & PWM
Fixed, 5V power to FT232H. thanksadafruit_support_rick wrote:Cool!
Looks like power to the FT232H is missing from the neopixel ring picture.
- rootscript
- Posts: 43
- Joined: Sat Mar 08, 2014 11:39 pm
Re: FT232H & PWM
Here's my first attempt of the 'Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685' connected to the FT232H breakout board:
@adafruit_support_rick Are there any corrections needed, please?
@adafruit_support_rick Are there any corrections needed, please?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: FT232H & PWM
Looks good!
- Torbay
- Posts: 1
- Joined: Fri Nov 27, 2015 3:35 pm
Re: FT232H & PWM
This is a great idea, did you get the software to work?
Please be positive and constructive with your questions and comments.