The Bricklet has an integrated edge counter and it can measure duty cycle, period, frequency and value per channel. The frequency can be as high as 4MHz.
The edge counter can count rising edges, falling edges or both. The direction of the count (up or down) is configurable. It is also possible to use the value of one channel as the direction (e.g. high = up, low = down) for another channel.
All 4 channels are galvanically isolated.
Example applications for the Bricklet are reading of a PWM signal and reading of sensors that have edge counts or frequency as output.
The Industrial Counter Bricklet has a 7 pole Bricklet connector and is connected to a Brick with a 7p-10p Bricklet cable.
|Current Consumption||100mW (20mA at 5V)|
|Input Type||Four optocoupled inputs (including 2.7kΩ series resistor)|
|Input Current||Depending on input voltage, ca. 3.85mA/12V, ca. 8.3mA/24V|
|Maximum Input Voltage||26V (DC)|
|Low Level Voltage||0-2V|
|High Level Voltage||10-26V|
|Isolation||3750Vrms (optocoupler value)|
|Minimum Input Frequency||0.03Hz|
|Maximum Input Frequency||4Mhz|
|Time resolution||up to 10.4ns (Duty Cycle Prescaler set to 1)|
|Frequency resolution||up to 0.03Hz (Frequency Integration Time set to 32768ms)|
|Dimensions (W x D x H)||40 x 40 x 11mm (1.57 x 1.57 x 0.43")|
The Bricklet has the standard status LED with four additional LEDs (one for each channel).
By default the channel status LEDs are on if the corresponding channel is high and off otherwise. You can also turn each LED individually on/off and show other status information through the API.
The Bricklet has two important configurations per channel:
Duty Cycle Prescaler: Prescaler for internal clock.
Internally the Bricklet uses a 96MHz clock. The prescaler is a divider for this internal clock. If the input frequency is smaller than 1465Hz, the internal counter can overflow and the frequency measurement becomes distorted. In this case the prescaler needs to be increased.
If your frequency is above 1465Hz, you can always use a prescaler of 1. If your input frequency is below 1465Hz, you can look at the list below for the prescaler that gives you the highest resolution for a given frequency.
Frequency Integration Time: Time that is used to calculate the frequency.
The frequency is calculated by dividing the number of edges by the integration time. Example: If the Frequency Integration Time is set to 2048ms and the Bricklet sees 40960 edge changes in this time, the resulting frequency is 20kHz (40960 edges divided by 2.048 seconds).
For the frequency integration to work, the frequency integration time needs to be higher then the period of the measured frequency.
The update rate of the frequency corresponds to the Frequency Integration Time. So a small integration time means that the value is updated more often. If (for example) you change the Frequency Integration Time to 4096ms, it will take ~4 seconds until you get a proper frequency for the first time and the value will be updated every 4 seconds.
The resolution of the measured frequency increases with increased integration time:
The Industrial Counter Bricklet has five different measurements:
Count: Is the number of counted edges. The Bricklet can count rising edges, falling edges or both edges. The direction of the counting (up or down) can be configured. For channel 0 and 3 it is also possible to use another channel as the input for counting up or down.
Duty Cycle: Is the percentage that the signal is high in a cycle.
Period: Is the duration of one cycle.
Frequency: Is the frequency of the signal measured over a longer time period.
Value: Is the current state of the channel (either high or low).
Duty Cycle and Period are always given for the last cycle seen. The frequency is calculated using the configured Frequency Integration Time. If the cycles have a bit of jitter, the frequency will stay stable while the period and duty cycle will show the jitter.
If the resolution of the period is high enough, the frequency of the signal is stable and there is no jitter, the frequency will be equal to 1/period.
Below you can find an oscilloscope screenshot that shows the different measurements of a 12kHz signal with 60% duty cycle
and the corresponding Brick Viewer screenshot of the same signal connected to the Industrial Counter Bricklet.
The count direction (up or down) can be configured and changed on-the-fly for each channel. Channel 0 additionally supports to use the input of channel 2 as direction. You can configure channel 0 to count up if the value of channel 2 is high and down if the value is low and the other way around.
Additionally channel 3 can use channel 1 as direction input in the same manner.
To test a Industrial Counter Bricklet you need to have Brick Daemon and Brick Viewer installed. Brick Daemon acts as a proxy between the USB interface of the Bricks and the API bindings. Brick Viewer connects to Brick Daemon. It helps to figure out basic information about the connected Bricks and Bricklets and allows to test them.
Connect the Industrial Counter Bricklet to a Brick with a Bricklet Cable.
If you connect the Brick to the PC over USB, you should see a new tab named "Industrial Counter Bricklet" in the Brick Viewer after a moment. Select this tab. If everything went as expected you can now configure the channels and see the counter values.
After this test you can go on with writing your own application. See the Programming Interface section for the API of the Industrial Counter Bricklet and examples in different programming languages.
A laser-cut case for the Industrial Counter Bricklet is available.
The assembly is easiest if you follow the following steps:
Below you can see an exploded assembly drawing of the Industrial Counter Bricklet case:
Hint: There is a protective film on both sides of the plates, you have to remove it before assembly.
See Programming Interface for a detailed description.
|Visual Basic .NET||API||Examples||Installation|