106 Silicon chip Australia’s electronics magazine siliconchip.com.au
ASK SILICON CHIP
Got a technical problem? Can’t understand a piece of jargon or some technical principle? Drop us a line
and we’ll answer your question. Send your email to [email protected]
Tracking motor
rotations
Has Silicon chip ever designed a cir-
cuit or discussed monitoring the volt-
age of a brushed DC motor to count its
revolutions? I want to use a 12V DC
motor like a crude stepper motor, to
count its revolutions and stop it after
a predetermined count.
This would be used to control the
opening of a butterfly valve. It could
open and then close fully when first
powered up to establish a baseline,
if required, although I would prefer
if it could stay closed. (S. S., Manly
Vale, NSW)
- The best way to do this is to add a
rotation sensor to the motor shaft. This
involves attaching a vane to the shaft
that interrupts an optical pickup sen-
sor or using an iron vane or magnet
with a Hall effect sensor. The sensor
produces a signal as the vane pass-
es through the sensor. For a Hall ef-
fect sensor with a magnet, the signal
would occur as the magnet passes by
the sensor.
We show how to use an optical
sensor for this purpose in the Con-
tactless Tachometer described in the
August and September 2008 issues
(siliconchip.com.au/Series/52). Re-
fer to Fig.6 in the August issue. Jay-
car sells a suitable photo interrupter,
Cat ZD1901.
They also have a suitable Hall effect
sensor, Cat ZD1900. The data sheet can
be downloaded from their website.
You could then use a microcon-
troller to monitor the output of either
sensor and switch power to the mo-
tor off after a preset number of pulses
(ie, rotations).
WiFi controlled
dimmer wanted
The February issue is a beauty! John
Clarke has produced a great project, as
always, in the Touch and IR Controlled
Trailing Edge Dimmer (siliconchip.
com.au/Series/332).
In Circuit Notebook, Bera Somnath
discusses the ESP-01 module with
WiFi. Would it be possible to inter-
face a WiFi module onto the Dimmer?
I could imagine a phone app be-
ing able to control all the lights in the
house. Really smart software could
evolve, say, to allow the phone’s GPS
position to notice you are approach-
ing the house and switch on the wel-
come lights!
As always, the magazine is a great
read, congrats Nicholas on keeping
up a very fine product. (P. T., Mon-
trose, Vic)
- That is indeed possible, but it isn’t
as simple as dropping an ESP-01
module into the dimmer. The ESP-01
draws a lot more idle current than the
PIC used in the Dimmer, so it would
need a much more substantial power
supply, with either a transformer or
switchmode module. The resulting
device would be bulkier and harder
to fit into a standard wall plate.
It would also require careful atten-
tion to avoid EMI problems between
the mains supply and WiFI transceiver.
The infrared remote control fea-
ture is much simpler and provides a
good compromise, since you can still
control the lights when you’re in the
room, which is when you need them
most!
Driving an I^2 C LCD
screen from a PIC32
I am using the Micromite (PIC-
32MX170F256B-50I/SP) and want to
drive an LCD screen from it. Can the
LCD in your Online Shop, Cat SC4203,
be used with a PIC32?
What is the chip used in the LCD
for I^2 C communication? What would
the format of the signal from the PIC32
be? (F. T., via email)
- We published an article on how to
drive I^2 C LCDs in the March 2017 is-
sue, starting on page 82 (siliconchip.
com.au/Article/10584). Here is a link
to the software mentioned in that arti-
cle, for the Micromite and also Ardui-
no: siliconchip.com.au/Shop/6/4202
Although the article concentrates on
16x2 displays, the 20x4 displays use
the same controller, a PCF8574, which
provides the I^2 C interface.
If you order one of the screens from
our Online Shop, it will come with
either a PCF8574 or PCF8574A. The
PCF8574A operates identically to the
PCF8574 except that it responds to a
different set of I^2 C bus addresses. See
the March 2017 article for details.
Running sump pump
from Silicon chip UPS
I recently built the UPS that was
featured in the May-July 2018 issues
of Silicon chip (siliconchip.com.au/
Series/323).
It works extremely well; however,
one of the reasons I built it was to pro-
vide power to a rainwater sump pump
that pumps stormwater up from a pit
on my premises to the road. If a power
failure occurs while it is raining, the
pit overflows and floods my garage.
The pump draws 800W when run-
ning and the UPS has no problems
managing that load. The problem is
that sometimes the pump will start,
but most of the time it overloads the
inverter at start-up which then shuts
down. If I start the inverter manually
and allow it to utilise its inbuilt soft
start feature, the pump starts reliably
every time.
I have built the Soft Starter pro-
ject featured in the April 2012 issue
(siliconchip.com.au/Article/705), but
this didn’t help, and in any case, I re-
alised that as it will be powered on at
all times via the UPS, it wouldn’t do
its job anyway.
This turned my thinking to wheth-
er or not the 1.5kW Induction Motor
Speed Controller featured initially in
April 2012 and revised in August 2013
(siliconchip.com.au/Series/25) might
do the trick. As it is quite expensive,
I thought I would seek feedback from
you before proceeding, as there may
also be other options.
Many thanks for producing such a
great magazine. (D. E. Wattle Park, SA)
- The July 2012 Soft Starter for Power