FT232H & PWM

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
herrlinder
 
Posts: 22
Joined: Thu Nov 07, 2013 2:02 pm

FT232H & PWM

Post by herrlinder »

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

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: FT232H & PWM

Post by adafruit_support_rick »

No, it doesn't have PWM

User avatar
nmz787
 
Posts: 1
Joined: Sun Feb 01, 2015 7:48 pm

Re: FT232H & PWM

Post by nmz787 »

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.

User avatar
rootscript
 
Posts: 43
Joined: Sat Mar 08, 2014 11:39 pm

Re: FT232H & PWM

Post by rootscript »

adafruit_support_rick wrote:No, it doesn't have 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?

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 :)

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: FT232H & PWM

Post by adafruit_support_rick »

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?
That should work.
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
Well, you'd still need the PWM driver to run the TB6612, but sure!

User avatar
rootscript
 
Posts: 43
Joined: Sat Mar 08, 2014 11:39 pm

Re: FT232H & PWM

Post by rootscript »

adafruit_support_rick wrote:Well, you'd still need the PWM driver to run the TB6612, but sure!
Great news. In terms of software, Do I have everything I need with the Adafruit Python GPIO Library?
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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: FT232H & PWM

Post by adafruit_support_rick »

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.

User avatar
rootscript
 
Posts: 43
Joined: Sat Mar 08, 2014 11:39 pm

Re: FT232H & PWM

Post by rootscript »

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.
Thanks Rick, that is a good starting point, in terms of wiring.
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

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: FT232H & PWM

Post by adafruit_support_rick »

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!

User avatar
rootscript
 
Posts: 43
Joined: Sat Mar 08, 2014 11:39 pm

Re: FT232H & PWM

Post by rootscript »

adafruit_support_rick wrote:Try it out and lets us know how it goes!
@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)).

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:
Image

FT232H NeoPixel Level Converter:
Image
Last edited by rootscript on Mon Jul 13, 2015 7:33 am, edited 5 times in total.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: FT232H & PWM

Post by adafruit_support_rick »

Cool!

Looks like power to the FT232H is missing from the neopixel ring picture.

User avatar
rootscript
 
Posts: 43
Joined: Sat Mar 08, 2014 11:39 pm

Re: FT232H & PWM

Post by rootscript »

adafruit_support_rick wrote:Cool!
Looks like power to the FT232H is missing from the neopixel ring picture.
Fixed, 5V power to FT232H. thanks

User avatar
rootscript
 
Posts: 43
Joined: Sat Mar 08, 2014 11:39 pm

Re: FT232H & PWM

Post by rootscript »

Here's my first attempt of the 'Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685' connected to the FT232H breakout board:

Image

@adafruit_support_rick Are there any corrections needed, please?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: FT232H & PWM

Post by adafruit_support_rick »

Looks good!

User avatar
Torbay
 
Posts: 1
Joined: Fri Nov 27, 2015 3:35 pm

Re: FT232H & PWM

Post by Torbay »

This is a great idea, did you get the software to work?

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”