Silicon Chip – June 2019

(Wang) #1

92 Silicon chip Australia’s electronics magazine siliconchip.com.au


Notice also that the module’s RXD
and TXD lines are connected to Ardui-
no pins D11 and D10 via 4.7kW series
resistors, to prevent any voltage over-
swing problems.
In terms of software, you’ll find
Arduino libraries as well as self-con-
tained sketches on sites like GitHub
(https://github.com/Bob0505/E32-
TTL-100). However, I ended up writing
my own self-contained sketch called
“Uno_sketch_for E32_TTL_100LoRa
module.ino”, which can be down-
loaded from the Silicon chip website.


Using it with a Micromite


Connecting an E32-TTL-100 mod-
ule up to a Micromite is again fairly
easy, using the connections shown
in Fig.4. Once again we’re using an
LM1117T-3.3 regulator to derive the
module’s 3.3V supply from the Micro-
mite’s +5V line, for the same reason as
stated above.
We’re using a ‘software’ serial port
on the Micromite to communicate
with the module, to prevent any un-
foreseen interactions with the Micro-
mite’s hardware (UART) serial port,
which is used to communicate with
the PC. That’s why the module’s RXD
and TXD lines connect to pins 9 and


10 of the Micromite, instead of to the
TX and RX pins.
I couldn’t find any pre-written Mi-
cromite programs to control and ex-
change data with the E32-TTL-100
module, so I had to write one. The re-
sulting program is called “E32TTL100
LoRa module driving program.bas”,
and is available for download from
the Silicon chip website.
Both programs are fairly simple.
They set up the E32-TTL-100 module
for legal use in Australia, then switch
it to Mode 0 for airborne data com-
munications. It should provide a good
starting place for writing fancier pro-
grams of your own.
You’re not restricted to using this
program for LoRa communication be-
tween two Micromites. Since it sets
up the E32-TTL-100 module in pre-
cisely the same way as does the Ar-
duino sketch (or the PC/USB/Access-
Port approach, for that matter), all
three versions can communicate with
one another.
This means you can have a module
connected to a Micromite communi-
cating with another connected to an
Arduino, or to another plugged into
the USB port of a computer.
See the E32-TTL-100 tutorial at

siliconchip.com.au/link/aao5

What about the RA-02 module?
As mentioned earlier, while the RA-
02 LoRa module (siliconchip.com.
au/link/aao6) is significantly lower
in price than the E32-TTL-100, it is
more difficult to solder and also needs
an antenna fitted with a tiny U.FL-P
connector. Also, you have to inter-
face with the RA-02 via SPI as it does
not have an SPI/UART bridge like the
E32-TTL-100.
Regardless, use of the RA-02 with
an Arduino seems to be popular, and
you will find several Arduino librar-
ies and sketches written to support it.
One popular Arduino library is written
by Sandeep Mistry: https://github.com/
sandeepmistry/arduino-LoRa
Before we could try out the RA-02
modules, we had to order some adap-
tor boards. The module is surface
mounted onto these adaptor boards,
and pin headers can then be soldered
along the edge, so it will plug into a
breadboard or another PCB using two
header sockets.
These adaptor boards are available
at low cost from AliExpress (www.
aliexpress.com/item//32825376146.
html). You can also purchase similar

Above: example screenshot of the output from AccessPort when connected to an
E32-TTL-100.


The RA-02 can be mounted onto a
simple SMD adaptor board so that it
can be easily attached to an Arduino etc.
Free download pdf