Description: The board is relatively simple and is based on a PCF8574, which provides the output of a CD 4040 counter to the I2C bus. A DIP switch is included to select the PCF8574 address, along with some LEDs for power and wind activity indication. The DIP switch was not soldered, resulting in the circuit having the address 0x27. After activating the anemometer, the green LED blinked, and a scan on the I2C bus confirmed that the PCF8574 was correctly detected. Subsequently, the anemometer was installed on the roof. Following the hardware setup, software development commenced. Due to insufficient I2C support in Perl (as CPAN could not locate Device::SMBus), the decision was made to switch to C(+) to complete the task using the i2c-dev interface provided by the Linux kernel. The program, named windlogd (wind-logger-daemon), reads counter values and outputs the current wind speed, as shown in the following log: [root@kynes windlogd]#. /windlogd -s 0x27 -d /dev/i2c-1 Thu Oct 21 10:53:56 2010: samples 108, 92: freq 5.333 Hz, wind speed 3.378 m/s Thu Oct 21 10:53:59 2010: samples 124, 108: freq 5.333 Hz, wind speed 3.378 m/s Thu Oct 21 10:54:02 2010: samples 140, 124: freq 5.333 Hz, wind speed 3.378 m/s Thu Oct 21 10:54:05 2010: samples 160, 140: freq 6.667 Hz, wind speed 4.156 m/s. The transfer function between the anemometer and the counter is defined in the source code. The -d argument specifies the bus to be used (defaulting to i2c-0), while the -s argument is mandatory and indicates the device address, which can be expressed in both decimal and hexadecimal formats using the 0x prefix.
The circuit design utilizes a PCF8574 I/O expander, which communicates with a CD 4040 binary counter via the I2C protocol. The PCF8574 allows for easy address selection through a DIP switch, facilitating multiple devices on the same I2C bus. The circuit is equipped with indicator LEDs that signal power status and wind activity, providing visual feedback during operation.
The CD 4040 counter is responsible for counting pulses generated by the anemometer, which translates wind speed into electrical signals. The output from the CD 4040 is fed into the PCF8574, which converts the parallel data into a serial format suitable for I2C transmission. This configuration enables efficient data communication between the hardware and a host system, typically a microcontroller or a computer.
The software component, windlogd, is designed to read the data from the I2C bus, process the counter values, and calculate wind speed based on the frequency of the pulses received. The program employs the i2c-dev interface, which provides a user-friendly method to interact with I2C devices in a Linux environment. The command-line options allow users to specify the device address and the I2C bus, making the setup flexible and adaptable to various configurations.
In summary, this electronic circuit integrates a PCF8574 I/O expander with a CD 4040 counter to create a wind speed measurement system. The combination of hardware and software effectively captures and displays wind speed data, making it suitable for applications in meteorology and environmental monitoring.The board is rather simple and is based on a PCF8574 providing to the I2C the output of a CD 4040 counter. A dip switch is provided to select the PCF8574 address and some leds for power on and wind activity. The DIP switch was not soldered thus the circuit will have the address 0G—27. After blowing the anemometer the green led was blinking and a scan on the i2c bus showed that the PCF 8574 was correctly detected. It was time to put the anemometer on the roof: After the hardware, it came the time to write the software. Due to the disappointing I2C support of perl (CPAN couldn`t find Device::SMBus), I`ve decided to switch to C(+) to get the thing done using the i2c-dev interface available from Linux kernel.
The program, named windlogd (wind-logger-daemon) reads the counter values and output the current speed, as show in the following: [root@kynes windlogd]#. /windlogd -s 0x27 -d /dev/i2c-1 Thu Oct 21 10:53:56 2010: samples 108, 92: freq 5. 333 Hz, wind speed 3. 378 m/s Thu Oct 21 10:53:59 2010: samples 124, 108: freq 5. 333 Hz, wind speed 3. 378 m/s Thu Oct 21 10:54:02 2010: samples 140, 124: freq 5. 333 Hz, wind speed 3. 378 m/s. samples 160, 140: freq 6. 667 Hz, wind speed 4. 156 m/s The transfer function between the anemometer is defined in the source. The -d argument sets the bus to be used (defaults to i2c-0), while -s is mandatory and is the device address (can be expressed both in decimal and hexadecimal using the 0x prefix).
The number of pulses at the input can be visually confirmed by connecting a light-emitting diode to the output of the counter.
In this circuit, a counter is utilized to count the number of input pulses. The output of the counter...
When an individual touches the safety box or other protected metal objects, the sensor circuit generates a pulse to the alarm circuit. The positive edge of this pulse activates the semiconductor and thyristor flash GE, subsequently triggering the camera to...
The true utility of the SR latch is evident during transitions of the input switch. Assume that the input switch is of the break-before-make type and starts in the up position. When the switch is up, the input values are...
This experiment can be constructed using a single 8-position DIP switch, although utilizing two switch assemblies may facilitate a better understanding of the concept. One switch assembly is designated to hold the correct code for unlocking the lock, while the...
When the SDA (Serial Data) and SDA' lines are at a logical '1', the circuit is inactive, preventing the optocouplers IC1 and IC2 from transmitting any information. However, once the SDA line transitions to '0', the LED in IC1 becomes...
The Digi-Tach includes a master clock circuit (U6), latch and reset pulse generators (U2-b to U2-d), an input signal conditioner (U1, U2-a), a pulse counter (U3), display components and drivers (DIS1, DIS2, U4, and U5), as well as a voltage...
A simple interconnection of the RS7490 decade counter, RS7447 decoder, and a 7-segment digital display for each desired digit creates an ideal counter for classroom demonstrations and science fair exhibits. With the addition of two extra stages, the display can...
The objective of this project is to create a controller-based model that counts the number of individuals entering a specific room and activates the lighting accordingly. This is achieved through the use of sensors that detect the current number of...
The digital counter circuit described utilizes an infrared signal to detect moving targets, making it suitable for counting small devices on a production line as they move along a conveyor belt. This circuit can also be employed for various other...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more