This is only a preview of the July 2020 issue of Silicon Chip. You can view 39 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "The all-new Colour Maximite 2":
Items relevant to "Ol' Timer II":
Items relevant to "Vintage Workbench":
Items relevant to "Infrared Remote Control Assistant":
Items relevant to "Digital/Touchscreen RCL Substitution Box, Part 2":
Purchase a printed copy of this issue for $10.00. |
• 1Ω to 10MΩ
10MΩ, • 10pF to 10µ
10µF, • 100nH to 3.3mH
• Programmable • Based on Micromite BackPack
Touchscreen
Wide-range
RCL Box Part II
Last month, we described our new touchscreen RCL Box, a compact
device that lets you quickly and easily select various resistance,
capacitance and inductance values for prototyping and testing. Now
we’re going to go over the construction, testing and operating procedures.
It uses mostly SMD parts, but they’re all easy to work with.
by Tim Blythman
I
n part one, we described how the
RCL box works and listed its features and specifications. We also
explained how it’s built using a Micromite V3 LCD BackPack with a touchscreen and two new boards. Now,
without further ado, let’s start putting
it together.
The Micromite itself
You will of course have to build a
Micromite V3 BackPack with its ac90
Silicon Chip
companying 3.5in LCD touchscreen
module to control the whole shebang.
If you haven’t already done so, refer to
the article starting on page 30 of the
August 2019 issue (siliconchip.com.
au/Article/11764).
However, if you purchase the shortform kit from the SILICON CHIP ONLINE
SHOP (Cat SC5082, siliconchip.com.
au/Shop/20/5082), then you will get
the PCB and all the required parts, and
it should be fairly self-explanatory.
Australia’s
Australia’s electronics
electronics magazine
magazine
After all, the PCB is printed with the
locations of all the parts and the chips
are pre-programmed, so if you are an
experienced constructor, you should
have no trouble putting it together.
One variation from the original design that is important is that we used
female headers (ie, header sockets) on
the back of the BackPack PCB to connect to the two other boards used in
this project.
So when building the BackPack, it’s
siliconchip.com.au
The RCL box has three sets of terminals (right side) so
you can use the resistance, capacitance and inductance functions
independently of each other. It’s all under the control of the Micromite
Backpack (V3) which allows you much more flexibility than traditional R, C or
L substition boxes.
probably a good idea to leave the external I/O and power/serial headers
off initially, and fit them later, after
you’ve built the other board.
There’s also not much point in
mounting the LCD yet. Fit the headers
and test that the Micromite connects to
the LCD, but don’t install the mounting hardware at this stage.
Note that any ‘optional’ components
fitted to the BackPack may interfere
with the RCL Box operation if they
share pins; these should be removed
if already fitted.
Construction
We suggest that you carefully follow these instructions and build the
boards in the order given, or you may
find it a bit tricky.
While none of the parts are tiny, you
should avail yourself of the usual set
of SMT tools, including a fine-pointed, temperature adjustable soldering
iron, tweezers, magnifier, solder flux
and braid (wick).
Some flux removal solution or even
isopropyl alcohol will be handy to
clean up any excess flux; in general,
more flux is better than not enough!
The consequence of this is that the
PCBs are left with a messy residue unless cleaned.
siliconchip.com.au
Since both boards have mostly components only on one side, they are well
suited to reflow soldering. See our articles on building a Reflow Oven from
April and May 2020 (siliconchip.com.
au/Series/343).
With the design effectively cramming four PCBs into the UB3 Jiffy box,
once finished, space will be tight. So
as you progress through the assembly
steps, be careful of components standing higher than needed.
In particular, the relays should protrude from the board no more than
7mm; use the parts we have specified
(which are around 5mm tall) or check
the data sheet of alternative parts before ordering.
The
lowprofile
Panasonic
TQ2SA-5V relays we used are not
commonly available but they are in
stock at two SILICON CHIP advertisers:
DigiKey and Mouser. We understand
they would qualify for free shipping.
Australia’s electronics magazine
Naturally, positioning of the parts is
critical for correct operation; if any of
the resistors, capacitors or inductors
are mixed up then the software won’t
be able to produce the correct values.
Resistor PCB
We’ll start by building the resistor
PCB which is coded 04104201 and
measures 115x58mm. Its PCB overlay diagram, Fig.3, has been repeated
from last month to help you during
the assembly.
First, check that you have the correct PCB; the two main boards look
very similar.
For all the components, we suggest
the following process.
Apply a small amount of flux to the
pads and hold the component in place
with tweezers. Add a small amount of
solder to the iron and apply the iron
to one lead.
For the larger relays, you may be
able to hold them in place with a wellplaced finger; their larger body will
present less risk of being burnt. Once
the component is flat, square and centred, solder the other pin(s).
Start with the resistors. Apart from
one 10kΩ resistor near the Micromite
header, they are all down the centre of
the board. We suggest you start at one
July 2020 91
TPIC6C595
5V
TX
RX
GND
RST
3
4
5
9
10
14
16
17
18
21
22
24
25
26
3V3
5V
GND
CONNECTIONS TO MICROMITE
COIL
COIL
COIL
IC2
IC1
TPIC6C595
100nF
COIL
COIL
COIL
RLY12
CON1
RLY8
RLY6
RLY4
RLY2
COIL
100nF
10k
10M
2.2k
RLY10
4.7M
1k
1.5M
330
680k
68
150k
15
RLY14
3.3k
33k
6.8M
1.5k
3.3M
680
1M
150
330k
COIL
33
RLY13
RLY11
RLY9
RLY7
RLY5
68k
6.8
1.5
15k
3.3
6.8k
RLY1
RLY3
COIL
COIL
COIL
COIL
COIL
COIL
Fig.3: the PCB overlay diagram for the resistor board, reproduced from last
month. Be careful to orientate the relays correctly, as shown here, and add
the parts in the order stated in the text to make your life easier. If you have a
magnifier, you can read the value codes on the individual resistors.
ted, all with their pin 1 markers facing
the outside of the PCB. You can confirm this from the silkscreen and also
the fact that the pin 1 pad is square
instead of rounded. Check your progress against our photos.
Our relays also have a stripe printed
on their tops which should match the
stripe printed on the PCB silkscreen.
Leave RLY12 and RLY13 until last;
they are oriented differently and
have more space around them; this
gives you better access to RLY10 and
RLY11’s pins when fitting those parts.
The spacing is quite tight, but the
same techniques apply as for the other components. Using a fine-pointed
soldering iron, come in almost perpendicular to the PCB so as not to burn
and damage adjacent relays. The pins
on the relays are at a generous 0.1in
(2.54mm) pitch.
Do not add the Micromite headers
yet. If you are keen, you might like to
run some jumper wires from a Micromite to test the resistor PCB in isolation, although you will naturally need
the software installed to do this (as described below).
Capacitor/inductor PCB
end and work your way along, ensuring that the value printed on the part
matches the silkscreen.
We have repeated the relevant section from last month’s parts list for
the expected SMD component markings (Table 1).
You should be able to confirm their
resistances, even after they are soldered, as they are connected to the
(absent) relays at one end, ensuring
that their measured values are not
distorted by being connected to other
components.
There are two 100nF capacitors;
they are interchangeable and non-polarised. Ensure they are fitted accurately, as there is not much space around
them once installed.
The two ICs have the finest pitch
footprints on the PCB (although they
aren’t very close by SMD standards).
It is vital to ensure that the pin 1 dot
lines up with the silkscreen. If you
cannot see it, pin 1 is also closest to
the 100nF capacitor.
Proceed with the ICs as for the other parts, but do not be concerned if
92
Silicon Chip
a solder bridge forms, as long as the
part is aligned correctly. Finish soldering the remaining pins and once
the part is secure, use solder braid to
carefully remove any excess from one
side at a time.
Before adding the higher-profile
relays, now is a good time to clean
up any flux residue according to the
instructions on your flux cleaning
solution.
There are fourteen relays to be fit-
Well recruits, this is what you have
been training for. Not only are there
16 relays on this side of the PCB, but
many of the components also don’t
have any markings. Take care not to
mix them up. But you should find that
the process is much the same as for the
resistor PCB.
Start with the capacitors, checking
the component value as you go. If you
have a capacitance meter, you can use
it to double-check that the correct parts
have been fitted.
As well as the output capacitors,
there are two 100nF parts for bypassing the ICs and a single 10kΩ resistor
Resistor Codes (all 1 of each, SMD 1% 3216/1206 size; SMD markings shown)
10MΩ 106 or 1005
6.8MΩ
685 or 6804
4.7MΩ
475 or 4704
3.3MΩ 335 or 3304
1.5MΩ
155 or 1504
1MΩ
105 or 1004
680kΩ 684 or 6803
330kΩ
334 or 3303
150kΩ
154 or 1503
68kΩ 683 or 6802
33kΩ
333 or 3302
15kΩ
153 or 1502
10kΩ 103 or 1002
6.8kΩ
682 or 6801
3.3kΩ
332 or 3301
2.2kΩ 222 or 2201
1.5kΩ
152 or 1501
1kΩ
102 or 1001
680Ω 681 or 680R
330Ω
331 or 330R
150Ω
151 or 150R
68Ω 680 or 68R0
33Ω
330 or 33R0
15Ω
150 or 15R0
6.8Ω 6R8 or 6R80
3.3Ω
3R3 or 3R30
1.5Ω
1R5 or 1R50
Table 1: reproduced from the parts list in the June issue, this shows the codes
you can expect to be printed on the SMD resistors.
Australia’s electronics magazine
siliconchip.com.au
100nF
Programmable LCR Reference
3
4
RLY19
470nF
RLY21
1 F
220nF
47nF
RST
9
5
10
14
16
18
24
GPIO21
25
GPIO22
26
5V
3.3
GND
TX
17
100nF
10nF
2.2nF
470pF
COIL
RLY17
91pF
COIL
COIL
22nF
COIL
COIL
RLY15
12pF
100nF
2.2 F
4.7 F
RLY20
1nF
COIL
220pF
COIL
RLY18
COIL
COIL
COIL
36pF
10 F
RLY23
4.7nF
10pF
RLY16
COIL
RLY24
5V
RX
GND
CON2
IC3
IC 4
TPIC6C595 TPIC6C595
LC PCB 04104202 C 2020 RevB
10k
RLY22
RLY29
COIL
L9 1mH
RLY27
COIL
RLY26
COIL
RLY25
COIL
COIL
RLY30
L8 330 H
L7 100 H
CON3
L1 100nH
L2 330nH
RLY28
L4 3.3 H
L6 33 H
L5 10 H
L10
3.3mH
L3 1 H
Fig.4: the capacitor/inductor board has more relays and some larger
components, so it’s a bit packed. But if you follow our instructions, you
should not find it too difficult. Again, watch the orientation of the relays. The
inductors should have printed values but the capacitors won’t.
to fit. As for the resistor PCB, the two
ICs have the closest pin spacings. Note
that pin 1 on both is closest to the Micromite header.
Following on from this, fit all the
inductors except the 3.3mH type. It
is larger and can be fitted last, even
after the relays.
With all the low-profile parts fitted,
clean up excess flux before moving
onto the relays.
If you have any doubts, now is the
time to test the part values, as fitting
the relays will make it more difficult
to do so.
Proceed with the relays as you did
for the resistor board. Patience will
help!
Take note of the orientation markings; most of the relays face the same
direction, but the two mounted at
right angles face towards each other.
We suggest fitting RLY24 and RLY30
before the remainder, as they have
the smallest clearances to adjacent
components.
siliconchip.com.au
Finally, fit the 3.3mH inductor. It has
the largest pads and so may need more
heat. It’s best to apply a thin smear of
flux paste to its pads before placing it.
When finished, clean up any remaining flux residue.
Mechanical assembly
While the boards we supply are
Here’s a trick we even seen some
manufacturers perform; stacking
multiple capacitors to achieve a
higher capacitance value. In this case,
we have combined a pair of 4.7µF
parts to replace a single 10uF part.
It’s not hard to do as long as you don’t
apply to much heat.
Australia’s electronics magazine
both covered with a solder mask layer,
providing a degree of insulation if the
boards are laid flat against each other,
you should not rely on this.
The solder mask appears durable,
but is thin and will not resist much
vibration or chafing, and it can even
come from the factory with a few holes
(especially around vias).
So cover the back of one of the
boards with Kapton (or similar polyimide type) tape, except for around
the Micromite headers and the four
mounting holes.
While CON1, CON2 and CON3 appear to pass through the board, the tape
can sit against the back of these; this
will help to insulate their pins from the
other board. We’ve used through-hole
pads here to provide more mechanical
strength as surface-mounting pads are
more easily torn off the PCB.
Assuming you have built the Micromite V3 BackPack with LCD as
described above, fit the 18-way and
4-way female headers on its back side.
Note that the Micromite BackPack
usually has male headers in these positions.
Rather than using multiple threaded
spacers with machine screws front and
back, we used a different technique for
the board stack.
Mount the LCD to the front panel/
lid piece using four 32mm-long M3
machine screws, with 1mm Nylon
washers to separate the acrylic panel
from the LCD and the 12mm threaded
spacers generally used with the BackPack, to secure the machine screws to
the LCD panel.
Add the Micromite BackPack to
the stack, then place 9mm tapped or
untapped spacers onto the exposed
threads. Add the resistor PCB with its
relays facing the BackPack, then the
capacitor/inductor PCB with its relays
facing away and then secure the whole
lot with four hex nuts.
Although we haven’t made the electrical connections yet, you should now
have a good idea of the overall size of
the PCB stack.
Before soldering anything, you
might like to test fit the stack into the
Jiffy box. This will let you know how
much room there is left. If you’ve used
the 5mm-tall relays we’ve specified,
you should have around 2mm clearance left.
We now need to use a pin header to
connect the two PCBs to each other and
the BackPack headers. To do this, we
July 2020 93
CL
TOP
CL
TOP
10
B
ALL
DIMENSIONS
IN MILLIMETRES
15
A
15
13
A
A
10
9
12
HOLES A:
6.0mm IN
DIAMETER
18
A
HOLE B:
10 x 12mm
CUTTING DIAGRAM FOR
DRILLING DIAGRAM FOR
USB SOCKET END OF BOX
A
A
BANANA SOCKETS END OF BOX
Fig.5: this shows the location and size of the cut-out for the USB cable, plus the hole locations and sizes for the banana
sockets on the opposite side of the case. If you have a USB lead with a large housing, you may need to enlarge its hole. A
round (drilled) hole is easier to make, but will not look as neat.
remove the individual pins from the
plastic spacer strip, which you can do
using small pliers.
With the boards held together in the
stack, simply slot the pins through the
PCB holes into the female header on
the Micromite BackPack, one at a time.
Once you have confirmed that everything will fit together, solder the
header pins to the PCBs, ensuring
that enough solder is applied to wick
down the stack into the bottom PCB
of the pair.
This can be assisted by squirting a
little flux paste into each hole before
inserting the pin.
Alternatively, if you have no plans
to remove the PCBs from the BackPack, you could omit the female headers and solder male headers directly
to the BackPack.
Then, after mounting the resistor
and capacitor/inductor PCBs, solder
the headers to these two PCBs as well.
You may need longer pins to do
this, or you may choose to run short
lengths of wire between the two boards
instead.
USB socket
For our prototype, we simply made
a cut-out in the side of the box to allow power to be supplied to the BackPack using a standard USB cable with
a mini Type-B connector. Its location
is shown in Fig.5. This hole will allow
most USB-mini plugs to pass through
the side of the box and directly into
the Micromite’s USB socket. It may
need to be enlarged if your USB lead
has an unusually large plug.
An alternative that we have used
on some projects is to fit a DC barrel
socket; its wires are run back to the
5V and GND connections. See Fig.6
for how to wire such an arrangement.
You will need to solder the wires to the
pins on the capacitor/inductor board,
as this connects to the header on the
BackPack board.
Note that such a DC jack must be installed near the lid of the Jiffy box as
the PCB extends nearly the full width
of the bottom of it. Altronics (P6701)
and Jaycar (PP1985) both carry USB
to DC plug leads made up. Or you
could use a regulated plugpack with
5V output and the correct tip polarity,
to match the socket wiring.
Banana sockets
You might have noticed that there is
not much space in the Jiffy box; thus,
we’ve had to use low-profile banana
sockets for the six test connections.
The locations of their mounting
holes, on the opposite side to the USB
power cut-out, are shown in Fig.5.
Once fitted, the sockets are simply
free-wired back to their respective
pads on the PCBs. We suggest mounting the sockets in the enclosure first,
to test that they do not foul the PCBs.
Once this is done, solder short (5cm)
leads to each socket, then solder them
to the respective pads on the PCBs.
CON1 is for the resistance connections, CON2 for capacitance and CON3
for inductance. The LCD shows their
values in this order from top to bottom, so the sockets should be wired
accordingly.
You may find it easier to remove the
PCBs from the stack while soldering
the leads. None of the parts are polarised, so it doesn’t matter if you swap
the wires to the pairs of sockets.
Micromite setup
There are two ways to load the software on the Micromite; the easiest is
to simply load the “RCLBOX.HEX”
file directly onto the chip using the
onboard Microbridge or a PIC programmer such as a PICkit3 or PICkit4
(or purchase a pre-programmed chip,
which is equivalent to doing this).
The alternative is to load the Micromite with MMbasic, then configure it
and upload the BASIC source code
over the serial terminal.
This is the required approach if you
wish to customise the way the RCL
Box works.
To do this, assuming you have a
new Micromite (we’re using MMBasic
version 5.4.8), first open the “library.
bas” file (extracted from the download
5V
4
Tx
3
2
Rx
1
USB CONNECTOR
TYPE A MALE
GND
DC PLUG
Fig.6: if you want to add a DC socket for power instead, here is how to
do it. But be careful that you mount it in a location where it won’t foul
the board stack. The USB-to-DC plug lead is a commonly available, preassembled part (eg, Altronics P6701; Jaycar PP1985).
94
Silicon Chip
Australia’s electronics magazine
DC INPUT
SOCKET
(ON END OF BOX)
MICROMITE
CON 1 POWER
AND CONSOLE
CONNECTOR
siliconchip.com.au
WHAT DO YOU WANT?
PRINT? OR DIGITAL?
EITHER . . . OR BOTH
The choice is YOURS!
Regardless of what you might hear, most people still prefer a magazine
which they can hold in their hands. That’s why SILICON CHIP still prints
thousands of copies each month – and will continue to do so.
But there are times when you want to read SILICON CHIP online . . . and
that’s why www.siliconchip.com.au is maintained at the same time.
WANT TO SUBSCRIBE TO THE PRINT EDITION? (as you’ve always done!) No worries!
WANT TO SUBSCRIBE TO THE DIGITAL (ONLINE) EDITION? No worries!
WANT TO SUBSCRIBE TO BOTH THE PRINT AND THE DIGITAL EDITION? No worries!
SILICON CHIP, Australia’s most read, most respected and most valued electronics
reference magazine, makes it so easy for you. And even better, we offer short-term
subscriptions (as short as six months) so you can effectively “try before you commit”.
Here’s the deal:
If you’re in Australia, you can subscribe to the print edition (only) of SILICON CHIP for $105 for a full 12 months (12 issues) – that’s almost $15 less than the over-the-counter price AND we pick up the postage.
If you’re overseas, you can subscribe to the print edition – email us for the rates for your particular country.
If you’re anywhere in the world, you can subscribe to the online edition of SILICON CHIP for $AU85.
And, of course, from anywhere in the world, you can subscribe to both print and online editions – in Australia, the
price is just $125 (only $20 more than the print edition price). Overseas – again email us for the rates in your country.
While your subscription is current, you can download software, PCB patterns, panel artwork etc FREE OF CHARGE!
Want more information? Log onto our website and click on “subscriptions”
www.siliconchip.com.au
Screen1: the larger 3.5in display allows a lot of useful information to be displayed by the Micromite. At right are the three
output parameters, displayed adjacent to their respective
banana sockets. The values can be changed by a simple tap up
or down, via a slider or automatically ramped by the software.
package for this project, available on
our website) and upload it to the Micromite (eg, using MMedit).
Then type “LIBRARY SAVE” at the
Micromite console and press enter.
Next, type “WATCHDOG 1”. After
pressing Enter, the Micromite should
restart and the screen will clear. The
terminal should display:
Watchdog timeout
Processor restarted
ILI9488 driver loaded
You can then run the command
“GUI TEST LCDPANEL”; you should
see circles appearing on the LCD. Press
Ctrl-C to end the test.
Next, run “OPTION TOUCH 7,15”
to enable the touch driver. Then run
“GUI CALIBRATE” and complete the
calibration sequence.
If you like, you can run “GUI TEST
TOUCH” to confirm that the display and
touch panel are working correctly together. Ctrl-C ends this test program too.
At this stage, the display is configured and the main BASIC program can
be loaded. Open the “RCL Reference
Box.bas” file, send it to the Micromite
and run it. The AUTORUN flag is automatically set, so the software will start
up when powered in future.
The software as loaded now is the
same as what you would get from the
HEX file; the remaining steps are settings and configuration within the Programmable RCL Box.
Finishing touches
If you have not already done so, fit
the acrylic lid to the LCD by remov96
Silicon Chip
Screen2: pressing the SETUP button opens the Limit
Settings page. Soft limits can be set to avoid non-useful
or dangerous test values. Further settings can be found by
tapping on the RAMP or DISPLAY buttons, while STORE
saves the current setting to non-volatile flash memory.
ing the four machine screws. Place
the 1mm spacers over the holes and
thread the machine screws through
the acrylic panel and into the tapped
spacers.
Note that the acrylic lid piece is not
symmetrical; if it appears that the PCBs
behind are sticking out the side, you
may have it the wrong way around.
As a hint, the end of the Micromite
BackPack with the USB socket goes to
the end with the wider-spaced holes.
Slot the stack into the case and secure the lid with the four screws that
came with the Jiffy box.
Configuration and use
When powered up, a splash screen
appears, followed by the main operating screen (Screen1). This is where
the resistance, capacitance and inductance values are controlled.
In a large font along the right-hand
side are the currently selected resistance, capacitance and inductance values. There are three ways that these
values can be changed.
Firstly, the slider beneath each value can be used to make quick, coarse
changes. You should have no trouble
picking the exact value needed, but the
up and down buttons to their left are
better to make fine changes.
To the left of the up and down buttons are the soft limits which can be
set. These allow the output values to
be restricted if this is desired. Note that
the up and down buttons are greyed
out when the values are at their soft
limits, warning you that you are at the
extreme values.
Australia’s electronics magazine
At bottom left are the ramp controls,
which can be used to step the outputs
automatically. They are red when the
ramp is inactive, turning green when
activated. The ramps make use of the
minimum and maximum soft limits
as their range.
Above this is a small numerical
display, which indicates a characteristic time or frequency based on a selected combination of the currently
enabled resistance, capacitance and
inductance.
The “Setup” button at top right
changes to the first of three pages for
altering settings (Screen2). This allows
the soft limits to be altered, with up
and down controls for the minimum
and maximum values of each range.
Any changed settings are made active immediately, but are not automatically saved to flash. This is done
by the “Store” button, which ensures
that the current settings are saved for
use at power-on.
This has been done to minimise
wear and tear on the internal flash
memory and also provides an opportunity for settings to be tested before
saving. If you change the settings to
something you don’t like, then a simple power cycle will reload the last
saved values.
Pressing the “Exit” button returns
to the main control page; this and
some of the other buttons are present
on more than one page to allow ease
of navigation.
Pressing “Ramp” opens a page for
the settings that control the ramp
modes (Screen3); a setting for ramp
siliconchip.com.au
Screen3: the RAMP setting page controls the automatic
ramp modes. These can be set to up, down or sawtooth
with the option to perform a single or repeated ramp.
There are individual settings for resistance, capacitance
and inductance; thus, you can ramp resistance up and
capacitance down simultaneously if that is what is needed.
rate is found on the “Display” page
(Screen4).
There are settings to ramp up, down
and in a sawtooth pattern (“Saw”),
which alternates between up and
down.
The ramps can also be set to loop
continuously or not (“Off”). The current setting is displayed in a friendlier
fashion above the buttons.
If an output is set to ramp up but
not loop, it will ramp up to its maximum and then stop. The next time it
is started, it will reset to the minimum
and ramp up again. This simplifies repeated tests.
The Display page includes the ramp
step time; this can be set from 0.1s to
10s in 0.1s intervals by dragging the
slider along the bottom of the page.
The final setting at the top of the
Display page is the characteristic
time/frequency, which controls what
is displayed at the top left of the main
page. There is a choice of RC, LR or
LC combinations, and the characteristic time constant or frequency can
be selected.
Of course, these may not match the
operation of your circuit as not all
circuits operate at their characteristic time constant, but they are a useful thing that the processing power of
the Micromite can add.
BASIC code
In case you wish to delve into the
operation of the BASIC program deeper, we’ll explain a little bit about how
it works.
After a handful of OPTIONs are set
siliconchip.com.au
Screen4: the DISPLAY page contains the setting for what
characteristic time/frequency should be displayed. A choice
of either LC, RC or LR combinations can be chosen, with
either time constant or frequency being available as further
options. The step time for the ramp modes is also chosen by
the slider along the bottom of the page.
near the start, several colour values
are defined. If you wish to change the
feel of the interface, changing these
colours is an easy way to do it.
The output values and relay images list the available values in pairs of
arrays. One contains a list of the output values as floating-point numbers;
these are the RVALUE, CVALUE and
LVALUE variables.
The RIMAGES, CIMAGES and LIMAGES arrays contain nominal 16-bit
values which describe the bit pattern
which is output to the relays.
In the case of the capacitor and inductor images, these are combined
with a simple addition to allow the
data to be combined for simultaneous latching.
There would be little point changing
the image arrays unless you reworked
the circuit itself, but you could add
extra resistance values by using combinations of more values than what
we have.
Note that these lines are very close
to BASIC’s 255 character limit, so edit
them with care.
Most of the remaining code is to create the user interface. While we often
complain about how bloated software
can be at times, it’s nice to have an
easy-to-use set of controls; it’s just
unfortunate that it takes so much
code to do so!
The five subroutines starting
with RELAYINIT perform the interfacing to the shift registers.
If, for example, you were interested in interfacing these boards to
another microcontroller such as an ArAustralia’s electronics magazine
duino or even a Raspberry Pi, then we
suggest looking at these subroutines to
understand how to interface and check
the schematic to know what pins need
to be connected.
SC
This photo
shows how
the two PCBs
are piggybacked inside
the case.
July 2020 97
|