Description: Many microcontrollers or PICs have uncommitted digital-to-analog converter (DAC) outputs that can generate sine waves. However, these outputs typically have low resolution (8 to 10 bits), resulting in total harmonic distortion (THD) in the range of 1%. Alternatively, using a fifth- or seventh-order switched-capacitor filter with a square-wave output requires the use of two I/O pins on the microcontroller unit (MCU). One pin is designated for the filter input, while the other is used for the filter clock. Both outputs must produce square waves that maintain a 100:1 ratio. Due to the additional processes the MCU must manage beyond sine wave generation, dedicating two timers or one timer and firmware often imposes excessive system overhead. Consequently, designers may need to opt for a faster or more expensive MCU. A more efficient solution involves utilizing an RDD104 selectable four-decade CMOS divider and an MSFS5 switched-capacitor filter to create a two-chip sine wave source with 0.2% distortion. The RDD104 features two pins that allow selection among four dividers: divide-by-10, divide-by-100, divide-by-1000, and divide-by-10k. This device can operate with either an external clock on pin 5 or with a crystal. Its maximum frequency range is 1.5 MHz at 5 V DC. The schematic illustrates the square-wave-to-sine-wave converter. A crystal and a 10 MΩ resistor connect across pins 5 and 6 of the RDD104, with a 100 pF capacitor (C5) connected to pin 5. The input capacitance of the MSFS5, along with the connection between pin 6 of the RDD104 and pin 4 of the MSFS5, ensures equal capacitance on pin 2 of the crystal. With DIV_SEL_1 set low and DIV_SEL_2 set high, the 100:1 divider is selected. The MSFS5 is a pin-selectable, seventh-order, low-pass/six-pole bandpass switched-capacitor filter capable of being configured as Butterworth, Bessel, or elliptic low-pass filters, as well as full, 1/3-, and 1/6-octave bandpass filters. The Clock_Out of the RDD104 is AC-coupled to the Clock input of the MSFS5, which is configured for 1/6-octave bandpass operation to maximize attenuation of square-wave harmonics without affecting the fundamental frequency. Bandpass and 1/6-octave configuration is achieved by connecting FSEL and TYPE to VDD. The filter operates on a single supply, with VDD at 5 V, VSS at 0 V, and GND connected to mid-supply using two resistors (R4 and R5). A 0.1 µF capacitor decouples the input. The output from the RDD104 is attenuated using two 10 kΩ resistors and AC coupled to the filter input of the MSFS5. This configuration produces a 10 kHz, 1 V RMS sine-wave output. The total current consumption is less than 2 mA at 5 V DC, making this solution suitable for portable applications. The total harmonic distortion is measured at 0.2% over a bandwidth from 400 Hz to 300 kHz using an AP Portable One Plus Access.
The described circuit employs a combination of a CMOS divider and a switched-capacitor filter to effectively generate high-quality sine waves from a microcontroller. By utilizing the RDD104, the circuit can achieve precise frequency division, allowing for flexible sine wave generation while minimizing the load on the MCU. The MSFS5 filter further enhances the output by selectively filtering out unwanted harmonics, ensuring that the fundamental frequency remains intact. This design is particularly advantageous in applications where low power consumption and compact size are critical, such as in portable electronic devices. The careful selection of components and configuration parameters allows for a robust and efficient sine wave generation system that meets the demands of modern electronic applications.Many microcontrollers or PICs will have uncommitted digital-to-analog converter (DAC) outputs that can be used to generate sine waves. But these are generally low resolution (8 to 10 bits), yielding a total harmonic distortion (THD) in the 1% range.
Or, using a fifth- or seventh-order switched-capacitor filter with a square-wave output ties up two I/O pins on the MCU. One output is used for the filter input and one for the filter clock. Also, the two outputs must be square waves and track at a 100:1 ratio. Because the MCU will have more processes to handle than just generating a sine wave, tying up two timers or one timer and firmware usually requires too much system overhead. Therefore, the system designer is forced to use a faster or more expensive MCU. Here`s a better approach: Use an RDD104 selectable four-decade CMOS divider and an MSFS5 switched-capacitor filter to create a two-chip, 0.
2%-distortion sine-wave source. The RDD104 has two pins that select one of four dividers: divide-by-10, divide-by-100, divide-by-1000, and divide-by-10k. The device can be used either with an external clock on pin 5 or with a crystal. The maximum frequency range is 1. 5 MHz at 5 V dc. The figure shows the schematic for the square-wave-to-sine-wave converter. A crystal and a 10-MO resistor are connected across pins 5 and 6 of the RDD104. A 100-pF capacitor (C5) is tied to pin 5. The input capacitance of the MSFS5 and the connection between pin 6 of the RDD104 and pin 4 of the MSFS5 provides equal capacitance on pin 2 of the crystal.
With DIV_SEL_1 tied low and DIV_SEL_2 tied high, the 100:1 divider is selected. The MSFS5 is a pin-selectable, seventh-order, low-pass/six-pole bandpass switched-capacitor filter. The eight-pin IC can set for Butterworth, Bessel, or elliptic low-pass filters; or for full, 1/3- and 1/6-octave bandpass filters. Clock_Out of the RDD104 is ac-coupled to the Clock input of the MSFS5. The MSFS5 is set for 1/6-octave bandpass operation for maximum attenuation of square-wave harmonics without attenuating the fundamental.
Bandpass and 1/6-octave configuration is obtained by tying FSEL and TYPE to VDD. The filter is configured for single-supply operation, with VDD at 5 V, VSS at 0 V, and GND tied to mid-supply with two resistors (R4 and R5). A 0. 1- µF capacitor decouples the input. The output of the RDD104 is attenuated with two 10-kO resistors and ac coupled to the filter input of the MSFS5.
With this configuration, a 10-kHz, 1-V rms sine-wave output is achieved. Total current consumption is less than 2 mA at 5 V dc, making this solution ideal for portable applications. THD is at 0. 2% for a bandwidth from 400 Hz to 300 kHz (measured with an AP Portable One Plus Access).
Drive a small (3.6V, <1A) brushed motor bidirectionally with a PIC microcontroller (MCU). The available space is extremely limited, so a single 3.6V power supply will be used for both the motor and the PIC, with minimal drive circuitry required. There is no dedicated motor driver IC that operates at this low voltage, making a discrete H-bridge the most suitable drive arrangement. The NXP PMV30UN and PMV32UP have been identified as suitable N-type and P-type drive MOSFETs. Since both the PIC and the motor share the same power supply, it is questioned whether it is possible to eliminate the usual driving circuitry for an H-bridge and connect the transistors directly to the MCU pins. Potential pitfalls of this approach should also be considered.
To design a bidirectional motor drive circuit using a PIC microcontroller and a discrete H-bridge configuration, the following considerations must be taken into account. The H-bridge consists of four MOSFETs arranged in a configuration that allows current to flow through the motor in either direction, enabling bidirectional control. The NXP PMV30UN and PMV32UP MOSFETs are suitable candidates due to their low on-resistance and capability to operate at the required 3.6V supply voltage.
The connections between the PIC MCU and the MOSFETs should be made with consideration of the gate drive requirements. Directly connecting the MOSFET gates to the MCU pins can be feasible, but it is essential to ensure that the MCU can provide sufficient gate drive voltage to fully turn on the MOSFETs. A typical threshold voltage for these MOSFETs is around 1V, so the output high level from the PIC should exceed this threshold to ensure efficient operation.
It is also critical to incorporate pull-down resistors on the gate pins to prevent the MOSFETs from floating when the MCU is in a high-impedance state. This will help avoid unintended motor activation. Additionally, using gate resistors can help dampen any oscillations and limit inrush current during switching, which could potentially damage the MOSFETs or the MCU.
Another consideration is the back EMF generated by the motor when it is switched off or when changing direction. This can induce voltage spikes that may damage the MCU or the MOSFETs. To mitigate this risk, flyback diodes should be placed in parallel with each MOSFET to provide a path for the back EMF, ensuring safe operation of the circuit.
Thermal management is also a critical aspect of the design. Although the MOSFETs are rated for low on-resistance, continuous operation near their current limits can lead to significant heat generation. Adequate heat dissipation measures, such as heat sinks or thermal pads, should be considered.
In summary, while it is possible to connect the MOSFETs directly to the MCU pins, careful attention must be given to gate drive requirements, protection against back EMF, and thermal management to ensure reliable and efficient operation of the bidirectional motor drive circuit.
The microcontroller is able to make about 7000 complete line-following decisions per second, which is almost 7 decisions per millimeter when the robot is going full speed. By upping the clock, unrolling loops, and removing my wireless debugging and extraneous...
There are several methods to read multiple switch inputs using a reduced number of microcontroller unit (MCU) pins. One approach involves using an analog MCU pin to read multiple switches by assigning a unique voltage to each switch through a...
The uJDM PIC programmer circuit diagram is designed for programming simple microcontrollers such as the PIC16F84, PIC16F84A, and PIC16C84.
The uJDM PIC programmer is a compact and efficient circuit used for programming a range of Microchip PIC microcontrollers. It operates through...
Prototype board designed for 8-pin PIC microcontrollers featuring a 4 MHz ceramic resonator, an external 8K EEPROM, a power supply circuit, and an RS232 port. It includes two small holes for soldering DC power lines (Vdd/Gnd), compatible with voltages above...
This simple circuit can be used to program the PIC16F84 and similar flash memory type parts. It uses a cheap 555 timer IC to generate the programming voltage.
The circuit utilizes a 555 timer IC configured in astable mode to produce...
A small transmitter board interfaces with a microcontroller and conductivity probe to measure liquid conductance and conductivity. Precise equations and measurements are provided for this microcontroller-controlled conductivity meter.
The described circuit consists of a compact transmitter board that serves as an...
This circuit utilizes an 87C57 microcontroller along with several peripherals to convert X-10 power-line carrier-code formats from a personal computer for use with an X-10 power-line interface in a home control system. Software details can be found in the reference....
A simple square wave oscillator can be created using two gates from a CMOS 4011 NAND chip. Alternatively, a CMOS 4001 chip or a TTL equivalent can also be utilized. In this circuit, the mark-space ratio can be independently controlled...
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