0% found this document useful (0 votes)
123 views4 pages

A-D Converter For Matchbox Basic Computer: Design: K. Walraven Computer

This document describes connecting a 12-bit analog-to-digital converter to a MatchBox BASIC computer board. The MAX186 converter is used, which has 8 analog input channels instead of one. The converter connects via a 10-way flat cable to port K1 on the computer board and includes overvoltage protection resistors and pull-up resistors on each analog input channel.

Uploaded by

Sanedrac Ac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views4 pages

A-D Converter For Matchbox Basic Computer: Design: K. Walraven Computer

This document describes connecting a 12-bit analog-to-digital converter to a MatchBox BASIC computer board. The MAX186 converter is used, which has 8 analog input channels instead of one. The converter connects via a 10-way flat cable to port K1 on the computer board and includes overvoltage protection resistors and pull-up resistors on each analog input channel.

Uploaded by

Sanedrac Ac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

023

A-D converter for


MatchBox BASIC computer
Design: K. Walraven R1
CH0
1k
In their book MatchBox BASIC K1 R2
C7
Computer [1] the authors

10k
describe a way of connecting a
100n 5V
12-bit analogue-to-digital con-
verter (ADC) Type MAX187 to R3
CH1
the small computer board origi- 1k
R4 L1
nally described in Elektor Elec- C8

10k
tronics magazine. 100µH
For the present article the 100n

MAX186 is employed, which is a


R5
similar converter with eight ana- 1k
CH2
C2 D1
K2 C1 C3
logue inputs instead of just one. C9
R6

The connection with the com-

10k
100n 10µ 100n
63V 1N4148
puter board is made via a length 100n 5V
of 10-way flatcable. Although 20
K6
K4 would appear to be the right R7
CH3
10 9

connector for this link, K1 was 1k


R8
CH0 1
CH0 DIN
17 DIN 8 7

eventually chosen because bit C10 CH1 2


CH1 DOUT
15 DOUT 6 5
10k

CH2 3 16 SSTRB 4 3
operations are not possible on CH2 IC1 SSTRB
100n CH3 4 2 1
port P2. A disadvantage of using CH4 5
CH3
MAX186
K1 is, however, that the 1-way R9 CH5 6
CH4
18 CSAD
CH5 CS
cable has to be connected to a K3 1k
CH4
CH6 7 19 SCLK
R10 CH6 SCLK
20-way pinheader. Note that the C11 CH7 8
CH7
10k

11
converter may, in principle, be VREF

connected to any port as long as 100n 10


SHDN REFADJ
12

the supply voltage is at the right DGND VSS AGND


R11
pins. CH5 14 9 13 C4 C5 C6
1k
The inputs of the present cir- R12
C12 10n 4µ7 100n
cuit are fitted with overvoltage
10k

63V
protection resistors (R1, R3, 100n
etc.) as well as pull-up resistors
(R2, R4 etc.). Consequently, R13 5V
CH6
inputs which are left 'open' are K4 1k
R14 R17
still held at a defined level, C13
10k

100Ω
K5
while additional ESD (electro-
static discharge) protection is 100n
C15 C16

R15 100n 10µ


CH7 63V
1k
COMPONENTS LIST C14
R16
10k

Resistors:
100n
R1, R3, R5, R7, R9, R11, R13, 984093 - 11
R15 = 1kΩ
R2, R4, R6, R8, R10, R12, R14,
R16 = 10kΩ
R17 = 100 Ω R17
H1

H2

K5 C15 K6
Capacitors:
C1, C3, C6–C15 = 0.1 µF C7
C2, C16 = 10 µF, 63 V, radial R2 C16
L1

C4 = 0.01 µF R1
R3
C5 = 4 µF, 63 V, radial R4
C8 C3
K1
Inductor: C9
L1 = 100 µH R6
R5
C1
R7
Semiconductors: R8
D1 = 1N4148 K2 C10 C2
K3 C11
R10
D1

Integrated circuits: R9
IC1 = MAX186DCPP or R11 C4
MAX186BEPP R12
C12
C13 IC1 C6
Miscellaneous: R14
R13 984093-1
K1–K5 = 2-way PCB terminal 1-390489
C5
984093-1
K4 R15
block R16 ROTKELE )C( (C) ELEKTOR
K6 = 10-way box header
H3

H4

C14

70 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

READ_AD: provided. Note that the resistors


cause a certain amount of atten-
; This subroutine reads the MAX186 12-bit A-D converter. uation if an input voltage is
; Before calling this routine the code for the desired
applied. The resistor values
have been selected such that an
; channel has to loaded into integer variabele TEMP, external temperature sensor with
; as follows: an output of 1 µA °C–1 (for
; TEMP:=1XYZ1110B where XYZ indicates the desired channel. instance, AD590 or LM334)
; The conversion result is then returned in TEMP. provides the desired voltage gra-
; dient of 10 mV °C–1.
; MAX187 connections: An example of a control pro-
; Data to 187 P1.0 gram for the converter is listed
; Serial clock P1.1 here. The converter receives
; Data from 187 P1.2 eight databits; bit 7 is the start-
; Chip select P1.3
bit, while bits 4, 5 and 6 indi-
cate which input is being
; Strobe P1.4 selected. Bit 3 is used to signal
; that the measurement is to take
place between ground and VREF,
INIT_AD: while bit 2 tells the converter to
P1.0:=0 ;data in perform a single-ended (i.e.,
P1.1:=0 ;clock non-differential) measurement.
P1.3:=0 ;CS active Bits 1 and 0, finally, initiate an
A-D conversion based on the
WRITE_AD: internal clock. Next, the 12-bit
CNTR:=8 result can be read back.
A final remark: the channel
WHILE CNTR>0 DO ;send 8 bits of A-D command
selection bits are mixed up: bit
P1.0:=TEMP.7 ;msb bit to A-D 6 is the LSB, bit 5, the MSB,
TEMP:=TEMP SHL(1) ;hold next bit ready and bit 4, the middle bit.
P1.1:=1 ;clock-in data on pos. edge The circuit draws a current
P1.1:=0 not greater than 2 mA. The
CNTR:=CNTR-1 printed circuit board shown here
WHEND is not available ready-made. For
more information on the
READ_AD: MAX186, visit Maxim's Internet
TEMP:=0 ;store result in this variable site at www.maxim-ic.com.
CNTR:=12
P1.0:=0 ;read zeroes (else conversion starts) Reference:
WHILE CNTR>0 DO ;fetch 12 bit data [1]. MatchBox BASIC Computer,
P1.1:=1 ;supply clock pulse by K.H. Dietsche and M. Ohs-
P1.1:=0 ;data valid after neg. edge mann, Elektor Electronics (Pub-
TEMP:=(TEMP SHL 1)+P1.2 ;read data lishing), ISBN 0-905705-53-X.
CNTR:=CNTR-1
WHEND
P1.3:=1 ;CS, turn off A-D
RETURN [984093]
024

ten-band equalizer
Design: P. Staugaard the equalizer are set with S1 and for the lowest frequency band is The Q(uality) factor of the
The equalizer presented in this S3. The audio frequency spec- an active one to avoid a very filters can, in principle, be
article is suitable for use with trum of 31 Hz to 16 kHz is large value of inductance. It is raised slightly by increasing the
hi-fi installations, public- divided into ten bands. based in a traditional manner on value of R19 and R23, as well as
address systems. mixers and Ten bands require ten filters, op amp A1. that of P1–P10, but that would
electronic musical instruments. of which nine are passive and The inductors used in the be at the expense of the noise
The relay contacts at the one active. The passive filters passive filters are readily avail- level of op amp IC1.
inputs and outputs, in conjunc- are identical in design and dif- able small chokes. The filter With component values as
tion with S2, enable the desired fer only in the value of the rele- based on L1 and L2 operates at specified, the control range is
channel to be selected. The vant inductors and capacitors. about the lowest frequency about ±11 dB, which in most
input may be linked directly to The requisite characteristics of (62 Hz) that can be achieved case will be fine. A much larger
the output, if wanted. The input the filters are achieved by series with standard, passive compo- range is not attainable without
impedance and amplification of and parallel networks. The filter nents. major redesign.

Elektor Electronics 12/98 71


S2 15V
L1 L5 L9 L13 L17

1H5 680mH 100mH 47mH 10mH

L2 L6 L10 L14 L18 C35 C36

1H 0Ω 68mH 0Ω 0Ω 100n 10µ


25V
K2
K1
IC2 = OP275 C3 C4 C7 C8 C11 C12 C15 C16 C37 C38 S
S
2µ2 470n 470n 120n 150n 33n 680p 10n
R11
* * C2
2k43 R2 R4 R6 R8 R21
C28 C33
2µ2
6
*
IC1 R17 1µ
R23 8 1k21
7 3 7
IC2b 2k43
5 R18
5 6
31Hz 125Hz 500Hz 2kHz 8kHz OP27 1k21
2
C29 P2 P4 P6 P8 P10 C39
2µ2 4k7 4k7 4k7 4k7 4k7 4 22µ
R14 R10 P1 P3 P5 P7 P9
4k7 lin 4k7 lin 4k7 lin 4k7 lin 4k7 lin
lin lin lin lin lin
P11 62Hz 250Hz 1kHz 4kHz 16kHz
R25 R13 R19 R1
C31
2k74
R3 R5 R7 R9
S1
10k
S3 C19 C20 C21 C22 *
2µ2 2µ2 470n
* C1 C34
C5 C6 C9 C10 C13 C14 C17 C18
15V +15V C23 C24 R20
100n 10µ
C26 C25
1µ 220n 150n 150n 47n 33n 18n
* 25V * not used
820n 47n
100n 10µ L4 L8 L12 L16 * niet gebruikt
8 25V 3

IC2
R22
IC2a
1
330mH 0Ω 0Ω 0Ω 15V * nicht gebraucht
4
2
* inutilisé
C27 C30 L3 L9 L11 L15

100n 10µ 1H 330mH 82mH 22mH


25V
–15V 984118 - 11
15V

The input level can be in the output amplifiers. OP27 or NE5534; and for IC 2, ered by a regulated, symmetri-
adjusted with P1, which may be Several types of op amp can AD712, LM833 and NE5532. If cal 15 V supply. It draws a cur-
necessary for adjusting the bal- be used:in the prototype, IC1 is an NE5534 is used for IC1, C2 is rent of not more than about
ance between the channels or an LT1007, and IC2, an OP275. needed; in all other cases, not. 1 0m A .
when a loudness control is used Other suitable types for IC1 are The circuit needs to be pow- [984118]

lead-acid-battery regulator
for solar panel systems
The design of solar panel sys-
tems with a (lead-acid) buffer
battery is normally such that the
battery is charged even when
there is not much sunshine. This
means, however, that when there
is plenty of sunshine, a regulator
is needed to prevent the battery
from being overcharged. Such
controls usually arrange for the
superfluous energy to be dissi-
pated in a shunt resistance or
simply for the solar panels to be
short-circuited. It is, of course,
an unsatisfactory situation when
the energy derived from a very
expensive system can, after all ,
not be used to the full.
The circuit presented diverts
the energy from the solar panel
when the battery is fully charged
to another user, for instance, a
12 V ice box with Peltier ele-
ments, a pump for drawing water
from a rain butt, or a 12 V ven-
tilator. It is, of course, also pos-
sible to arrange for a second bat-
tery to be charged by the super-
fluous energy. In this case,
however, care must be taken to power field effect transistor might reach 25 W, which would the output of the comparator is
ensure that when the second (FET), T1. The disconnect point make a heat sink unavoidable. high, so that the load across T1
battery is also fully charged, is not affected by large temper- Setting up of the circuit is is briefly switched in.
there is also a control to divert ature fluctuations because of a fairly simple. Start by turning P1 In case T1 has to switch in
the superfluous energy. reference voltage provided by so that its wiper is connected to low-resistance loads, the BUZ11
The shunt resistance needed IC1. The necessary comparator R5. When the battery reaches may be replaced by an IRF44,
to dissipate the superfluous is IC2, which owing to R9 has a the voltage at which it will be which can handle twice as much
energy must be capable of small hysteresis voltage of 0.5 V. switched off, that is, power (150 W) and has an on-
absorbing the total power of the Capacitor C5 ensures a rela- 13.8–14.4 V, adjust P1 slowly resistance of only 24 mΩ.
panel, that is, in case of a tively slow switching process, until the output of comparator Because of the very high
100 W panel, its rating must be although the FET is already IC2 changes from low to high, currents if the battery were
also 100 W. This means a cur- reacting slowly owing to C4. The which causes the load across T1 short-circuited, it is advisable to
rent of some 6–8 A when the gradual switching prevents spu- to be switched in. insert a suitable fuse in the line
operating voltage is 12 V. When rious radiation caused by steep Potentiometer P1 is best a to the regulator.
the voltage drops below the edges of the switched voltage 10-turn model. When the con- The circuit draws a current
maximum charging voltage of and also limits the starting cur- trol is switched on for the first of only 2 mA in the quiescent
14.4 V owing to reduced sun- rent of a motor (of a possible time, it takes about 2 seconds state and not more than 10 mA
shine, the shunt resistance is ventilator). Finally, it prevents for the electrolytic capacitors to when T1 is on.
disconnected by an n-channel switching losses in the FET that be charged. During this time, [Zeiller – 984072]

mains pulser

Design: G. Kleine rectifier, and regulator IC1 pro- est. In the latter case, the 10 µF The timer IC switches a
The pulser is intended to switch vide a stable 12 V supply rail for capacitor at pins 2 and 6 of the relay whose double-pole con-
the mains voltage on and off at IC2 and the relay. The timer is timer IC determines the time tacts switch the mains voltage.
intervals between just under a arranged so that the period- with the relevant resistors. The The LEDs indicate whether
second and up to 10 minutes. determining capacitor can be value of this capacitor may be the mains voltage is switched
This is useful, for instance, charged and discharged inde- chosen slightly lower. through (red) or not (green).
when a mains-operated equip- pendently. Four time ranges can The two preset potentiome- The 100 mA slow fuse pro-
ment is to be tested for long be selected by selecting capac- ters enable the on and off peri- tects the mains transformer and
periods, or for periodic switch- itors with the aid of jumpers. ods to be set. The 1 kΩ resistor low-voltage circuit. The 4 A
ing of machinery. Short-circuiting positions 1 and in series with one of the presets medium slow fuse protects the
Transformer Tr1, the bridge 2 gives the longest time, and determines the minimum dis- relay against overload.
short-circuiting none the short- charge time. [984122]

You might also like