This is only a preview of the July 2018 issue of Silicon Chip. You can view 40 of the 104 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. Articles in this series:
Items relevant to "Super Clock now shows your electricity tariff":
Items relevant to "Raspberry Pi Tide Chart":
Items relevant to "How’s your memory? Build the Event Reminder":
Items relevant to "800W (+) Uninterruptible Power Supply (UPS) Part III":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
Recurring Event
Reminder
REMINDER PERIOD
6, 8, 12 or 24hrs,
every week or fortnight
LED REMINDER
By John Clarke
Crook memory?
Forgot to feed and
water the chooks
every day? This
simple circuit
will remind you
to perform any regular
task, which needs to be done
every few hours, days, weeks or fortnights.
It reminds you by flashing a LED, and you
can even connect a piezo siren for a more
insistent reminder.
L
et's face it, anyone can forget to
do important tasks which occur
at regular intervals. Some examples
include taking out the garbage bins,
taking medication, feeding your pets
(and the chooks!) or other similar daily routines.
It’s especially suitable for older people who are prone to forget to check
things. For example, it could be used
to remind them that their pension payments have arrived in their account.
Whoopee!
Yes, we know that you can set reminders on a smartphone but that's
just too much of a hassle for a lot of
people. And if it happens to be an
event that involves a member of the
family, having a centralised method
of reminding everyone can streamline
the process.
This is a simple, low-cost unit
which provides a single reminder that
can be configured in a variety of ways.
If you need multiple reminders, you
could build more than one unit – it's
certainly cheap enough.
Or you could consider our slightly
fancier (but specialised) Garbage &
68
Silicon Chip
flashes once every 2s,
typically for 18hrs or until reset
AUDIBLE REMINDER
One 10ms chirp per second
while the LED is flashing
POWER SUPPLY
3V lithium button cell
QUIESCENT CURRENT
19µA at 3V, 5.4µA at 2V
CURRENT WHEN LED IS FLASHING
Recycling Reminder project from the
January 2013 issue (siliconchip.com.
au/Article/1315).
For daily events, the Event Reminder has the option of either one, two,
three or four regular alerts throughout
the day. In other words, it can provide
a reminder every 24, 12, 8 or 6 hours.
In weekly or fortnightly mode, it
goes off once a week or once a fortnight. When the LED flashes to indicate the event, you can reset it by pressing a switch, but make sure you have
fed the chooks! (We're very chookminded in the Silicon Chip office –
we like fresh eggs). Having been reset, the Event Reminder will then wait
for the set time period before alerting
you again.
Powered by a 3V button cell, the
Event Reminder is easy to set up and
we are presenting it as a bare printed
circuit board (PCB) to minimise cost.
Of course, you can put it in a case if
you want to.
Circuit description
As shown in Fig.1, the circuit is built
around an 8-pin PIC12F617 microconAustralia’s electronics magazine
42µA or 300µA together with
piezo siren
EXPECTED CELL LIFE
1-2 years
troller, IC1. It uses its internal 4MHz
oscillator to generate the instruction
clock but there is also a 32768Hz watch
crystal (X1) connected between pins 2
& 3, to run a secondary oscillator for its
internal Timer 1 counter. This is used
to keep track of the passage of time for
the reminders.
The two 100pF capacitors at pins
2 & 3 are required to make the circuit
resonant, so it can be driven by the oscillator amplifier within IC1. The crystal provides good accuracy, to within
a few minutes per year.
The 3V supply is marginal for lighting a LED, especially given that the cell
voltage can drop to around 2V at the
end of its life. To solve that problem,
the components connected between
pins 6 and 7 provide a boosted supply voltage for driving LED1.
In effect, we have diode pump: with
pin 7 low and pin 6 high, the 100µF
capacitor charges up to around 2.3V
via diode D2.
Then when the micro drives pin 7
high and pin 6 low, this 2.3V is added
to the 3V at pin 7 to give 5.3V for driving the LED. The drive current passes
siliconchip.com.au
Fig.1: complete circuit diagram for the Recurring Event Reminder. The
components at pin 6 & 7 boost the 3V supply to drive the LED.
through a 220W current-limiting resistor and LED1, back to pin 6.
Diode D3 prevents the 100µF capacitor from being reverse charged at the
end of this process.
The optional piezo siren is connected between pin 6 and ground, so
that when pin 6 goes high to charge
the 100µF capacitor, it also powers
the piezo siren, generating a brief but
loud chirp.
We’ve elected to use a pulsating tone
piezo siren, which generates its own
short bursts of sound since it makes
our circuit simpler.
Because this type of siren does
not make any sound for about half a
second after power is applied, after
which it emits a short burst, we keep
pin 6 high for around one second, to
ensure the siren sounds, even though
the 100µF capacitor charges in a much
shorter time.
The unit is powered by a 3V lith-
ium cell in a holder, labelled BAT1.
Jumper JP1 is used as a power switch
while diode D1 provides reverse polarity protection.
If the cell is inserted incorrectly,
the diode will conduct and restrict
the supply voltage for IC1 to around
-0.6V. The cell holder we use does
not connect to the cell if it is inserted
the wrong way, so this is a “belts and
braces” measure.
Maximising battery life
Most of the time, IC1 is in sleep
mode, with the program halted and
the internal 4MHz oscillator stopped
but the 32768Hz oscillator running.
It is “woken up” once per second,
to update its internal time and date
and to flash the reminder LED if necessary. Sleep mode reduces the power
consumption of IC1 to a very low level (around 7µA), to maximise the life
of the cell.
Switch S1 has a 10kW pull-up resistor that holds input pin 4 (GP3)
high unless S1 is pressed. When it
is pressed and pin 4 goes low, IC1 is
woken from sleep to respond. S1 is
used to either clear the LED flashing
indication (with a short press) or reset
the timer if the switch is held closed
for an extended period.
Note that if the optional piezo siren
is used, cell life will be slightly worse.
Typically, you will not leave the piezo
beeping for a long time; you would reset the reminder by pressing S1. Once
the piezo stops, it will no longer be an
additional drain on the cell.
Jumper JP2 is used to select weekly,
fortnightly or daily reminders. When
power is first applied to the circuit,
the GP2 input (pin 5) is set as an input
with a pull-up current applied.
If JP2 is not shorted then this input will be pulled high and the software produces weekly or fortnightly
reminders. If JP2 is bridged, the GP2
input will be held low and daily reminders are produced (see panel).
The internal pull-up current is
switched off shortly after initial powerup and the GP2 input is then set as a low
output to reduce the supply current and
extend cell life. The selection between
weekly/fortnightly or the various different daily reminder periods is made by
a different method, as described below.
Assembling the board
The Event Reminder is built on a
PCB coded 19107181 and measuring
62.5 x 38.5mm. It is presented as a bare
PCB that can sit flat, be hung or otherwise attached to a cupboard or refrigerator, or mounted in a case.
If mounting in a case, before assembling the board, you can use the PCB
as a template to mark out the loca-
Fig.2: overlay diagram
for the Event Reminder
with the completed
PCB shown. Note the
orientation of the
battery holder and the
location of JP2 marked
in red. A wire link has
been used to bridge JP2
on the prototype PCB.
The production board
has a pair of closelyspaced pads in the same
location which can be
easily bridged with
solder.
siliconchip.com.au
Australia’s electronics magazine
July 2018 69
How to set the Recurring Event Timer
First of all, you need to decide which event reminder you want. The choices are once fortnightly, weekly, daily, or every twelve
hours, eight hours or six hours each day. Changing to a different timer is simply a matter of following the instructions for that
timer – otherwise, it will stay as set until changed.
Setting and resetting the timers is achieved by shorting either or both JP1 and JP2, in conjunction with reset switch S1.
All setting data is stored in flash memory so unless you want to change the mode, you will not have to reset it when you go to
use it. However, the unit's time counter is reset to zero at power up (JP1 shorted). When powered up (JP1 inserted) and S1
isn't pressed, LED1 will flash the current setting (eg, once for weekly; twice for fortnightly).
Weekly reminder
(exactly 7 days)
Fortnightly reminder
(exactly 14 days)
Daily reminder
(24 hours)
This is the first default mode, without JP2 shorted. When powered up (jumper on JP1) LED1
will flash once. LED1 will then flash exactly 7 days later from this time (to the minute!) and
remain flashing for 18 hours, until reset with a short press of S1.
Without JP2 shorted, remove the shorting block from JP1, press and hold S1 while replacing
the shorting block on JP1. LED1 will flash twice and you can release S1. It will start flashing
exactly 14 days later and is cancelled by pressing S1 (or waiting 18 hours!). Repeating this
method will reset the Event Reminder to a weekly reminder.
With JP2 shorted, the unit is in default daily mode. Exactly 24 hours after turning on, LED1
will flash for 18 hours, if it is not cancelled first (by pressing S1). It then repeats this process
every 24 hours.
Two times/day
(12 hours)
With JP2 shorted, remove JP1. Hold down S1, replace JP1 and wait for LED1 to flash twice.
Exactly 12 hours later LED1 will flash for 8 hours, if it is not cancelled by pressing S1.
It repeats this process every 12 hours.
Three times/day
reminder (8 hours)
With JP2 shorted, remove JP1. Hold down S1, replace JP1 and wait for LED1 to flash thrice.
Exactly 8 hours later LED1 will flash for 6 hours, if it is not cancelled by pressing S1.
It repeats the process every 8 hours.
Four times/day
reminder (6 hours)
With JP2 shorted, remove JP1. Hold down S1, replace JP1 and wait for LED1 to flash four
times. Exactly 6 hours later LED1 will flash for 4 hours, if it is not cancelled by pressing S1. It
repeats the process every 6 hours. Repeating this method will reset it back to a daily reminder.
Set timer back to zero
Press and hold S1 for 5 seconds until LED1 starts continuously flashing. This will trigger the
alarm and reset the time counter to zero. Future reminders will then be related to this time.
Be careful not to short any of the connections on the underside of the board with your finger.
tions to drill the four corner mounting holes in the lid, along with holes
for S1 and LED1.
Use the PCB overlay diagram, in
Fig.2, to assemble the board. Begin by
installing the resistors. Use a multimeter to check the value of each before
inserting into the PCB.
For a reminder period of 24 hours or
less, the two pads on the underside of
the PCB labelled JP2 need to be bridged
with solder or with a short length of
tinned wire. This can be a lead off-cut
from one of the resistors.
Diodes D1 to D3 can be installed
next, taking care to orient them correctly and noting that D1 is the 1N4004
and the remaining diodes are 1N4148s.
Then fit pushbutton S1, crystal X1
and the socket for IC1. Ensure that the
notched end of the socket is oriented
as shown in Fig.2.
Take care when soldering the crystal
as the leads are very fine and it can be
70
Silicon Chip
damaged by excessive heating. Then
mount the 100nF and 100pF capacitors which are not polarised.
Follow with the 100µF electrolytic
capacitor, ensuring that its positive
(longer) lead goes through the pad
marked + on the PCB. The striped side
of the can indicates the negative lead.
Where do you get those
HARD-TO-GET PARTS?
Where possible, the SILICON CHIP On-Line
Shop stocks hard-to-get project parts,
along with PCBs, programmed micros,
panels and all the other bits and pieces
to enable you to complete your
SILICON CHIP project.
SILICON CHIP
On-Line SHOP
www.siliconchip.com.au/shop
Australia’s electronics magazine
The two-way pin header for JP1
can then be installed. Follow by fitting PC stakes at the wiring points for
the piezo siren, if you plan to use one.
Next, mount the cell holder, making
sure its positive terminal (the release
lever) is facing towards IC1.
If you are planning to mount the unit
in a UB3 Jiffy box, use a tactile pushbutton switch with a long shaft for S1
so that it will protrude through the lid.
The board can be mounted on the
underside of the lid, using four 12mm
tapped spacers and eight short machine screws.
LED1 should be soldered to the PCB
with its lens around 10mm above the
top surface, although you could mount
it higher if you wanted to. The longer
anode lead must be soldered to the
pad marked “A”.
Programming the micro
Check your construction before insiliconchip.com.au
Parts List – Recurring Event Reminder
1 double-sided PCB coded 19107181, 38.5 x 62.5mm
1 PCB-mount vertical tactile pushbutton switch with 6mm actuator (S1) ♦
[Jaycar SP0603, Altronics S1421]
1 20mm button cell holder (BAT1) [Jaycar PH9238, Altronics S5056]
1 CR2032 lithium cell (BAT1) [Jaycar SB2944, Altronics S4999B]
1 8-pin DIL IC socket (for IC1)
1 32768Hz watch crystal (X1) [Altronics V1902]
1 2-pin header with 2.54mm spacing (JP1)
1 jumper shunt (JP1) [Jaycar HM3240, Altronics P5450]
Extra parts for piezo siren
1 1-13V pulsating tone piezo siren [Jaycar AB3456, Altronics S6117]
2 PC stakes (for wiring up piezo siren)
1 UB3 plastic Jiffy box, 83 x 54 x 30mm [Jaycar HB6024, Altronics H0153]
Extra parts for mounting in case
1 UB3 plastic Jiffy box, 83 x 54 x 30mm
4 12mm M3 tapped Nylon spacers
8 M3 x 6mm machine screws
Semiconductors
1 PIC12F617-I/P microcontroller programmed with 1910718A.hex (IC1)
1 1N4004 1A diode (D1) [Jaycar ZR1004, Altronics Z0109]
2 1N4148 diodes (D2,D3) [Jaycar ZR1100, Altronics Z0101]
1 3mm red high brightness LED (LED1)
Capacitors
1 100µF 16V PC electrolytic [Jaycar RE6130, Altronics R5123]
1 100nF 50/63/100V MKT polyester or multi-layer ceramic
[Jaycar RM7125, Altronics R3025B]
2 100pF C0G/NP0 ceramic [Jaycar RC5324, Altronics R2822]
Resistors (0.25W, 1%) 4-digit colour code
5-digit colour code
1 10kW
brown black orange brown brown black black red brown
1 220W
red red brown brown
red red black black brown
♦ use a longer actuator version (eg, Altronics S1119) when mounting in a
UB3 case
serting the programmed microcontroller (IC1) in its socket. Its pin 1 dot
needs to be located near the notch in
the socket.
If you intend to program the PIC
yourself, the HEX file (1910718A.hex)
can be downloaded from the Silicon
Chip website (free for subscribers).
Since we are using pin 4 of IC1 as an
input for sensing the state of switch S1,
its MCLR function is disabled. Also,
we are running the chip off its internal oscillator. Some programmers do
not support programming a chip in
this configuration.
If you’re using a PICkit 3 and
MPLAB IDE/IPE to program this chip,
it will produce a warning but you can
ignore that warning and continue to
program the chip.
With IC1 in place, fit the CR2032
cell in its holder and place a shorting
block on the header marked JP1. If all
is well, LED1 will momentarily flash
siliconchip.com.au
after about one second to acknowledge
that the circuit is operating.
Finishing it up
The final Recurring Event Reminder
PCB design includes three white boxes at the bottom that are labelled “D”,
“W” and “F”. These are intended to
indicate whether your unit is set up
for Daily, Weekly or Fortnightly reminders respectively. You can fill in
the appropriate box with a marker pen.
If using the piezo siren, connect its
black wire to the “Buzzer -” connection
on the PCB and the yellow intermittent
wire (for the Jaycar unit) or red wire
(for the Altronics unit) to the “Buzzer
+” terminal on the PCB.
The piezo siren will not chirp on
the initial power-up indications of the
LED; it only sounds during reminder
alerts. If mounting it in a separate box,
you can solder its wires to a two-core
extension cable to connect to the Event
Australia’s electronics magazine
The yellow (+) and black (-) wires of
the Jaycar piezo siren output a pulsed
tone, or you can connect the red and
black wires for a continuous tone.
Reminder PCB (as pictured above).
For our prototype, we mounted the
piezo siren in a separate UB3 Jiffy
box, poking out through a 25mm hole
drilled in the base. You could mount
the main board on the lid of the same
box, or mount them separately and run
a cable between the two.
Really though, there’s nothing
stopping you from using the unit
as a bare board. This also makes it
easy to change the cell, although you
shouldn’t need to do that very often.
For example, you could affix the
board to the side of a refrigerator using Blu-Tack or a similar putty-like
substance at each corner.
Or you could use double-sided,
foam-cored tape. Just make sure that
if there is exposed metal on the fridge
(eg, if it’s made of stainless steel) that
the solder joints on the underside of
the board won’t be shorted out.
You could also glue magnets onto
the underside of the PCB and use those
to hold it on the fridge. Alternatively,
hang the PCB vertically on a picture
frame hook, nail or screw attached to
a wall.
The important point is that it should
be mounted somewhere that you and
your family members will regularly
spend time (eg, the kitchen) so that
someone will notice the flashing LED
and/or noise from the siren.
PCB and PIC bundle
To make life really easy for you, we have
a special "bundle" price of just $15.00 for
both the PCB and micro, plus postage.
If you just want the board, or the PIC
these are available separately from the
SC
Silicon Chip Online Store.
July 2018 71
|