VREG 2 click is a voltage regulator click, with outstanding performances. It has a steady output voltage with the ripple lower than 5mV, short circuit protection with the LED indicator, and high efficiency with minimal power dissipation. The main output regulation element is the LM317, a well-established adjustable voltage regulator, often used in various electrical designs, for its outstanding regulation characteristics. The supporting electronics allows for the reduced dissipation, voltage regulation and short-circuit indication. It consists of the LM358, a dual operational amplifier (op-amp) with high voltage gain, and the LM2596 buck converter. The VREG 2 click can be used with the input voltage in the range of 10V to 35V, and output voltage in the range of 2.5V to 15V, with current up to 600mA.
Due to its performance, this Click board™ can be used for applications which require low ripple regulated voltage within a range between 2.5V and 15V. It can be also used for wall adapter regulators, general purpose power supplies, distributed supply regulators, and similar applications where voltage regulation with the low ripple and wide input voltage range is required.
How does it work?
The electrical circuit on this Click board™ consists of two voltage regulators of which one is a linear voltage regulator, while the second is a switching step down converter also known as the buck converter. Such topology combines the benefits of both worlds: linear regulator offers very low voltage ripple and noise, while the switching regulator provides optimal working conditions, avoiding large voltage difference between the input and output voltage of the linear regulator. Unlike the buck converter, a large difference between the input and the output voltage on the linear regulator lead to significant dissipation losses.
The Click board™ uses the LM2596, a 3A, step down voltage regulator working at 150 kHz, from Texas Instruments. It belongs to Simple Switcher™ line of products, meaning that it supports both continuous and discontinuous modes. This buck DC-DC converter itself can handle from 4.5V up to 40V, but the circuit works reliably with voltages in the range between 9V and 35V. This IC has a reasonably simple layout with just a few external pins. The output voltage of the DC-DC converter is regulated by the feedback loop. Normally, there is a voltage divider with its center pin routed to the FB pin of the LM2596, but on this Click board™, there is a PNP BJT with the 2.7V Zener diode on its emitter, which is used to provide about 3V more voltage on its output, than the desired target voltage. This provides an ideal voltage headroom for the linear regulator, allowing for greater efficiency and less power dissipation.
The linear voltage regulator is LM317, a well-established three terminal adjustable voltage regulator, from Texas Instruments. This IC is used on many voltage regulation designs, as it is very simple, reliable and does not require a big number of external components. The input voltage is provided from the LM2596 and as already mentioned, this voltage is about 3V greater than the target regulation voltage, allowing optimal headroom for LM317 IC. The ADJ pin is used to set the output voltage on this IC. It is driven by the output of the first op-amp of the LM358 IC, a dual operational amplifier, from Texas Instruments. The non-inverting input of this op-amp is controlled by the PWM signal from the MCU and therefore, the mikroBUS™ PWM pin is routed to this non-inverting input. By applying an additional RC filter, PWM signal is converted to a constant linear voltage ranging up to 3.3V, as it is limited by another Zener diode on this input. The inverting pin of this op-amp is connected to an output voltage divider, with its center tap at 3.3V for the maximum output voltage of 15V. This allows the output voltage to be measured by the host MCU. Therefore, this pin is routed to the mikroBUS™ AN pin.
The short circuit protection section is designed with the second op-amp of the LM358 IC, working as a comparator. When the current starts flowing through the 0.5Ω resistor, in the event of a short circuit on the output, it will cause rising of the op-amp output voltage. The red LED indicator labeled as OCP will be lit, indicating the short circuit condition. This will also cause the rising of the FB voltage of the buck regulator, effectively blocking its operation and cutting the power to the output.
NOTE: Do not connect GND IN to the GND externally, these rails should remain separated and connected to the respective terminal inputs on the Click board™ itself.
Specifications
Type | Buck |
Applications | It can be used for precise voltage regulators, wall adapter regulators, general purpose power supplies, distributed supply regulators, and similar applications where voltage regulation with the low ripple and wide input voltage range is required. |
On-board modules | LM2596, a 3A, step down voltage regulator working at 150 kHz, from Texas Instruments; LM317, a three terminal adjustable voltage regulator, from Texas Instruments; LM358, a dual operational amplifier from Texas Instruments. |
Key Features | Low output voltage ripple, high efficiency and low dissipation losses, overcurrent and short circuit protection, thermal shutdown, a wide range of input voltage, adjustable voltage via PWM, output voltage read-out by the host MCU. |
Interface | Analog,PWM |
Input Voltage | 3.3V,5V |
Click board size | L (57.15 x 25.4 mm) |
Pinout diagram
This table shows how the pinout on VREG 2 click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
VREG 2 click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Input voltage | 9 | - | 35 | V |
Output voltage | 2.25 | - | 15 | V |
Output current | - | 0.5 | 0.6 | A |
Short Circuit Current | 0.8 | 0.9 | 1.5 | A |
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED indicator |
LD2 | OCP | - | Short circuit/overcurrent protection LED indicator |
TB1 | VIN | - | Input power supply connection terminal |
TB2 | VOUT | - | Regulated output connection terminal |
Software support
We provide a library for VREG 2 click 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.
Library Description
This library provides parsing functions that will allow a user to control the
voltage output by inputting user-defined parameters.
Key functions:
void vreg2_workParameters(uint8_t setA, uint8_t setB, uint8_t setC, uint8_t setD)
- Function for setting work parameters for setting the output voltage in %.int8_t vreg2_incHandler(uint8_t *in);
- If the setA parameter has been received this function will return the value of 1.int8_t vreg2_decHandler(uint8_t *in);
- If the setB parameter has been received this function will return the value of -1.uint8_t vreg2_printHandler(uint16_t *pwm);
- This function returns flags based on the internal parser state.Examples Description
The application is composed of three sections:
void applicationTask() { if( UART_Rdy_Ptr() ) { rxDat[0] = UART_Rd_Ptr(); vreg2_eventTick(); } pwmDuty += vreg2_incHandler( &rxDat ); pwmDuty += vreg2_decHandler( &rxDat ); vreg2_parseInput( &rxDat, &parseVoltage[0] , &pwmDuty ); temp = vreg2_printHandler( &pwmDuty ); if( temp == VREG2_VOLTAGE_SET ) { WordToStr( pwmDuty, text ); mikrobus_logWrite( "Voltage set to : ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( " %", _LOG_LINE ); } if( temp == VREG2_BACKSPACE_PRESSED_HANDLE ) { mikrobus_logWrite( " ", _LOG_LINE ); mikrobus_logWrite( parseVoltage, _LOG_TEXT ); } if( temp == VREG2_CHARACTER_RECEIVED ) { mikrobus_logWrite(rxDat,_LOG_TEXT); } if( temp == VREG2_NUMBER_PARSER_ENABLED ) { mikrobus_logWrite( "Insert value from 1 to 99%", _LOG_LINE ); } vreg2_set( pwmDuty ); rxDat[0] = 0; }
Additional Functions:
void vreg2_set(uint16_t pwmIn)
- Set's the PWM output from 0 to 100%.void vreg2_pwmInit()
- Initializes the PWM peripheral.The full application code, and ready to use projects can be found on our Libstock page.
Other mikroE Libraries used in the example:
Additional notes and information
Depending on the development board you are using, you may need 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
This click board is supported by 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.
For more information about mikroSDK, visit the official page.
Downloads
mikroBUS™ Standard specification