below 2.048V, the FVR will measure over 1/2 scale. All
the program does is look at the most significant bit of the
A/D conversion. If it is on, then the battery voltage is low
and the program sounds the “battery low” signal.
When you first insert the battery, the program forces a
calibration cycle. You will first hear an “R,” to indicate that
the program is Running. Then, you will hear an “F” which
is a Flush request. Once a flush is detected, a battery test
will be performed so you should hear one short beep.
When the tank has refilled, you will
hear the number of seconds it took
to fill as described above.
You can force a reset by
shorting pins 1 (/MCLR) and 3
(ground) of H3. The /MCLR signal is
also on H5 which is 0.1” from H1
pin 3. This allows you to use a small
screwdriver to short the pins to
force a reset. Note that if you power
the unit before inserting the probe
into the tank and /MCLR is not
grounded, the program will detect
that a flush is in progress.
The circuit draws less than 20
µA continuously; however, I used
that value in my calculation for
battery life. The buzzer device
draws about 50 ma for 150 ms (300
ms with a 50% duty cycle) for each
normal flush cycle — assuming no
These values yield 480 µA-hours/day of continuous current,
and about 83 µA-hours per day for
the buzzer — assuming 40 flushes
per day. The sum of these two
values divided into the 0.25 amp-hour rating of the battery yields
about 443 days of operation.
The source code for the
program is available at the article
link, as well as my own website at
www.qsl.net/k3pto/. If you do not
have a PIC programmer or access to
one, I will be happy to program one
for you if you send me your PIC and
include an SASE. Be sure to include
an email address in case I need to
All my design files are at the
article link as well. I use Dip Trace
( www.Dip Trace.com) for all of my
PCB designs. A fully functional free
version is available from their site.
Most recently, I have been using
OshPark ( www.oshpark.com) for my circuit boards. Their
cost is $5 per square inch, but you get three copies of the
board for that price which also includes shipping. If you
want a single board, I would be happy to mail you one at
cost if you send me an SASE.
Or, you can go to my page on the OshPark website
( https://oshpark.com/profiles /k3pto) and order directly
from them. Keep in mind that you will get three copies of
the same board.
October 2016 33