PDA

View Full Version : Pulsin not consistent



Boondocker
24-05-2008, 15:42
I really enjoy playing the vsm. However I've encountered some trouble using the PULSIN command. The pulse time is not matching input consistently from a square wave generator.

Freq , Expected pulse time , Display of pulse time

5 , 10000, 9933
7.5 , 6660 , 2045
8.0, 6250, 387
10, 5000, 4967
11, 4500, 2660
15, 3330, 2054
30, 1660, 1657

Any suggestion? I’ve tried averaging the pulse and pausing between reads with out any luck.


Thanks

BCJKiwi
24-05-2008, 22:58
I'm a bit confused.

rpm.bas is not relevant to how you are measuring the pulse length of the square wave in the table above as the program only has the math for rpm.
So what is the program being used for displaying the pulse length?
I don't have VSM so can't see what you have in the DSN.

Boondocker
25-05-2008, 00:13
Hi BJCKiwi,

The main concern is pulse time displayed is not consistent with the pulse that is being inputted. I would expect to get a pulse width of 4500us with an input of frequency of 11hz, not 2660us. On some frequencies the pulse with is right on, i.e. at 5hz, 10hz, and 30 hz.

I need to explain the rpm part, the associated program name. The pulse width is used to determine frequency of 12 pole 3 phase alternator to monitor rpm. A quick cross check for alternator speed; rpm = 120 * freq / no. poles. So in this case a 10hz input indicates 100 rpm, 15hz:150rpm, 30hz:300rpm…………

Didn’t mean to be confusing, hope this helps.

Regards,

Boondocker.

Boondocker
25-05-2008, 16:32
Screen print

BCJKiwi
25-05-2008, 22:15
As I don't have VSM it is not cleat to me where the pulsin count shown on the LCD is coming from.

If it is an internal monitor function within VSM then it is obviously a VSM issue.
If it comes from code then it could be a code issue but I could not see any code in rpm.bas for this output - hence the question.

Technical
26-05-2008, 16:55
Thanks for pointing this out, it was a minor bug in VSM.

v1.0.3 fixes this, patch now available from www.picaxevsm.com (http://www.picaxevsm.com) We have tested with your file and this now appears to operate correctly.

Boondocker
26-05-2008, 19:07
Works as expected with the patch installed. Also getting an excellent responds between changing the frequency and the time it takes to display on the LCD. So far I'm impressed with VSM, what a great learning tool.