Hz To V Click Board
Hz To V Click Board
The HZ to V Click Board™ is a device that can convert the input frequency of the signal with virtually any wave shape to a DC voltage output, with a level proportional to the input frequency. It has a linear response, and by applying a signal with a frequency between 10Hz to 10kHz on its input, the Click Board™ will generate a DC voltage, ranging from 0V to 3.3V.
The Hz to V Click Board™ features very good linearity, covers a wide input frequency range from 10Hz to 10kHz and it has good temperature stability.
Software Support
We provide a library for the Hz to V Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
Example Description
The demo application shows how to control the Hz to V click using MCU's PWM module.
The demo application is composed of two sections:
- Application Task - Alternates between different output voltages.
- hz2v_setOutputVoltage - Sets the PWM frequency to the required value, changing the
output voltage.//Sets the output voltage in millivolts void hz2v_setOutputVoltage(uint16_t voltage) { pwmPeriod = PWM_TIM5_Init(voltage*2); PWM_TIM5_Set_Duty(pwmPeriod/2, _PWM_NON_INVERTED, _PWM_CHANNEL1); PWM_TIM5_Start(_PWM_CHANNEL1, &_GPIO_MODULE_TIM5_CH1_PA0); } void applicationTask() { hz2v_setOutputVoltage(5000); //5 V output Delay_ms(3000); hz2v_setOutputVoltage(2500); //2.5 V output Delay_ms(3000); hz2v_setOutputVoltage(1000); //1 V output Delay_ms(3000); hz2v_setOutputVoltage(500); //0.5 V output Delay_ms(3000); }
The full application code, and ready to use projects can be found on our LibStock page.
Other MikroElektronika Libraries used in the example:
- PWM
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The Hz to V Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant click board demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Hz To V Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.