Alert.png

Notice: This page contains information for the legacy Phidget21 Library. Phidget21 does not support VINT Phidgets, and will not support any new Phidgets. Phidget21 will be maintained until 2020. We recommend that new projects be developed against the Phidget22 Library.


Click on the 2phidget22.jpg button in the menu bar to go to the Phidget22 version of this page.

Alert.png

1054 User Guide

From Phidgets Legacy Support
Jump to: navigation, search
1054.jpg
Go to this device's product page


Getting Started

Checking the Contents

You should have received:

  • A PhidgetFrequencyCounter
  • A Mini-USB cable

In order to test your new Phidget you will also need:

  • A Frequency producing device such as a flow meter or tachometer

Connecting the Pieces

  1. Connect your sensor to the PhidgetFrequencyCounter channel 0. We are using a Flow Meter that requires an external +12V power supply. The ground of the power supply, sensor and 1054 are all connected together. If your sensor requires +5V, it can be powered directly by the 1054.
  2. Connect the PhidgetFrequencyCounter to your computer using the Mini-USB cable.

1054 0 Connecting The Hardware.jpg

Testing Using Windows 2000 / XP / Vista / 7

Make sure you have the current version of the Phidget library installed on your PC. If you don't, follow these steps:

  1. Go to the Quick Downloads section on the Windows page
  2. Download and run the Phidget21 Installer (32-bit, or 64-bit, depending on your system)
  3. You should see the Ph.jpg icon on the right hand corner of the Task Bar.

Running Phidgets Sample Program

Double clicking on the Ph.jpg icon loads the Phidget Control Panel; we will use this program to ensure that your new Phidget works properly.

The source code for the FrequencyCounter-full sample program can be found in the quick downloads section on the C# Language Page. If you'd like to see examples in other languages, you can visit our Languages page.

Updating Device Firmware

If an entry in this list is red, it means the firmware for that device is out of date. Double click on the entry to be given the option of updating the firmware. If you choose not to update the firmware, you can still run the example for that device after refusing.

Double Click on the Ph.jpg icon to activate the Phidget Control Panel and make sure that the PhidgetFrequencyCounter is properly attached to your PC.

1054 0 Control Panel Screen.jpg
  1. Double Click on PhidgetFrequencyCounter in the Phidget Control Panel to bring up FrequencyCounter-full and check that the box labelled Attached contains the word True.
  2. Select channel 0.
  3. Click in the box to enable the device.
  4. Select Logic Level or Zero Crossing, depending on your sensor. See the Technical Section for help.
  5. The Timeout default of 1000 ms is fine for most applications.
  6. Count Events shows the number of pulses in the last measurement interval.
  7. Frequency is calculated from the number of pulses in the last measurement interval.
  8. Total count is the total number of pulses counted since the application started or the 1054 reset.
  9. Total Time is the elapsed time that the 1054 has been enabled for.
1054 0 FrequencyCounter Screen.jpg

Testing Using Mac OS X

  1. Go to the Quick Downloads section on the Mac OS X page
  2. Download and run the Phidget OS X Installer
  3. Click on System Preferences >> Phidgets (under Other) to activate the Preference Pane
  4. Make sure that the PhidgetFrequencyCounter is properly attached.
  5. Double Click on PhidgetFrequencyCounter in the Phidget Preference Pane to bring up the FrequencyCounter-full Sample program. This program will function in a similar way as the Windows version.

Using Linux

For a step-by-step guide on getting Phidgets running on Linux, check the Linux page.

Using Windows Mobile / CE 5.0 / CE 6.0

For a step-by-step guide on getting Phidgets running on Windows CE, check the Windows CE page.

Technical Details

The PhidgetFrequencyCounter contains two channels to sense two different inputs. Each channel has two different circuits to sense for logic level-frequencies or zero-centered frequencies. The measurable frequency is accurate to 0.25% up to 1MHz. The Frequency Counter may measure frequencies past 1 Mhz, but the input voltage specifications will not hold. The PhidgetFrequencyCounter can measure frequencies down to ~ 0.01Hz. However the response time of these measurements is directly related to the frequency, thus it could take 1 or 2 periods(100-200s) to detect the input frequency.

Logic-Level Frequencies

The logic-level sensing circuit has a hysteresis range from 0.9V to 2.4V. This will allow the circuit to count both 3.3V and 5V logic levels. In addition to logic-level signals, this will also accept the pulses from sensors with open collector outputs. When the input signals are either 3.3V or 5V, the maximum sensed frequency is 1.5Mhz. Most digital sensors that are powered from a signal positive power supply will output a logic-level frequency.

Zero-Centered Frequencies

The zero-centered sensing circuit can be used for input signals where you want to count as it crosses zero volts. A hysteresis of 30mVpp filters noise. At maximum frequency (1Mhz), a signal of 400mVPP is required for reliable counting. A common application that uses a zero centered frequency output is a simple magnetic tachometer, which produces a sine wave around 0 volts.

Differential Inputs

The PhidgetFrequencyCounter uses differential inputs - that is, the voltage being compared is the difference between the (+) and (-) inputs. If your application has a slightly different ground from your USB ground, the common mode rejection in the 1054 will handle small differences in ground. For many applications, the signal being measured is single ended - that is, your sensor outputs only one signal, and you can directly connect the ground of the sensor to the ground of the 1054. In this case, ensure the (-) input is tied to ground. Never allow either input to be left unconnected.

Output Voltage

USB Voltage is passed directly to the +5V terminal on the green blocks.

API

We document API Calls specific to this product in this section. Functions common to all Phidgets and functions not applicable to this device are not covered here. This section is deliberately generic. For calling conventions under a specific language, refer to the associated API manual in the Quick Downloads section for that language. For exact values, refer to the device specifications.

Enums

enum {

ZERO_CROSSING = 1,
LOGIC_LEVEL

} FilterType

Determines the signal type that the PhidgetFrequencyCounter responds to.

Functions

double Frequency(int ChannelIndex) [get]

Gets the last calculated frequency on the specified channel, in Hz. This function will return 0 if The Timeout value elapses without detecting a signal. Frequency is recalculated up to 31.25 times a second, depending on the pulse rate.


int64 TotalCount(int ChannelIndex) [get]

Gets the total number of pulses detected on the specified channel since the Phidget was opened, or since the last reset.


int64 TotalTime(int ChannelIndex) [get]

Gets the total elapsed time since Phidget was opened, or since the last reset, in microseconds. This property complements the TotalCount property.


int Timeout[get,set]

Gets or set the Timeout value, in microseconds. This value is used to set the time to wait without detecting a signal before reporting 0 Hz. The valid range in 0.1 - 100 seconds (100,000 - 100,000,000 microseconds). 1/Timeout represents the lowest frequency that will be measurable.


int Filter(int ChannelIndex, FilterType filter) [get, set]

Gets or set the channel filter mode. This controls the type of signal that the frequency counter will respond to - either a zero-centered signal, or a logic level signal.


bool Enabled(int ChannelIndex) [get, set]

Gets or sets the enabled state on the specified channel. When a channel is disabled, it will no longer register counts. TotalTime and TotalCount properties will not be incremented until the channel is re-enabled.

void reset(int ChannelIndex)

Resets the TotalCount and TotalTime counters to 0 for the specified channel. For best precision/reliability, this should be called when the channel is disabled.

Events

Count(int ChannelIndex, int time, int counts) [event]

An event that is issued whenever some counts have been detected. This event will fire at up to 31.25 times a second, depending on the pulse rate. The time is in microseconds and represents the amount of time in which the number of counts occurred. This event can be used to calculate frequency independently of the phidget21 library frequency implementation.
This event will fire with a count of 0 once, after the Timeout time has elapsed with no counts for a channel, to indicate 0Hz.

Product History

Date Board Revision Device Version Comment
May 2011 0 100 Product Release
May 2011 0 101 getLabelString fixed for labels longer than 7 characters