Hello!
In today’s example project we are continuing to explore more analog centric projects. In this example we are implementing a 3 channel amplifier with a dynamic gain switch. Based on your end design you may want to change the gain of your amplifier when reading in your analog signals. In this example we use a button selection to control the gain on the amplifier, but in your design you may change the gain by inputs from your system. The values are then sent over the UART port to be displayed on a Hyperterminal application.
Forum Post Attachments:
At the bottom of this post we are including the following items:
- Example Project Zip File
- Project Images
Components Used:
The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:
- Amux
- OpAmp
- ADC SAR Seq
- UART
- Debouncer
- CyClock
- CyPins
Firmware Description:
The main.c firmware is included in the example project. Please review the commented sections for more details.
The Opamp is used to amplify the input signal. Selection of input channel is done using Input_Amux and selection of the Gain is done using the Gain_Amux. The UART is used to send ADC results through the UART bridge on the PSoC 5LP.
The Debouncer component is used to remove glitches from the input switch. The SAR ADC converts the analog output of the OpAmp into digital values. The ADC also generates an interrupt when its input is outside the defined voltage window (250mV-750mV). The LED is turned on when the ADC generates this interrupt.
The data displayed over the UART includes the ADC output of the active channel along with the channel number to the HyperTerminal.
Hardware Connections:
The external hardware connections for this example are detailed in the schematic capture for this project. We include the external components and layout information using the annotated components. These annotated components detail the various resistor values needed to control the variable gain amplifier.
Test Your Project:
Program the Pioneer board and connect your three input signals. Then connect the UART to the PSoC 5LP and launch the hyperterminal software to view the UART output.
I hope this example can help you in your design.
Best,
Matt