2024-01-03
Pulse generator on a PIC controller.
10 fixed frequencies
10 fixed frequencies
The circuitry presented here uses another pic controller of the brand PIC16F1503,
which reveals another side of them, from the point of view of other possibilities for the formation of impulses.
The device allows you to generate 4 channels with rectangular pulses of different phases and duty cycles, and 10 fixed frequencies in the range from 0.245 to 125 kHz.
To generate the frequency, quartz resonators are not required, since the internal oscillator of the microcontroller is used here, the accuracy of which is 2%.
All adjustments are made using just one encoder with a built-in button.
Unlike previously presented schemes,
This approach has one small drawback, due to the lack of internal non-volatile memory in the controller, which can pay off its meager cost.
Otherwise, the circuit design and other settings are the same.
The schematic diagram of the device is shown in Figure 3.
The EN1 encoder performs all adjustments to the output pulses on the CHA-CHD channels using the DD1 microcontroller.
The choice of one of three adjustment modes is highlighted by one of the LEDs D1-D3.
The power supply for the circuit is 3..5 volts.
Fig.3. Schematic diagram of a pulse generator on a PIC16F1503 microcontroller with 10 fixed frequencies
|
The adjustment mode of the EN1 encoder is selected by pressing the button located in it and is highlighted by one of the LEDs D1-D3.
Depending on the selected mode, the rotation of the encoder knob will adjust:
- D1 - select one of 10 fixed frequencies: 245 Hz, 490 Hz, 978 Hz, 1954 Hz, 3906 Hz, 7812 Hz, 15625 Hz, 31250 Hz, 62500 Hz, 125000 Hz;
- D2 - delay of the pulse edge of the CHB channel, counted from the pulse edge in the CHA (PhB) channel;
- D3 - delay of the front of the pulse of the CHC channel, counted from the fall of the pulse in the CHA (PhC) channel.
Fig.4. Two diagrams (a and b) showing the possibilities of generating pulses on four channels of the generator
|
The pulse in the CHD channel will start at the edge of the pulse from the CHB channel, and end at the edge of the pulse from the CHC channel.
This is reflected in more detail and clearly in the diagrams from Figure 4.
Application example
Pulses in the CHA channel have a duty cycle of 50%, so this channel can be used as the main one, for example for synchronization.
The CHB and CHC channels can be used for two anti-phase push-pull channels with adjustable dead-time and balanced or unbalanced output.
The CHD channel can be used, for example, to turn on a pulsed high-frequency generator.
Such systems can be used in devices to study, or even generate, excess energy.
Details
Below is a list of electronic parts to assemble the device:
- DD1 - microcontroller PIC16F1503;
- EN1 - encoder with a button (switch), for example EC11;
- D1-D3 - any LEDs for voltages below 4 volts, for example such.
Firmware file
Since the circuit that sets the frequency has changed, the firmware program will also differ from previous.
All other instructions and device settings remain the same.
The file for flashing the microcontroller can be downloaded from here.
Instructions for flashing the pic controller firmware can be found here.
Printed circuit board
Below is the PCB layout for the option with a power adapter.
Please contactHowever, the DD1 controller is used here in a DIP14 package.
The entire circuit can be powered from a voltage source ranging from 5 to 24 volts.
Production version: PCB (open)
The production option provides a set of documentation for manufacturing a printed circuit board in production:
GERBER file for PCB, BOM file of the specification of components and a schematic diagram showing the values of the elements.
All this allows you to immediately order a PCB, for example, here, and then quickly assemble it.
Setting up a correctly assembled circuit with a correctly firmware controller is not required.