Você está na página 1de 3

READERS CIRCUITS

Motorbike Chain Oiler


By Esko Viiru (Finland)

Problem #t: rainy day, zoo miles to go, chain lube spray / forgotten / empty / under loads of baggage.
Problem #z: Touring with buddies who have shaft driven bikes. Take a break and think it's a good time to
oil the chain. "What the #n"/o are you doing? Cot a problem with your bike?" That's enough! Something
must be done. Bulky shaft driven bike? No thanks. Belt driven? Phew! How about an automatic chain oiler?

Problem #2a: where's a cheap and reliable 'just electronics and software'. Not quite. To keep things simple, let's ignore the
oil dispensing device, please? The author is Real motors have internal resistance (R,) motor's inductance. To justify this simplifi-
grateful to MCJiykit from Finland tllfor the and electromotive force (t-) that's directly cation, the motor is powered by a constant
idea to use a low-geared windscreen washer proportional to the rotation speed. lf you current source. Some analogue circuitry will
pump as the oil dispenser. want to accurately measure a fluid volume can't be helped.
be needed -
through electromagnetic force, the voltage
A visitto the local equivalentof Die Ludolfsl2l drop due to the motor's internal resistance The electronic design
resulted in a spring loaded non-return valve is effectively ca ncelled: The circuit of which the schematic is shown
and some windscreen washer tubing. Main in Figure 1 and the wiring diagram in Fig-
problem solved, the rest of project will be fr=Ur-R,"r. ure 2 gets its supply voltage from the bike's

SWz = Str
LEO1 = PUMP
LEO2 = SET

Figure 1. Circuit diagram of the motorbike chain oilerwith intelligent oil dispensing.

elektor o2-2oto 35
READERS CIRCUITS

CHAIN
OILER
CONTROL rical differential amplifier. The amplification
for the non-inverting input (i.e. motor volt-
age) is unity (1). The total amplification for
the motor voltage is thus: 0.27 x 1 = 0'27 '
The pump motor used was found to have
an R, of 1.0 Q. So, the voltage droP due
to the R, is 1 V/A which happens to be the
same 'slope' as that of current measuring
op amp lC2.C. Because the motor voltage
is scaled down by 0.27, the voltage across
R, must also be scaled by the same factor
O.ZZ. thus, the amplification for the invert-
ing input is 0.27.
Referring to the labels in the circuit diagram
;r",."; ;;;;:;;.".,;;";;;;;"...;;,;u,ti,.,.owiresonthebike(exampre:suzuki we have:
sv6s0s). MEASVOLT = 0.27 x motor voltage
MEASCURR = V/A x motor current
1
STMTACHO = 0.27 x (motor voltage - 1 V/A
lC2D which is connected as a differential x motor current); ([C)] = IV/AI)
battery via the ignition switch and a fuse
(5 A). Power for the windscreen washer amplifier. The amplification factor of 0.27
scales the motor voltage (max.
-14V) The measured signals are connected to the
pump is switched by power transistor T1
down to the PIC's safe measuring range PIC's (analogue) inputs via low pass filters.
which gets its control from a PIC microcon-
(max. 5 V). The motor current is sensed by Diodes D4, D5 and D6 clamp excessive input
troller via driver T2. The return current from
R7. Differential amplifier lC2.C then ampli- voltages to safe levels.
the motor is passed through current meas-
fies the sense voltage by 2, resulting in a The type LM224 op amp is used because the
uring resistor R7. When the motor current
total amplification of 1 V/A. common mode range of its inputs reaches
reaches its high limit, transistor T3 starts
GND and the outPut can go down to GND
to conduct and 'steals' base current from
The 'simulated tachometer signal' for the as well. However, the sink current of the
transistor T2. This results in T2 and con-
motor speed measurement is realized by 1M224 is very small when the output is near
sequently T1 being cut off. Negative volt-
subtracting the (calculated) voltage drop GND, so pull-down resistors are connected
age spikes due to the motor coil(s) being
due to the motor's internal resistance (R,) to the outputs.
switched off suddenly are shunted off by
flywheeldiode D1. from the total motor voltage. This is done
by lC2.B which is connected as an asymmet- The digital part is quite straightforward.
The motor voltage is measured by op amp
Pulses from the speed sensor on the bike
are connected to lC2.A but noise spikes are
filtered out first. lC2.A's input impedance
is high (100 kQ) to prevent excessive load-
ing of the speedometer electronics. The op
amp is configured as a Schmitt trigger and
its output is taken to a PIC digital input via
resistor. Diode D3 clamps the input voltage
to the safe level. The Schmitt trigger and
the low pass filter are designed based on
the speedometer signal Present on a Suzuki
DL/sv6s0.
Both switch inputs on J2 have pull-up resis-
tors with small capacitors connected in par-
allel to eliminate noise sPikes'
The PlC16F676P is configured to use its
internal 4 MHz oscillator so a dedicated
crystal is not needed'

There are two supply rails: +12 V and +5 V'


Figure 3. The board is double-sided and has a mix of sMD and through-hole
components' The +1 2 V is taken from the bike battery

o2-201o elektor
36
READERS CIRCUITS

through diode D2 and it powers op amp lC2


as well as voltage regulator lC4. The regula-
tor is the ubiquitous 7805 and it powers the
rest of the control electronics.

Software
An assembly code program was developed
under Linux using these 'gputils' (tools):
gpasm, (assemblericompiler) and gplink
(linker) t3l. For Windows there is a free
(assembler) development environment
available from Microchip called MPLAB
IDE.
The final firmware is transferred to the PIC
micro using the 'Tait' classic programmer
and lCprog software under Windows XP.
lCprog requires that the NT/2000/XPparal-
lel port driver be installed on the system. A
more contemporary alternative to use is the
Microchip PlCKit 2 or one of its clones.

The program has the following functions:


- Rain / Dry setting at start up.
- Manual start of oiling sequence. Figure 4. Suggested mounting of control circuit, pump and oil 'tank'
-Automatic lubricating with two adjustable on a Suzuki SV650S motorbil<e.
parameters: (.1 )travelled distance between
oiling sequences and (2) pump 'on'time
during oiling sequences. Wire-to-wire connectors are used outside lnternet Links
the case. www.24.fi/mcjaykat
ll l
The commented source code as well as the Finally, the operation of the unit by means
l2l http://press.discovery.com/emea/dsc/
HEXcode files are available free from the of the two pushbuttons is described in a
Elektor website t4l. document called 080256-W.pdf included in programs/die-ludolfs/
the project download at lal. t3l http://g putils.sourceforge. net/
Construction hints and operation (o8oz56)
l4l www.elektor.com/080256
Because space is at a premium in a mod-
ern motorbike, it is suggested to build the
circuit on a double-sided PCB populated
with SMD as well as through hole compo-
nents. The author's PCB design may be
downloaded from tol; Eagle and Gerber for-
mats are supplied. Soldering should not
be a problem because no extremely small
or multi-pad SMD components have been
used. The PIC microcontroller should be
mounted in a high quality lC socket. Diode
D2 is placed between connector pads and it
might be good idea to leave some clearance
between it and the PCB surface. Figure 3
gives an impression of the finished board.
The PCB is designed to fit into a Kemo
type G1 1 1 plastic case with dimensions
90x50x25 mm. Due to the limited space
(mainly height) inside the case, the connec- Figure 4. Rather than dripping oil on the chain and spilling most of it while riding, the
tion wires are soldered directly to the PCB. dispenser lubricates the rim of the chain wheel.

elel<tor oz-zoro 37

Você também pode gostar