Can PWM be Adjusted?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
JDR04
Posts: 271
Joined: Tue Mar 05, 2013 10:49 pm
Has thanked: 111 times
Been thanked: 13 times
Contact:

Can PWM be Adjusted?

Post by JDR04 »

I'm hoping somebody can help me with this.

I'm trying to create a flowchart where I can adjust the frequency of the PWM by using a potentiometer.

My objective is to control a small stepper motor. I've done as much as I can would appreciate further help.

Attached is my flowchart......thanks guys.....John
Attachments
12F683 AT PWM Adjustable.fcf
(7.5 KiB) Downloaded 524 times

electron67
Posts: 311
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 104 times
Been thanked: 47 times
Contact:

Re: Can PWM be Adjusted?

Post by electron67 »

Hi John

this flow chart used to control the intensity of a block of LED of 12 volt, I think you could also work for an motor, you must first enable the PWM option

Enrique
Attachments
PWM.fcf
flowchart
(8.5 KiB) Downloaded 553 times

JDR04
Posts: 271
Joined: Tue Mar 05, 2013 10:49 pm
Has thanked: 111 times
Been thanked: 13 times
Contact:

Re: Can PWM be Adjusted?

Post by JDR04 »

Thanks Electron67. I'll give it a go and see how it works out.

Thanks a lot.....John

electron67
Posts: 311
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 104 times
Been thanked: 47 times
Contact:

Re: Can PWM be Adjusted?

Post by electron67 »

you're welcome.

Enrique

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Can PWM be Adjusted?

Post by medelec35 »

Hi John,
Sounds to me like you will need to vary frequency of pulses rather than duty of PWM.
You would also need to control the pulse count.
This sounds like the job of the built in stepper motor component (Mechatronics Menu)
Just add it to control panel then right click on the component and select help to view options, or select External Properties to select the type of stepper motor it is.
Or
You can use a timer interrupt.
You can't have pulses to fast or there will be slippage.
Using a count variable you can vary the frequency output.

Going back to stepper can you supply details of the stepper motor and driving circuitry so we can take it further.

Martin
Martin

Post Reply