PWM FREQUENCY CALCULATOR

For general discussion related FlowStone
Post Reply
pars11
Posts: 6
Joined: Thu Oct 17, 2013 2:38 pm

PWM FREQUENCY CALCULATOR

Post by pars11 »

I HAVE TRIED TO CALCULATE FREQUENCY OF FLOW SENSOR PWM OUTPUT BUT RESULTS DOESNT MATCH WITH REAL VALUE. I HAVE USED DIGITAL INPUT OF PHIDGETS 8/8/8 INTERFACE KIT. FLOW SENSOR FREQUENCY CHANGES 15 TO 225 HZ, I THOUGHT I COULD GET AT LEAST UPTO 180HZ BUT MAXIMUM I CAN READ IS 43 SAMPLE PER SECOND. COULD YOU HELP ME ABOUT THIS.

THANKS
pars11
Posts: 6
Joined: Thu Oct 17, 2013 2:38 pm

Re: PWM FREQUENCY CALCULATOR

Post by pars11 »

THIS IS THE SCHEMATIC
Attachments
PWM FREQUENCY CALCULATOR11.png
PWM FREQUENCY CALCULATOR11.png (109.64 KiB) Viewed 9945 times
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: PWM FREQUENCY CALCULATOR

Post by tester »

Post fsm schematic (part that addreses the error) instead of blurry picture of it.

Few things to pay attention to are:

- connection order = trigger order (these small markers at the beginnings and ends count the order) = order of operations (triggers work in hierarchy).
- amount of triggers in crucial points (use trigger counter). While values don't have to change, triggers may reintroduce them again to prims and modules.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: PWM FREQUENCY CALCULATOR

Post by trogluddite »

Hi Pars, welcome to the forum.

Unfortunately, this one may be tricky to fix.
The 'events' that transfer data from one 'green' primitive to the next are rather limited in speed. 43 sample/sec is getting pretty close to the upper limit (43 samples = 86 events on/off) - the events probably won't get missed out, but when they are too fast you get an effect a bit like YouTube "buffering", where the events get slowed down - and this will make the counting get less and less accurate as your PWM gets faster.
Faster event can be handled by the Ruby parts of FS, but, as the Phidgets interfaces ONLY send their output from "green" connectors it may not be possible to read the data as quickly as you need to - I've never used any of the hardware interfaces, so I couldn't say for sure.

PS) CAPS-LOCK is over at the left hand side of your keyboard just above the SHIFT key! ;)
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Post Reply