MinimaConstructionGuide R7
MinimaConstructionGuide R7
MinimaConstructionGuide R7
Introduction
This document is a construction guide for the Minima all-band HF transceiver using the PCB (printed
circuit board) designs developed by Adrian Preda YO4HHP. This is a work in progress, with updates
being release sporadically and with evolving rights restrictions. The intent is to retain control until
completion and then provide a final released under an appropriate rights mechanism (e.g. Creative
Commons or GPL).
The build instructions will be performed in sections, according to PCB board. The first board
constructed is the Digital Board, which contains the Arduino microcontroller and the Si570 VFO
(variable frequency oscillator). The second board constructed will be the Main Board, which contains
the RF, IF, and audio circuitry. The Digital Board will be required during the testing of some sections of
the Main Board. The Serial Board will not be used in this build of the Minima transceiver. Instead, a
USB-to-TTL serial adapter will be used.
The design of the Minima transceiver is evolving and it is the intent that this document keep track with
that evolution in order to avoid divergence and maintain relevancy. That being said, new PCB designs
for the Minima are on hold after the pioneering work accomplished by Adrian YO4HHP. To support
this evolution under this constraint, it may be necessary to adapt the PCB to support the current state of
the Minima design.
Jumper Installation
The PCB for the Digital Board has circuit traces on only one side. In order to complete the circuit
routing, it is necessary to add some wire jumpers. The placement of these jumpers is shown in
The completed assembly of the power buss components is shown in Illustration 3 and Illustration 4.
Illustration 3: Component side of the Digital Board with all power buss components installed.
2. Solder the 1 Kohm pull-up resistor R4 on to the Digital Board. This resistor is shown on the
lower right-hand side of Illustration 6. If a ¼ Watt resistor is used, it will need to be install in a
'hair pin' fashion.
3. Solder the 10 Kohm pull-up resistor R7 on to the Digital Board. This resistor is shown on the
lower left-hand side of Illustration 6. If a ¼ Watt resistor is used, it will need to be install in a
'hair pin' fashion.
4. Solder the 16 MHz crystal X2 on to the Digital Board. The crystal is shown on the lower center
of Illustration 6.
5. Solder the 28-pin DIP socket on to the Digital Board. The socket is shown on the center of
Illustration 6.
6. Solder the 9-pin right-angle header on to the Digital Board. The socket is shown on the lower
right of Illustration 6.
7. Solder the 9-pin right-angle header P2 on to the Digital Board. The socket is shown on the
lower right of Illustration 6.
8. Solder the 7-pin right-angle header P3 on to the Digital Board. The socket is shown on the
lower center of Illustration 6.
9. Solder the 5-pin right-angle header P4 on to the Digital Board. The socket is shown on the
lower center of Illustration 6.
The installation of the Arduino microcontroller is shown in Illustration 8. In this example, a Sparkfun
labeled ATMEGA328 with Arduino Optiboot (Uno) pre-programmed into it.
For this assembly guide, the Arduino microcontroller will be programmed with a USB-to-TTL serial
adapter. Consequently, it is necessary to construct an appropriate interface cable. Given that the pinout
of the TTL serial interface may vary for different USB-to-TTL serial adapters, the cable will be
described using signal names only. The specification of the programming cable is provided in Table 3.
Table 3: Pin specifications for the Arduino microcontroller programming cable.
USB/TTL Serial Adapter Pin Five-Pin Connector on Digital Board
Vcc 5V (left-most pin)
DTR RST (pin between center and left-most pin) – Place a 0.1 uF
(approximately) capacitor in series between DTR and RST pins
Ground Ground (center pin)
TX RX (pin between center and right-most pin)
RX TX (right-most pin)
A programming cable was constructed using crimp-on pins and connector shells taken from discarded
PC wiring harnesses. A capacitor with a value of approximately 0.1 uF was placed between the DTR
and the reset (RST) pin as part of the auto-reset capability. The completed programming cable is shown
in Illustration 9.
The connection of the USB-to-TTL serial adapter to the Digital Board via the programming cable is
shown in Illustration 10.
4. Start the Arduino IDE and load the 'Blink' sketch. This sketch can be loaded from the Arduino
IDE menu bar via Files->Examples->01.Basics->Blink. A listing of the 'Blink' sketch is
provided in Text 1.
5. Ensure that the correct Arduino board type is selected. The Arduino Uno board type can be
selected from the Arduino IDE menu bar via Tools->Board->Arduino Uno.
6. Ensure that the correct serial port is selected to talk to the USB-to-TTL serial adapter. The name
of the serial port depends upon the operating system being used. To determine this, consult the
manufacturer of the USB-to-TTL serial adapter and operating system guidelines. The serial
ports available to the Arduino IDE can be selected from the menu bar via Tools->Serial Port
7. Select the 'Upload' button on the Arduino IDE button bar to compile and load the 'Blink' sketch
into the Digital Board.
8. If the compile and load of the sketch is successful and there are no wiring error in the Digital
Board, the LED should blink once per second. If this does not occur, there may be wiring or
soldering errors on the Digital Board or the connections between the computer, USB-to-TTL
serial adapter, and the Digital Board may be incorrect.
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
1. Temporarily connect the 16x2 LCD display to the Digital Board by plugging it into the LCD
connector. To avoid placing mechanical stress on the LCD connector, insert stand-offs between
the LCD's mounting holes and the corresponding holes on the Digital Board and securing them
with 2x56 screws and nuts.
2. If not done already, attach one end of the programmer cable to the USB-to-TTL serial adapter
output and the other end to the five-pin connector on the Digital Board.
3. If not done already, attach one end of the USB cable to the USB port on the computer and the
other end to the USB port on the USB-to-TTL serial adapter. This will allow the computer's
operating system to enumerate the adapter and supply it with a device identifier.
4. Start the Arduino IDE and load or type in the sketch lcd_testing.ino. This sketch can be loaded
from the Arduino IDE menu bar via Files->Open. A listing of the sketch is provided in Text 2 if
the sketch file is not available.
5. Ensure that the correct Arduino board type is selected. The Arduino Uno board type can be
selected from the Arduino IDE menu bar via Tools->Board->Arduino Uno.
6. Ensure that the correct serial port is selected to talk to the USB-to-TTL serial adapter. The name
of the serial port depends upon the operating system being used. To determine this, consult the
manufacturer of the USB-to-TTL serial adapter and operating system guidelines. The serial
ports available to the Arduino IDE can be selected from the menu bar via Tools->Serial Port
7. Select the 'Upload' button on the Arduino IDE button bar to compile and load the sketch into the
Digital Board.
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
void setup() {
lcd.begin(16, 2);
lcd.clear();
lcd.print("Banana");
lcd.setCursor(10, 1);
lcd.print("Banana");
}
void loop() {
}
Illustration 12: LCD display results from the Arduino microcontroller LCD test.
Illustration 13: Cable set used for Arduino Microcontroller I/O testing.
2. Plug one switch cable onto the PTT pin and the ground pin adjacent to it. Plug one switch cable
onto the FN pin and the ground pin adjacent to it. Plug one switch onto the KEY pin and the
ground pin adjacent to it. Plug the potentiometer cable onto the three TUNE pins such that
voltage on the wiper will decrease as it is rotated clockwise. Finally, plug the seven-pin
connector shell onto the seven-pin connector, assuring that the LED/resistor pairs are connected
to the BFO and BAND pins. The proper setup is shown in Illustration 14.
3. If not done already, attach one end of the programmer cable to the USB-to-TTL serial adapter
output and the other end to the five-pin connector on the Digital Board.
4. If not done already, attach one end of the USB cable to the USB port on the computer and the
other end to the USB port on the USB-to-TTL serial adapter. This will allow the computer's
operating system to enumerate the adapter and supply it with a device identifier.
5. Start the Arduino IDE and load or type in the sketch io_testing.ino. This sketch can be loaded
from the Arduino IDE menu bar via Files->Open. A listing of the sketch is provided in
Appendix C, if the sketch file is not available.
6. Ensure that the correct Arduino board type is selected. The Arduino Uno board type can be
selected from the Arduino IDE menu bar via Tools->Board->Arduino Uno.
7. Ensure that the correct serial port is selected to talk to the USB-to-TTL serial adapter. The name
of the serial port depends upon the operating system being used. To determine this, consult the
manufacturer of the USB-to-TTL serial adapter and operating system guidelines. The serial
ports available to the Arduino IDE can be selected from the menu bar via Tools->Serial Port
8. Select the 'Upload' button on the Arduino IDE button bar to compile and load the sketch into the
Digital Board.
9. If the compile and load of the sketch is successful and there are no wiring error in the Digital
Board, the LCD should display should appear, as shown in Illustration 15. If this does not occur,
there may be wiring or soldering errors on the Digital Board or the connections between the
computer, USB-to-TTL serial adapter, and the Digital Board may be incorrect.
10. Adjusting the potentiometer should cause the POT reading to vary between 0 and 1023.
Pressing the switch connected to the TX pin should cause the TX/RX value to display '0'. A
value of '1' should be displayed the switch is released. Pressing the switch connected to the
KEY pin should cause the AK value to display '0'. A value of '1023' should be displayed when
the switch is released. Pressing the switch connected to the FN pin should cause the FN value to
display a valuse close to '0'. A value close to '1023' should be displayed when the switch is
released. The LEDs should be turning on and off at different rates, essentially counting from
zero to sixteen in binary fashion repeatedly. Any errors in operation is probably caused by a bad
cable connection or an error in the test sketch.
Illustration 17: Circuit side of the Digital Board with the Si570 clock generator installed.
10. After fifteen seconds, the content of the LCD should change to appear as shown in Illustration
19. The information displayed are decimal representations of the startup values of the Si570's
High Speed (HS) and N1 dividers, and the hexidecimal representation of the Si570's startup
Reference Frequency (RFREQ) . This step should be successful if step 9. was successful.
Illustration 19: Display of HS, N1, and RFREQ, as part of the Si570 testing sketch.
Illustration 20: Display of the Si570 Reference Frequency (in MHz) and the crystal frequency (in Hz).
12. At this point, the frequency displayed on the frequency counter should change to the value
listed for SI570_NEW_FREQUENCY. Please note that the accuracy of the frequency displayed is
dependent upon several factors, including the accuracy of the frequency counter used, the
specified accuracy of the Si570, and the ambient temperature present during the test. This step
should be successful if step 11. was successful.
This completes testing of the Si570 clock device and the assembly and test of the Minima Digital
Board.
The location of the R/T switch circuity on the layout of the Main Board is shown in Illustration 24
highligheted in yellow. Note that on the layout, R62 is labled as a 47 Kohm, while the schematic in
Illustration 23 indicates a value of 4.7 Kohm. There has been an issue as to the correct value of resistor
to use. For this construction guide, a value of 47 Kohm has found to be satisfactory.
While the 12 Volt power header is not specifically a part of the R/T switch circuitry, it is included in
this assembly session for the simple reason providing a convenient means of applying power to the
Main Board. The 12 Volt power header is circled in red in the upper left hand corner of Illustration 24.
During the assembly of the R/T switch circuitry, the header JP8 (R/T) and the header JP10 (CW) will
be soldered to the Main Board at the same time. While JP10 is technically a distinct header from JP8,
its physical placement next to JP8 warrants treating them together as a single 1x2 physical header.
The parts list for the R/T Switch circuitry is presented in Table 4. As mentioned previously, the R/T
header (JP8) and the CW header (JP10) are treated as one, single 1x2 pin header. In addition, R62 will
be a 47 Kohm resistor.
The following steps describe the installation of the components for the R/T Switch section of the Main
Board.
The completed assembly of the R/T Switch circuitry is show in Illustration 25.
Illustration 25: Component placement for the Main Board R/T Switch circuitry.
Illustration 26: Cable used for Main Board R/T Switch testing.
3. Apply power to Digital Board and Main Board. If the LCD on the Digital Board does not
initialize and display the test messages, turn off power immediately and determine the cause.
4. Measure the voltage on the 2x1 pin header labeled "+R/-T". The pin closest to the edge of the
board should measure close to zero volts. The pin furthest from the edge of the board should
measure about 12 volts. If this is not the case, turn off power immediately and determine the
cause.
5. Press the PTT switch connected to the Digital Board. When the switch is depressed, you should
hear the G5V-2 relay switch. While keeping the switch depressed, measure the voltage on the
2x1 pin header labeled "+R/-T". The pin closest to the edge of the board should measure about
12 volts. The pin furthest from the edge of the board should measure close to zero volts. If this
is not the case, turn off power immediately and determine the cause.
6. When the PTT button is released, the relay should de-energize and the voltages on the "+R/-T"
header should return to their previous values. If this is not the case, turn off power immediately
and determine the cause.
This completes the testing of the R/T Switch circuitry of the Main Board.
Illustration 28: Schematic of the Main Board Output Audio Amp circuitry.
Illustration 29: Layout of the Main Board Output Audio Amp circuitry.
The following steps describe the installation of the components for the Output Audio Amp section of
the Main Board.
1. Solder R27, a 22 ohm resistor, next to Q20, a 2N3904 NPN transistor.
2. Solder R28, a 22 ohm resistor, next to Q21, a 2N3906 PNP transistor.
3. Solder R29, a 2.2 Kohm resistor, between to Q20 and Q22, 2N3904 NPN transistors.
4. Solder R30, a 100 ohm resistor, below to Q22, a 2N3904 NPN transistor.
5. Solder R31, a 470 ohm resistor, below to Q22, a 2N3904 NPN transistor.
6. Solder R32, a 47 Kohm resistor, above to Q22, a 2N3904 NPN transistor.
7. Solder R33, a 10 Kohm resistor, below to Q22, a 2N3904 NPN transistor.
8. Solder R34, a 22 ohm resistor, next to Q22, a 2N3904 NPN transistor.
9. Solder D3, a 1N4148 diode, next to Q20, a 2N3904 NPN transistor. Ensure that the cathode
(black band) of the diode is oriented correctly prior to soldering.
10. Solder D4, a 1N4148 diode, next to Q21, a 2N3906 PNP transistor. Ensure that the cathode
(black band) of the diode is oriented correctly prior to soldering.
11. Solder Q20, a 2N3904 NPN transistor, next to R27, a 22 ohm resistor. Ensure that the flat side
of the transistor is oriented correctly prior to soldering.
12. Solder Q21, a 2N3906 PNP transistor, next to R28, a 22 ohm resistor. Ensure that the flat side of
the transistor is oriented correctly prior to soldering.
13. Solder Q22, a 2N3904 NPN transistor, below to R32, a 47 Kohm resistor. Ensure that the flat
side of the transistor is oriented correctly prior to soldering.
14. Solder JP7, a 1x3 pin header, to the left of R33, a 10 Kohm resistor.
15. Solder JP5, a 1x2 pin header, to the right of R28, a 22 ohm resistor.
16. Solder C20, a 50 uF electrolytic capacitor, to the right of Q22, a 2N3904 NPN transistor. Ensure
that the polarity of the capacitor is oriented correctly prior to soldering.
17. Solder C21, a 50 uF electrolytic capacitor, to the right of R31, a 470 ohm resistor. Ensure that
the polarity of the capacitor is oriented correctly prior to soldering.
18. Solder C28, a 10 uF electrolytic capacitor, above header JP7, the VOL connector. Ensure that
Illustration 30: Component placement for the Main Board Output Audio Amp circuitry.
Illustration 31: Cable set used for testing the Main Board Output Audio Amp circuit.
Illustration 32: Test setup for the Main Board Output Audio Amp circuit test.
4. Turn on the switch providing power to the Digital Board and Main Board. If, as shown in
Illustration 32, the power switch is integral to the volume potentiometer, ensure that the volume
is not increased significantly and is set to minimum. If the messages "Minima Test Tool" and "1
KHz Audio Tone" do not appear on the Digital Board's LCD, remove power from the test setup
and investigate the cause.
5. Attach the mini hook to the input terminal of the potentiometer designated as signal input.
6. Gradually increase the volume of the potentiometer. A 1 KHz tone should be heard coming from
the headphones. It should not be necessary to increase the potentiometer setting by very much
to obtain an audiable tone.
This completes the testing of the Output Audio Amp circuitry on the Main Board.
The location of the RX Audio Preamp circuitry on the layout of the Main Board is shown in Illustration
34 highlighted in green. Note that the physical spacing betweem the components is fairly tight. Care
must be taken to follow the specified assembly sequence in order to simplify the insertion and soldering
The following steps describe the installation of the components for the RX Audio Preamp section of the
Main Board.
1. Solder R35, a 100 Kohm resistor, to the upper right of Q23, a 2N3904 NPN transistor.
2. Solder R36, a 1 Kohm resistor, to the upper left of Q23, a 2N3904 NPN transistor.
3. Solder R37, a 1 Kohm resistor, to the lower left of Q23, a 2N3904 NPN transistor.
4. Solder R38, a 4.7 Kohm resistor, to the left of Q24, a 2N3904 NPN transistor.
5. Solder R39, a 10 Kohm resistor, to the lower right of Q25, a 2N3904 NPN transistor.
6. Solder R40, a 1 Kohm resistor, to the left of C33, a 50 uF electrolytic capacitor.
7. Solder R41, a 100 Kohm resistor, above Q25, a 2N3904 NPN transistor.
8. Solder R42, a 10 Kohm resistor, to the upper left of Q25, a 2N3904 NPN transistor.
9. Solder Q23, a 2N3904 NPN transistor, to the lower left of R35, a 100 Kohm resistor. Ensure
that the flat side of the transistor is oriented correctly prior to soldering.
Illustration 35: Component placement for the Main Board RX Audio Preamp circuitry.
Illustration 36: Cable set used for testing the Main Board RX Audio Preamp circuit.
3. Connect the Digital Board and Main Board using the cables as shown in Illustration 37.
Connect the T/R and CW cable as performed in previous tests. Connect the signal-bearing mini
Illustration 37: Test setup form the Main Board RX Audio Preamp circuit test.
4. Turn on the switch providing power to the Digital Board and the Main Board. Note that, no
sound will be heard coming from the headphones initially. The power-up delay circuit in the
preamp takes a few seconds to charge up and provide current to the rest of the preamp circuit.
5. Increase volume of the Output Audio until the squarewave tone is heard coming from the
headphone. It may also be necessary to very slightly adjust the trimmer pot supplying the
squarewave signal to provide more signal injected into the preamp input. If no tone is heard,
regardless of volume adjustment, remove power from the Digital and Main Boards and
determine the cause of the problem. A problem may exist due to an error that occurred during
assembly or in setting up for the test.
6. Press the PTT button and observe that the squarewave tone should stop coming from the
headphone. Releasing the PTT should result in the squarewave tone being heard from the
headphones again.
This completes the testing of the RX Audio Preamp circuitry on the Main Board.
The location of the Mic Preamp circuity on the layout of the Main Board is shown in Illustration 39,
highlighted in brown. Note that the physical spacing betweem the components is fairly tight. Care must
be taken to follow the specified assembly sequence in order to simplify the insertion and soldering of
components.
The parts list for the Mic Preamp is presented in Table 7.
The following steps describe the installation of the components for the RX Audio Preamp section of the
Main Board.
1. Solder R43, a 220 ohm resistor, to the lower right of Q26, a 2N3904 NPN transistor.
2. Solder R44, a 220 ohm resistor, to the right of R43, a 220 ohm resistor.
3. Solder R45, a 2.2 Kohm resistor, to the left of R43, a 220 ohm resistor.
4. Solder R46, a 10 Kohm resistor, above Q26, a 2N3904 NPN transistor.
5. Solder R47, a 1 Kohm resistor, to the right of R46, a 10 Kohm resistor.
6. Solder R49, a 4.7 Kohm resistor, to the left of R46, a 10 Kohm resistor.
7. Solder R48, a 10 ohm resistor, to the upper left of R49, a 4.7 Kohm resistor.
8. Solder Q26, a 2N3904 NPN transistor, below R46, a 10 Kohm resistor. Ensure that the flat side
of the transistor is oriented correctly prior to soldering.
9. Solder C37, a 50 uF electrolytic capacitor, to the right of Q26, a 2N3904 NPN transistor. Ensure
that the polarity of the capacitor is oriented correctly prior to soldering.
10. Solder C38, a 1 uF electrolytic capacitor, to the left of Q26, a 2N3904 NPN transistor. Ensure
that the polarity of the capacitor is oriented correctly prior to soldering
Illustration 40: Component placement for the Main Board Mic Preamp circuitry.
Illustration 41: Cable set used for testing the Main Board Mic Preamp circuit.
3. Connect the Digital Board and Main Board using the cables as shown in Illustration 42.
Connect the T/R and CW cable, headphone cable, and output audio volume control cable as
performed in previous tests. Connect the microphone cable to the MIC header JP6. Strap the
jumper across the two pins of the +R/+T header JP11. Plug a PC-style electret microphone into
the microphone input receptacle and a headphone into the audio output receptacle.
4. It will be necessary to wear the headphones during this test in order to minimize the possibility
of audio feedback from the headphones to the microphone. It is strongly recommended to
reduce the volume of the Output Audio Amp to its minimum prior to applying power to
the circuitry. This is to avoid damage to the Output Audio Amp, the headphones, or the
listener's hearing.
5. Apply power to the Minima Digital Board and Main Board. Gradually turn up the volume of the
Output Audio Amp. Remember that it will take a few seconds for the capacitors in the Output
Audio Amp to charge up and sound to come out of the headphones. At that point, it should be
possible to hear on the headphones sounds being picked up by the microphone. If this does not
occur after adjusting the output volume, remove power and investigate possible problems with
the Mic Preamp circuitry.
This completes the testing of the Main Board Mic Preamp. Do not forget to remove the jumper from
JP11, the +R/+T header.
The location of the CW Tone Oscillator circuity on the layout of the Main Board is shown in
Illustration 44, highlighted in purple. Note that the physical spacing betweem the components is fairly
tight. Care must be taken to follow the specified assembly sequence in order to simplify the insertion
and soldering of components.
The parts list for the CW Tone Oscillator is presented in Table 8.
The following steps describe the installation of the components for the CW Tone Oscillator section of
the Main Board. Note that the CW header JP10 was installed during the assembly of the R/T Switch
circuitry.
1. Solder R51, a 10 ohm resistor, to the right of Q30, a 2N3904 NPN transistor.
2. Solder R53, a 220 ohm resistor, to the lower right of R51, a 10 ohm resistor.
3. Solder R54, a 4.7 Kohm resistor, to the upper right of Q30, a 2N3904 NPN transistor.
4. Solder R55, a 10 ohm resistor, to the right of C46, a 50 uF electrolytic capacitor.
5. Solder R56, a 10 Kohm resistor, to the lower left of Q30, a 2N3904 NPN transistor.
6. Solder R57, a 6.8 Kohm resistor, to the left of R56, a 10 Kohm resistor.
7. Solder R58, a 6.8 Kohm resistor, to the left of R57, a 6.8 Kohm resistor.
8. Solder R59, a 47 Kohm resistor, to the upper left of R54, a 4.7 Kohm resistor.
9. Solder R60, a 1 Kohm resistor, to the right of R59, a 47 Kohm resistor.
10. Solder R61, a 1 Kohm resistor, to the right of C46, a 50 uF electrolytic capacitor.
11. Solder Q30, a 2N3904 NPN transistor, to the left of R56, a 10 Kohm resistor. Ensure that the
flat side of the transistor is oriented correctly prior to soldering.
12. Solder C43, a 50 uF electrolytic capacitor, to the right of R53, a 220 ohm resistor. Ensure that
Illustration 45: Component placement for the Main Board CW Tone Oscillator assembly.
Illustration 46: Cable set used for testing the Main Board CW Tone Oscillator circuit.
3. Connect the Digital Board and Main Board using the cables as shown in Illustration 47.
Connect the T/R and CW cable, headphone cable, and output audio volume control cable as
performed in previous tests. Connect the cable with the momentary switch to the Analog Key
input on the Digital Board. Connect the cable with the toggle switch to the PTT input on the
Digital Board. Plug a headphone into the audio output receptacle. It is recommended to NOT
wear the headphones during the first portion of the test in order to prevent damage to
hearing.
4. Turn on the switch providing power to the Digital Board and the Main Board. Note that, no
sound will be heard coming from the headphones initially. The power-up delay circuit in the
preamp takes a few seconds to charge up and provide current to the rest of the preamp circuit.
5. Make sure that the toggle switch is in the off position, that is, the contacts are not closed and the
Main Board is in the receive state. Depress the momentary switch connected to the Analog Key
input and increase the volume of the Output Audio until the audio tone is heard coming from
the headphone. If no tone is heard, regardless of volume adjustment, remove power from the
Digital and Main Boards and determine the cause of the problem. A problem may exist due to
an error that occurred during assembly or in setting up for the test.
6. Switch the PTT button to the on position, that is, the contacts are closed and the Main Board is
in the transmit state. Observe that the audio tone coming from the headphone should become
inaudiable. Increasing the volume of the Output Audio Amp significantly should enable the
audio to to be heard again. Use caution while listening to the headphone durng this portion
of the test. Damage to hearing could result if the PTT switch is accidentally switched back
to the receive state.
This completes the testing of the CW Tone Oscillator circuitry on the Main Board.
LPFs BFO
To
Bidamp
IF Mixer
Tone Osc
To Rx Audio Preamp
Illustration 50: Schematic for the Minima Main Board (Part 1 of 2).
Bidirectional
To IF Mixer Amp
From
IF Mixer
Illustration 51: Schematic for the Minima Main Board (Part 2 of 2).
/*
I/O Testing
This sketch tests most of the digital and analog inputs and outputs on the
Arduino microcontroller as they will be used on the Minima transceiver.
Note that the I2C port, which communicates with the Si570, is not tested.
*/
#include <LiquidCrystal.h>
#include <stdlib.h>
/*
The 16x2 LCD is connected as follows:
LCD's PIN Raduino's PIN PURPOSE ATMEGA328's PIN
4 13 Reset LCD 19
6 12 Enable 18
11 10 D4 17
12 11 D5 16
13 9 D6 15
14 8 D7 14
*/
LiquidCrystal lcd(13, 12, 11, 10, 9, 8); // LCD configuration.
/*
Digital Controls
Raduino's PIN PURPOSE Orientation ATMEGA328's PIN
D2 LSB/USB BFO select Output 4
D3 TX/RX (PTT) Input 5
D4 CW Key Output 6
D5 Band High Output 11
D6 Band Select 1 Output 12
D7 Band Select 0 Output 13
*/
#define BFO_LSB (2) // Logic 0 USB, logic 1 LSB.
#define TX_RX (3) // Logic 0 RX, logic 1 TX.
#define CW_KEY (4) // Logic 0 unkeyed, logic 1 keyed.
#define BAND_HI (5) // Logic 0 low band, logic 1 high band.
#define BAND_SEL_1 (6) // Currently unused.
#define BAND_SEL_0 (7) // Currently unused.
/*
Analog Controls
Raduino's PIN PURPOSE ATMEGA328's PIN
A1 Analog Keyer 24
A2 Analog Tuning 25
A3 Function Button 26
*/
#define ANALOG_KEYER (A1)
#define ANALOG_TUNING (A2)
#define FBUTTON (A3) // Why does 'A3', versus '3' make a difference?
int analogKeyer = 0; // Analog keyer variable.
int tuningPosition = 0; // Tuning pot variable.
void setup() {
lcd.begin(16, 2);
lcd.clear();
// Set up the digital pins.
pinMode(BFO_LSB, OUTPUT);
pinMode(TX_RX, INPUT);
pinMode(CW_KEY, OUTPUT);
pinMode(BAND_SEL_0, OUTPUT);
pinMode(BAND_SEL_1, OUTPUT);
pinMode(BAND_HI, OUTPUT);
// Set the sidetone off, put the transceiver to receive mode.
digitalWrite(CW_KEY, 0);
digitalWrite(TX_RX, 1); // Old way to enable the builtin pullups.
// For some as yet unknown reason, the following makes the Fbutton
// signal levels more stable. If left out, the voltage level tends
// to drift. A pullup resistor may solve this issue.
digitalWrite(FBUTTON, 1); // Old way to enable the builtin pullups.
}
void loop() {
lcd.setCursor(0, 0); // Position cursor for first line of text.
lcd.print("POT: AK: ");
lcd.setCursor(0, 1); // Position cursor for second line of text.
lcd.print("FN: TX/RX: ");
// Read the tuning pot A/D.
tuningPosition = analogRead(ANALOG_TUNING);
// Display the digitized value.
lcd.setCursor(4, 0);
sprintf(str, "%4d", tuningPosition);
lcd.print(str);
// Read the Analog Keyer.
analogKeyer = analogRead(ANALOG_KEYER);
// Display the digitized value.
lcd.setCursor(12, 0);
sprintf(str, "%4d", analogKeyer);
lcd.print(str);
// Read the Function Button.
functionButton = analogRead(FBUTTON);
// Display the digitized value.
lcd.setCursor(3, 1);
sprintf(str, "%4d", functionButton);
lcd.print(str);
// Read the TX/RX Line.
lineTX_RX = digitalRead(TX_RX);
// Display the value.
/*
* Wire is only used from the Si570 module but we need to list it here so that
* the Arduino environment knows we need it.
*/
#include <Wire.h>
#include <LiquidCrystal.h>
#include <avr/io.h>
#include <stdlib.h>
#include <math.h>
/*
The 16x2 LCD is connected as follows:
LCD's PIN Raduino's PIN PURPOSE ATMEGA328's PIN
4 13 Reset LCD 19
6 12 Enable 18
11 10 D4 17
12 11 D5 16
13 9 D6 15
14 8 D7 14
*/
#define FREQ_XTAL (114292532l)
#define SI570_I2C_ADDRESS 0x55
// #define SI570_STARTUP_FREQUENCY 56320000L // Most Ham Si570 have this startup
frequency.
#define SI570_STARTUP_FREQUENCY 10000000L // My Si570 has this startup frequency.
Select as appropriate.
#define SI570_NEW_FREQUENCY 12000000L
unsigned char si570_i2c_address = SI570_I2C_ADDRESS;
unsigned char dco_reg[13], dco_status='s';
uint8_t hs_reg_value;
uint8_t n_reg_value;
uint64_t refFrequencyUint64;
double refFrequency;
double dcoCurrentFrequency, freqXtalDbl;
unsigned long bitval[38];
unsigned long f_center=0, frequency=14200000, dco_freq=0;
unsigned int hs, n1;
unsigned long freq_xtal;
unsigned char wasSmall = 1;
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
int count = 0;
char b[20], c[20], printBuff[32];
void i2c_write (char slave_address,char reg_address, char data ) {
int rdata = data;
Wire.beginTransmission(slave_address);
Wire.write(reg_address);
Wire.write(rdata);
char i2c_read ( char slave_address, int reg_address ) {
unsigned char rdata = 0xFF;
Wire.beginTransmission(slave_address);
Wire.write(reg_address);
Wire.endTransmission();
Wire.requestFrom(slave_address,1);
if (Wire.available()) rdata = Wire.read();
return rdata;
}
void read_si570(){
//we have to read eight consecutive registers starting at register 5
for (int i = 7; i <= 12; i++)
dco_reg[i] = i2c_read( si570_i2c_address, i);
}
void write_si570()
{
int idco, i;
// Freeze DCO
idco = i2c_read( si570_i2c_address,137);
i2c_write(si570_i2c_address, 137, idco | 0x10 );
i2c_write(si570_i2c_address, 7, dco_reg[7]);
//Set Registers
for( i=7; i <= 12; i++){
i2c_write(si570_i2c_address, i, dco_reg[i]);
idco = i2c_read( si570_i2c_address, i);
}
// Unfreeze DCO
idco = i2c_read( si570_i2c_address, 137 );
i2c_write (si570_i2c_address, 137, idco & 0xEF );
// Set new freq
i2c_write(si570_i2c_address,135,0x40);
}
void qwrite_si570()
{
int i, idco;
//Set Registers
for( i=8; i <= 12; i++){
i2c_write(si570_i2c_address, i, dco_reg[i]);
idco = i2c_read( si570_i2c_address, i);
}
}
void setBitvals(void){
//set the rfreq values for each bit of the rfreq (integral)
bitval[28] = (freq_xtal) / (hs * n1);
//set the rfreq values for each bit of the rfreq (integral)
bitval[27] = bitval[28] >> 1;
bitval[26] = bitval[27] >> 1;
bitval[25] = bitval[26] >> 1;
bitval[24] = bitval[25] >> 1;
bitval[23] = bitval[24] >> 1;
bitval[22] = bitval[23] >> 1;
bitval[21] = bitval[22] >> 1;
bitval[20] = bitval[21] >> 1;
bitval[19] = bitval[20] >> 1;
bitval[18] = bitval[19] >> 1;
bitval[17] = bitval[18] >> 1;
bitval[16] = bitval[17] >> 1;
bitval[15] = bitval[16] >> 1;
bitval[14] = bitval[15] >> 1;
bitval[13] = bitval[14] >> 1;
bitval[12] = bitval[13] >> 1;
bitval[11] = bitval[12] >> 1;
bitval[10] = bitval[11] >> 1;
bitval[9] = bitval[10] >> 1;
bitval[8] = bitval[9] >> 1;
bitval[7] = bitval[8] >> 1;
bitval[6] = bitval[7] >> 1;
bitval[5] = bitval[6] >> 1;
bitval[4] = bitval[5] >> 1;
bitval[3] = bitval[4] >> 1;
bitval[2] = bitval[3] >> 1;
bitval[1] = bitval[2] >> 1;
bitval[0] = bitval[1] >> 1;
}
//select reasonable dividers for a frequency
//in order to avoid overflow, the frequency is scaled by 10
void setDividers (unsigned long f){
int i, j;
unsigned long f_dco;
for (i = 2; i <= 127; i+= 2)
for (j = 4; j <= 11; j++){
//skip 8 and 10 as unused
if (j == 8 || j == 10)
continue;
f_dco = (f/10) * i * j;
if (480000000L < f_dco && f_dco < 560000000L){
if (hs != j || n1 != i){
hs = j; n1 = i;
setBitvals();
void setRfreq (unsigned long fnew){
int i, bit, ireg, byte;
unsigned long rfreq;
//reset all the registers
for (i = 7; i <= 12; i++)
dco_reg[i] = 0;
//set up HS
dco_reg[7] = (hs 4) << 5;
dco_reg[7] = dco_reg[7] | ((n1 1) >> 2);
dco_reg[8] = ((n11) & 0x3) << 6;
ireg = 8; //registers go from 8 to 12 (five of them)
bit = 5; //the bits keep walking down
byte = 0;
rfreq = 0;
for (i = 37; i >= 0; i){
//skip if the bitvalue is set to zero, it means, we have hit the bottom of the
bitval table
if (bitval[i] == 0)
break;
if (fnew >= bitval[i]){
fnew = fnew bitval[i];
byte = byte | (1 << bit);
}
//else{
// putchar('0');
//}
bit;
if (bit < 0){
bit = 7;
//use OR instead of = as register[7] has N1 bits already set into it
dco_reg[ireg] |= byte;
byte = 0;
ireg++;
}
}
}
void setDCO(unsigned long newfreq){
//check that we are not wasting our time here
if (dco_freq == newfreq)
return;
//if the jump is small enough, we don't have to fiddle with the dividers
// This should not be an absolute value comparison, but a relative
void setup() {
// Initialize the LCD.
lcd.begin(16, 2);
printBuff[0] = 0;
lcd.setCursor(3, 0);
lcd.print("Si570 Test");
Wire.begin();
// Disable internal pullups You will need external 3.3v pullups.
digitalWrite(SDA, 0);
digitalWrite(SCL, 0);
// Force Si570 to reset to initial freq.
i2c_write(si570_i2c_address,135,0x01);
delay(20);
read_si570();
delay(5000);
// Display the raw register values.
lcd.clear();
sprintf(c, "Reg 79:%02x %02x %02x", dco_reg[7], dco_reg[8], dco_reg[9]);
lcd.setCursor(0, 0);
lcd.print(c);
sprintf(c, " 1012:%02x %02x %02x", dco_reg[10], dco_reg[11], dco_reg[12]);
lcd.setCursor(0, 1);
lcd.print(c);
delay(15000); // Wait a good long time to admire the results!
// Obtain the High Speed register value.
hs_reg_value = dco_reg[7] >> 5;
hs_reg_value += 4;
// Obtain the N1 register value.
n_reg_value = ((dco_reg[7] & 0x1F) << 2) + (dco_reg[8] >> 6);
if (n_reg_value == 0) {
n_reg_value = 1;
} else if ((n_reg_value & 0x01) != 0) {
// Obtain the reference frequency value in hex.
refFrequencyUint64 = (uint64_t)(dco_reg[8] & 0x3F);
refFrequencyUint64 = (refFrequencyUint64 << 8) | (uint64_t) dco_reg[9];
refFrequencyUint64 = (refFrequencyUint64 << 8) | (uint64_t) dco_reg[10];
refFrequencyUint64 = (refFrequencyUint64 << 8) | (uint64_t) dco_reg[11];
refFrequencyUint64 = (refFrequencyUint64 << 8) | (uint64_t) dco_reg[12];
// Display the HS, N1, and RFREQ values.
lcd.clear();
sprintf(c, "HS: %d N1: %d", hs_reg_value, n_reg_value);
lcd.setCursor(0, 0);
lcd.print(c);
sprintf(c, "RFREQ:%lX%lX", (unsigned long) (refFrequencyUint64 >> 32), \
(unsigned long) (refFrequencyUint64 & 0x00000000ffffffff));
lcd.setCursor(0, 1);
lcd.print(c);
delay(15000); // Wait a good long time to admire the results!
// Determine the reference frequency in floating point.
// The implied decimal point for RFREQ is between bits 28 and 29.
// Convert to double and divide by 2^28 to get the reference frequency in MHz.
refFrequency = (double) refFrequencyUint64 / (double) 268435456.0;
lcd.clear();
// Third parameter in the sprintf is the integer part of the reference
frequency.
// Forth parameter is the fractional part of the reference frequency multiplied
by 10^6.
sprintf(c, "RFREQ: %lu.%lu", (unsigned long) refFrequency, \
(unsigned long) ((refFrequency floor(refFrequency)) * 1000000.0));
lcd.setCursor(0, 0);
lcd.print(c);
// Determine the DCO current frequency, based on the startup frequency, HS, and
N1 values.
dcoCurrentFrequency = (double) SI570_STARTUP_FREQUENCY * (double) hs_reg_value *
(double) n_reg_value;
// Determine the more accurate crystal frequency.
freqXtalDbl = dcoCurrentFrequency / refFrequency;
freq_xtal = (unsigned long) freqXtalDbl;
sprintf(c, "fXTAL: %lu", freq_xtal);
lcd.setCursor(0, 1);
lcd.print(c);
// Set the new frequency.
setDCO(SI570_NEW_FREQUENCY);
}
void loop(){
}
/*
The 16x2 LCD is connected as follows:
LCD's PIN Raduino's PIN PURPOSE ATMEGA328's PIN
4 13 Reset LCD 19
6 12 Enable 18
11 10 D4 17
12 11 D5 16
13 9 D6 15
14 8 D7 14
*/
LiquidCrystal lcd(13, 12, 11, 10, 9, 8); // LCD configuration.
/*
Digital Controls
Raduino's PIN PURPOSE Orientation ATMEGA328's PIN
D2 LSB/USB BFO select Output 4
D3 TX/RX (PTT) Input 5
D4 CW Key Output 6
D5 Band High Output 11
D6 Band Select 1 Output 12
D7 Band Select 0 Output 13
D17 Function Button Input 26
*/
#define BFO_LSB (2) // Logic 0 USB, logic 1 LSB.
#define TX_RX (3) // Logic 0 RX, logic 1 TX.
#define CW_KEY (4) // Logic 0 unkeyed, logic 1 keyed.
#define BAND_HI (5) // Logic 0 low band, logic 1 high band.
#define BAND_SEL_1 (6) // Currently unused.
#define BAND_SEL_0 (7) // Currently unused.
#define FBUTTON (17) // Function Button in digital mode.
/*
Analog Controls
Raduino's PIN PURPOSE ATMEGA328's PIN
A1 Analog Keyer 24
A2 Analog Tuning 25
*/
#define ANALOG_KEYER (A1)
#define ANALOG_TUNING (A2)
#define ANALOG_TONE (7) // Square wave tone generator.
void setup() {
lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Minima Test Tool");
lcd.setCursor(0,1);
lcd.print("1 KHz Audio Tone");
// Set up the digital pins.
pinMode(BFO_LSB, OUTPUT);
pinMode(TX_RX, INPUT);
pinMode(CW_KEY, OUTPUT);
pinMode(BAND_SEL_0, OUTPUT);
pinMode(BAND_SEL_1, OUTPUT);
pinMode(BAND_HI, OUTPUT);
pinMode(FBUTTON, INPUT);
// Set the sidetone off, put the transceiver to receive mode.
digitalWrite(CW_KEY, 0);
digitalWrite(TX_RX, 1); // Old way to enable the builtin pullups.
digitalWrite(FBUTTON, 1); // Old way to enable the builtin pullups.
tone(ANALOG_TONE, 1000);
}
void loop() {
// Read the Analog Keyer.
analogKeyer = analogRead(ANALOG_KEYER);
if (analogKeyer < 512) {
digitalWrite(CW_KEY, 1);
} else {
digitalWrite(CW_KEY, 0);
}
}