Yocto-PWM-Rx improvements

Yocto-PWM-Rx improvements

Following various requests from customers, we recently added some improvements to the Yocto-PWM-Rx. If you use this module, you may be interested to know more than the few words you have perhaps already found in the release note of the firmware list. So here are a few explanations...




There are two types of improvements: hardware and software. Hardware improvements obviously concern only the modules which you have bought recently (from mid-July 2017), but all users can benefit from the software improvements by simply updating their module firmware.

Frequency measure with increased accuracy


Modules bought since mid-July 2017 bear a "Rev. B" mark. The main improvement of this hardware revision is the addition of an accurate external oscillator for the measure of frequency. Indeed, when the product was initially designed, the only value which was precisely measured was the duty cycle. The frequency measure was provided with an accuracy of 2% only. But as several users showed interest in an accurate measure of the frequency, it is now possible, with an accuracy of 50ppm, that is 0.05 per thousand. This improvement therefore widens the range of possible applications for the module.

Deboucing


Initially designed to work on bounce-free digital signals, the Yocto-PWM-Rx is also getting used for counting pulses produced by mechanical actuators (switches or relays). The issue with this type of mechanical device is that they aren't clean: instead of producing a unique transition, clear and sharp, they have a tendency to produce bounces before stabilizing, as you can see in the following illustration:


Digital commutation , clean  Mechanical commutation, with bounces
Commutation signal produced by a digital (left) and mechanical (right) device



On a signal with bounces, the ability of a Yocto-PWM-Rx to detect even extremely short pulses could turn into a disadvantage: each bounce counted as a pulse and the pulse counter increased too fast.

We therefore added to the Yocto-PWM-Rx firmware a software debouncing filter, which you can individually configure on each channel. You only need to configure the shortest pulse length that must be taken into account, and shorter bounces are automatically ignored. For mechanical relays or switches, a 25ms value is usually efficient to debounce entirely.

Selecting the reported value


Each channel of the Yocto-PWM-Rx can simultaneously measure the frequency, the duty cycle, the absolute length of the transitions, and the number of transitions. But usually, for a given application, only one of these values is pertinent. So for each input channel, you can set which value is reported, value which is not only measured in real time (same as the others) but which can also be recorded in the data logger, and be propagated through a YoctoHub to a cloud service for example.

In keeping with the aim to widen the application range of the module, we added new possibilities to select the reported value. You can now choose between:

  • the pulse length in ms
  • the duty cycle in percent
  • the frequency in Hz
  • the CPS, count of pulses during the last second
  • the CPM, count of pulses per minute, as measured during last 6 seconds
  • the number of state changes, up and down
  • the number of pulses, that is usually half of the state changes
  • the signal state, either 0 or 1 (after debouncing)


Managing low frequencies


Finally, we improved the algorithms used to detect the beginning and the end of low frequency periodic signals. Until now, a signal was signaled only after receiving three complete periods, and the end of a signal (0Hz frequency) as soon as there was no transition for 10 complete periods. These parameters were suitable for signals with a frequency above 5Hz, but they introduced a lot of latency for slower signals. Slow signals are now signaled after the first complete period and their end as soon as there is no transition for 3 periods.

Add a comment One comment
Back to blog



1 - mvuilleu (Yocto-Team)Saturday,october 14,2017 12H13

Thanks to Conor Whyte and Rob Krakora for their feedback and their contribution to test the improvements included in this new firmware !

Yoctopuce, get your stuff connected.