dsPIC30F2020 LED Psychedelic TC4427A MCP608 MCP6022 MCP6S26

| August 3, 2019 Updated
dsPIC30F2020 LED Psychedelic TC4427A MCP608 MCP6022 MCP6S26

The project requirements are related to technologies adopted: high power LEDs need to be driven with a constant current; digital filters need a fast DSP engine, to be implemented, and an A/D converter is required to transform an audio signal in a numerical representation. Control data communications between central processing unit and external analog components require to have an SPI on board and, last but not least, the capability to link the system with a PC could be very useful for firmware debugging and for tuning some parameters in real time without needing expensive developing tools.

The dsPIC30F2020 perfect matches all these needs having a very powerful 4 channels independent PWM generator with current fail detection suitable for drive 3 LEDs in a buck booster configuration through two MOSFET drivers TC4427A a built-in 2Msps A/D converter and a DSP core featuring 17×17 bit multiplications for filters implementation; an SPI hardware for in-system communications; an RS232 compatible block useful for communications with an external PC.

dspic20f2020-ad-converter-block-consequently-snr-55db-audio-signal-spectrum-120x120 dspic20f2020-pwm-led-lights-signal-power-estimation-filterlab-120x120 high-power-leds-digital-processing-techniques-pwm-120x120 mosfet-drivers-tc4427a-mcp608-mcp6022-automatic-gain-control-mcp6s26-ad-converter-120x120

The analog front-end such as anti-alias filter, fixed-factor amplifier and voltage references could be efficiently realized with rail to rail operational amplifiers such as the MCP608 and MCP6022.  Automatic gain control could be implemented placing a MCP6S26 before the A/D converter block and changing his gain basing on input signal mean square averaged value calculated by the DSP.

Following the audio signal flow we can start to analyze the system from the electret microphone. The signal kept will be amplified and filtered by a 5th order low pass filter realized with an MCP608 and a MCP6022  (passive components selection and filter analysis was done with FilterLab© software). The resulting signal will be applied to the variable gain amplifier MCP6S26 and, then, to the A/D converter inside the dsPIC30F2020. From this point on, all following stages are implemented in digital domain. A first high pass filter is required to eliminate the DC residual (that could be present into the converted signal) then three filters are required to split audio in three components: low, mid and high bands. All digital filters were implemented as IIR filter with the dsPIC FD Lite© software

block-schematic-mcp6s26-ad-converter-dspic30f2020

Filtered and unfiltered buffer signals are evaluated by a Signal Power Estimation routine that calculates four proportional values (three for the LEDs lighting and the fourth used to modify the gain of the external PGA). The three proportional values associated to the tree filtered bands are used to generate in software three 125Hz 16 level PWM. The output of this stage modulates three of the four available hardware PWM channels that, running at 150KHz, are suitable to drive external MOSFETs implementing the buck switching circuits.

Analog front-end subsystem: We would like to have a single power supply system referring to the ground level: this should be useful to reduce the number of electronic components to be used and, consequently, to reduce the size and the cost of the board. At the same time, the audio signal to be analyzed, captured by the microphone coupled in AC by a capacitor, is floating around the ground reference voltage. This is a problem for the A/D converter located in the dsPIC20F2020 that could easily handle signals over the ground reference but not under that. The electrical solution normally used to overcome this problem is to refer the signal to a “virtual ground” located at VDD/2. Virtual ground is implemented with an operational circuit in voltage follower configuration. The overall analog front end working point is referred to this virtual ground. Author: Marco Signorini

dsPIC30F2020 LED Psychedelic electronic projects files:

FILE DOWNLOAD LINK LIST (in TXT format): LINKS-21809.zip

Published: 2012/05/12 Tags: , ,



1 Comment “dsPIC30F2020 LED Psychedelic TC4427A MCP608 MCP6022 MCP6S26

  1. Electronics CircuitsElectronics Circuits

    dsPIC30F3013 Meter Clock MCP6022 MCP4011 MCP9700A

    The goal of this project was to build an unusual desk clock using a combination of old and new technologies. Time is displayed using vintage electro-mechanical meters, but the current time is calculated using a Microchip dsPIC processor. Further, a vintage quartz crystal plus a modern op-amp forms an oscillator that is the time base for the clock. All of the components are mounted in a glass-front box, so that both the old and new components are visible.

    Three vintage meters are used to display the current time. A large meter indicates the hour from 1 to 12, while a smaller meter indicates minutes from 0 to 59. The seconds are not displayed by the clock; instead a small third meter is mounted upside-down so that its pointer can act as an imitation of a clock’s pendulum. The dsPIC30F3013 processor outputs signals to control a pair of MCP4011 digital potentiometers driving MCP6022 op-amps, which then drive the Hours and Minutes meters. In this way, the potentiometers and op-amps form simple D-to-A converter

    REPLY

Leave a Reply

Your email address will not be published. Required fields are marked *