Beruflich Dokumente
Kultur Dokumente
Hitec continues to expand our innovative D-Series servo line with the latest introduction of our Premium trio, the D930SW,
D954SW and D955TW. Powered by our 32-bit MCU (Microcontroller Unit) and 12-bit ADC (Analog to Digital Converter)
industrial science, this high-resolution, ultra-durable gear group delivers exactly what you need and have come to expect
from Hitec. Our D930SW is the perfect upgrade from the HS-8330SH; the D954SW replaces the HS-7954SH while the
D955TW is the advanced version of the HS-7955TG. Servo Engineering Reimagined!!!
Hitec RCD USA, Inc. | 12115 Paine Street | Poway, CA 92064 | (858) 748-6948 | www.hitecrcd.com |
Subscription Information
Appliance Control
Breathe new life into your X-10 home control system by 42 Solar Intensity Monitor
using a combination of the ESP8266 Wi-Fi module, some Applying a data acquisition system (DAQ) to record
off-the-shelf SmartSocket Wi-Fi modules, and the ever sunlight intensity throughout the day makes for a fun and
popular Arduino Uno. This project gives you web-based interesting project. By using an Arduino Uno and the
control of your legacy system. MakerPlot Data Acquisition software, the required
By Ronald hardware is minimal, and working through the related
Gladney software
challenges is a
great learning
experience.
By Ken Fisher
Columns
08 Q&A 51 Open Communication
Reader Questions Answered Here The Latest in Networking and
Topics discussed this month: Wireless Technologies
NiCd Charger Options for Battery Longevity Going the Distance with Wireless
A Closer Look at Different Types of LCD Display Theres a growing need for wireless technologies that can
Technologies cover longer distances. Such applications are usually
12 Near Space industrial in nature. The traditional wireless standards
generally do not have the range capability to handle such
Approaching the Final Frontier use cases. As a result, a whole new batch of wireless
Factors Controlling Balloon Flights and technologies has emerged to fulfill the need for longer
Predicting Balloon Landing Zones range. Here is a summary of these new standards.
Near space flight equipment is too expensive for a single
flight, and students want to get their data after all the 54 The Design Cycle
work they put into creating their BalloonSats. One way to Advanced Techniques for Design Engineers
insure a near spacecrafts recovery is to make predictions Try the RAD B4R for ESP8266 Coding
of the balloons flight prior to launch. The ESP8266 has become a very popular way to
implement Wi-Fi in embedded devices. If youve ever
05 DEVELOPING
Departments 60 NV WEBSTORE
programmed in Visual Basic, youll be able to put an
ESP8266 to work in a hurry using a free Rapid Application
Development tool call B4R. This month, well write some
PERSPECTIVES 62 TECH FORUM
Easing Into Tube 65 CLASSIFIEDS
B4R code to enable a connection between an Android
06 READER FEEDBACK 65 ELECTRO-NET phone and an ESP8266-equipped WeMos D1 Mini.
18 NEW PRODUCTS 65 AD INDEX
19 SHOWCASE
Nuts & Volts (ISSN 1528-9885/CDN Pub Agree #40702530) is published monthly for $26.95 per year by T & L Publications, Inc., 430 Princeland Court, Corona, CA 92879. PERIODICALS POSTAGE PAID AT
CORONA, CA AND AT ADDITIONAL MAILING OFFICES. POSTMASTER: Send address changes to Nuts & Volts, P.O. Box 15277, North Hollywood, CA 91615 or Station A, P.O. Box 54, Windsor ON N9A
6J5; cpcreturns@nutsvolts.com.
4 August 2017
Bergeron - Developing Perspectives - Aug 17_Dev Perspectives - ReadFeed Feb15.qxd 7/4/2017 6:26 PM Page 5
Published Monthly By
T & L Publications, Inc.
430 Princeland Ct.
Corona, CA 92879-1300
(951) 371-8497
FAX (951) 371-3052
DEVELOPING
PERSPECTIVES
by
Bryan
Bergeron,
Editor
Amps (www.boothillamps.com). components dangling in space, but whether tube or silicon-based its
Expect to pay about $130 for the many players swear by the design. impossible to compete on price
components, circuit board, and Although I dont have first-hand alone. Youre paying for the
chassis for a 5F1 kit, and $200 for the experience with full kits that contain experience and satisfaction of
5E3. Youll have to add magnetics, a everything from a cabinet, tubes, building it yourself. A complete 5F1
speaker, and a cabinet. These three speaker, and components, this is amp from Monoprice sells for $99,
items can easily overshadow the basic usually more economical than cherry which is about $250 less than what
amplifier kits in cost. picking from several suppliers and you would pay for the parts in kit
Even so, the 5F1 and 5E3 kits are then paying shipping fees for each form. However, when its time to
simple to build. The schematics are group of components. Ive heard replace a blown capacitor or tube on
easy to locate on the Web, and they good things in the forums about the the Monoprice, you wont know
sound great when completed. 5E3 guitar amp kit from Tube Depot where to begin to look. With a DIY
Moreover, most of the kits out there (www.tubedepot.com). At $600, tube amp, you know every wire,
use the old school point-to-point however, the cost begins to overlap component, and solder joint.
wiring found in boutique amplifiers. I with current off-the-shelf Fender tube Please consider sharing your tube
cant hear a difference between an amps not to mention amps on the journeys with others in the Reader
amp with components mounted on a secondary market. Feedback section. NV
printed circuit board vs. one with When it comes to DIY electronics
READER FEEDBACK
1) The LM355 shows a lead going Generosity was not something I
Wire(s) Crossed left to NO connection. ever associated with Microsoft.
I made a small error in the original 2) The 24LC256 shows a lead Eventually, I realized what at least part
schematic for my July 2017 brain going right to NO connection. of the catch was. Successive Windows
hacking project that I provided Nuts & Ted Mieske 10 service packs uninstalled some of
Volts, in which I showed pin 4 of the Crescent City, CA the Windows utilities and other
7660 connected to ground. In this programs which I had used under
configuration, the device is functional, That's correct for the LM355. The Windows 7 and before. Other bug-
and will put out the minimum voltage third lead in the LM355 is a laden updates disabled Windows 10
required for a good tDCS session. temperature adjust pin and not needed. features which were supposed to work,
However, you can choose the Since the temperature is being digitized e.g., I cannot get Windows Store to
higher voltage output recommended in by the PICAXE, any necessary adjust to function and the only solution is
the article by simply moving the ground the sensor reading can be made by the apparently to do a clean install and in
wire from pin 4 to pin 3 on the 7660. PICAXE code or in a spreadsheet. the process lose all of my software.
(Pin 4 will be left unconnected.) Pin 7 of the 24LC256 is a write There is added pressure to only
A small number of articles detailing protect pin. It prevents the memory use software purchased (or leased!)
tDCS research have indicated that chip from being written to in an through the Windows Store.
"more is not necessarily better," and accident. That pin should be connected Fortunately, a lot of what I need is
that finding the minimum voltage that to ground to enable the write, so that is available as free or open source
works for you actually produces a mistake on the schematic. software for Linux. Unfortunately, I am
stronger results. Thanks for asking. a software developer with customers
So, I've decided to pretend this Paul Verhage using software I developed for
was a fortuitous error, and mention that Windows. So, there will be no new
you might like to give it a try both Getting Real Again computer on my immediate horizon.
ways. If you do, I hope you'll let us Bergerons comment about having
know what you think. I sure can identify with Bryan
been a proponent of SDR also struck a
My apologies to the readers of Bergeron on the movement to
chord. I recently attended a local Mini-
Nuts & Volts for the schematic error. subscription software as he talked
Maker Faire. The reason I went was
Walt Noon about in his June 2017 Developing
because there was someone from the
Perspectives editorial. I refuse to use it.
local ham radio club exhibiting. I was
Last year, I took advantage of the free
No Connection Windows upgrade to move my five
hoping to see some actual ham
Did I overlook something on page communication and some neat gear,
year old computer to Windows 10. At
55 in the June 2017 Near Space etc.
the time, I had a queasy feeling that
column? I was pretty disappointed when the
there was going to be a catch.
6 August 2017
Reader Feedback - Aug 17_Layout 1 7/4/2017 6:28 PM Page 7
gear consisted of an antenna another business model to generate the email lands at its destination.
connected by a length of coax to a tiny more revenue without putting forth any It gets better ... since all of our
USB SDR plugged into a laptop. Where effort. I am still a beta tester for licensed software requires a daily okee-
is the fun in that? I, too, like electronic Microsoft and I find that irksome. This dokee from galactic central, when our
stuff with parts and wires and some "cloud" model collapsed a few years soda straw collapses, we are
wow-factor and personality oh, and ago, and like the beast that won't die, completely shut down. We actually pay
longevity. Seems to be a vanishing has been resurrected once again. for the privilege of getting substandard
breed. At my employer's place of service. Sweet!
Hardware seems to be going the business, we recently switched from Another benefit to profit-no-matter-
way software did in the 90s when inhouse mail servers to having our how-insane, there must be whole
using Visual Basic, anybody could email served from the cloud. Wow, departments whose sole purpose
cobble together a program using what a giant leap forward! I send a seems to be making software look and
wizards and downloaded code, never document to a co-worker five feet from operate differently, just to screw with
knowing how the stuff worked. Now it my desk and it crawls through us. How much has Microsoft Office
seems there is a shield and Comcast's soda straw, up to a "cloud" changed since the version I use (2003)?
downloadable code for almost every somewhere in Elbonia, where it is then I have identified some missing
electronic need. The only skill and resent to my co-worker five feet away, functionality in the newer stuff but have
knowledge required are the ability to through that same straw. not stumbled onto any new feature that
download and plug something into a Before this remarkable cloud made me smile and ask "Cool! Why
USB port. service, emails used to go from one didn't I think of that?"
I am not complaining even if it worker bee to another in about three All of the menus were changed to
sounds that way, but I just feel like seconds. Previously, there was no make it look different, but why is there
people miss out on so much when they wasted time while the messages rattled no menu entry for "make this thing
just follow instructions and never learn around our mail server as the clocks work like before"? The program is
the underlying basics. It seems like tick away at those three long seconds. fundamentally the same as it was
Nuts & Volts and a rare few other With the new and improved cloud previously.
publications like SERVO and Everyday model, I can go get a coffee, take a Excel still grinds through the math I
Practical Electronics are the last leak, and be back at my desk before Continued on page 23
sanctuary for us (presumably older)
folks who enjoy understanding how
things work right down to the metal.
And that, as Gump said, is all I
have to say about that.
Keep up the good work and be
guarded in your use of the IoT.
Keith Ujvary
Gibsons, BC
Thanks for taking the time to share
your thoughts/experiences with
subscription software and the like. I
agree with you completely. At some
point, we won't actually own any of the
"smart" devices in our homes they'll
own us and most of us won't know
how to get out from under the
technology.
Bryan Bergeron
Real-ality Check
I enjoyed reading Bryan Bergerons
comments in his June 2017 editorial on
!# # ####"#####
Real Electronics and his spot-on ! # # #
###
observations. As I rarely write to
anyone in the media, I will stumble a
bit, but hopefully the gist of what I am
thinking will be conveyed.
The idea of repeatedly buying what
I already own is offensive on face
!!!!
!!! !!!
! !
value. Like many things, this is just
August 2017 7
Q&A
n WITH KRISTEN A. McINTYRE
In this column, Kristen answers questions about all aspects of electronics, including computer
hardware, software, circuits, electronic theory, troubleshooting, and anything else of interest to
the hobbyist. Feel free to participate with your questions, comments, or suggestions. Send all
questions and comments to: Q&A@nutsvolts.com.
hydride (or NiMH) batteries.
Q
I am an Ophthalmologist and a long time Nuts current is approximately expressed by (Vp - 0.6 - 3Vb)/R =
& Volts reader. I use several hand diagnostic I, where Vp is the peak voltage from the transformer and
ophthalmic instruments that are powered by Vb is the cell voltage; typically 1.2V. The approximation
rechargeable 3.5 volt NiCd batteries that are results from the diode drop voltage of ~0.6.
well charged constantly by a transformer, a resistor, and We dont know the transformer voltage or the value
a diode. They are under a constant voltage charge of 3.5 of the limiting resistor, but we can say with certainty that
VDC in a well charger. The batteries are made up of 3-1/2 if the battery voltage decreases, then the current flowing
size AA cells in series. Is there a better charger for the 3.5V into the batteries will increase. So, how could the battery
NiCds since they remain on constant charge? voltage decrease beyond discharge?
John Haley NiCd cells are prone to internal shorts resulting from
chemical filaments growing inside; particularly if they
A
This is similar to another recent question I got are stored without charging. If one of the three cells you
about NiCd vs. NiMH charging. Just to repeat a have shorts internally, the current through the remaining
bit of what Ive written before: cells increases. The current equation changes to (Vp - 0.6
For a NiCd, as you mention, a constant - 2Vb)/R = I. Notice the factor of 2 instead of 3 on Vb.
current is generally adequate, as long as the current is kept This might or might not be a really significant change,
relatively low. Charging at a rate like 1C (or the capacity of depending on the resistor and transformer voltage. There is
the battery in one hour) can cause overheating, but lower the potential to overheat the remaining batteries, perhaps
rates are fine. damaging them.
Please keep in mind that everything Im about to say What can we do better? The easiest approach is to
only applies to NiCd batteries, and not to nickel metal avoid charging the batteries in series. Instead, use three
separate resistors to
limit the current to
the cells individually,
making it so that one
cells failure wouldnt
significantly affect the
next (Figure 2). This
could be impractical,
though, because the
batteries have to be
reconfigured from
their normal use
topology for charging.
n FIGURE 1. Simple n FIGURE 2. NiCd
NiCd trickle charger.
One other
trickle charger for approach might
individual cells.
be to use a current
source that would
deliver roughly the
same current even
8 August 2017
Q
I love to use liquid crystal displays (LCDs) in my
projects involving PIC microcontrollers. When
shopping for LCDs at large component retailers,
I came across some terminology that I do not
understand. Im hoping you can enlighten me. the polarization properties of the liquid crystal molecules.
If I understand correctly, a reflective LCD uses a This, in turn, changes how much light is transmitted.
mirror behind, and a transmissive LCD has a backlight. It is similar to stacking two polarizing filters and
Can you tell me how a transflective LCD (which is also twisting them relative to each other, and observing how
backlit) is different from a transmissive display? Can you you can darken the filters. Its actually an example of
explain what the differences are between TN (twisted Quantum Electrodynamics, or QED (dont miss Feynmans
nematic), STN, FSTN+, and FSTN- LCDs? What qualities do wonderful book on this subject, titled QED).
the different display types bring to our finished projects The net effect of this is that areas where the electric
that would cause us to select one over another? field is applied to the liquid crystal material are generally
Judy May W1ORO made to appear darker. With this in mind, lets first look at
Union, KY how light is directed through the filters and material, and
then back to your eye (Figure 4).
A
Lets see what we can find out. While I know First, without any internal light source, we have to
some of the answers to this question, Im going have light from the external environment enter through the
to educate myself at the same time regarding front surface, which is usually a polarizing filter oriented
the other parts. (Thats the best way to learn, one way. Lets say vertically for this discussion (layer 1).
isnt it?) Ive had a long history with these devices even Then, there is an electrode layer (layer 2). This is a clever
building a watch kit using some of the
earliest commercial seven-segment
displays in the mid-1970s.
Starting from the beginning, the aim
with various kinds of LCD displays is to
control the transmission of light (as you
alluded to in your question) in regions of
the display. Whether thats pixels for a
certain color filter or just a fixed segment
in a display, the principle is the same.
This is accomplished by using the
polarization property of electromagnetic
wave propagation along with some
interesting materials. There are films
that can be used to only permit certain
polarizations of light (an example of n FIGURE 4. LCD optical layers
electromagnetic waves) to pass through. (source Wikipedia, CC BY-SA 3.0,
The actual liquid crystal material user Ed g2s).
responds to an electric field and changes
August 2017 9
10 August 2017
Best Value
prototype PCBs online TS-4900
Turnkey Assembly available! Computer on Module
i.MX6 ARM CPU
WiFi & Bluetooth
Serving over 10,000 PCB 1 GHZ
Solo or Quad Core
Designers and Buyers
since 2003
Made in USA
www.PCBFabExpress.com
Support3@pcbfabexpress.com www.embeddedARM.com
August 2017 11
The landing page of the HabHub prediction I moved and zoomed the map around until I found an
application. Since HabHub is located in the UK, airport near my house. Afterwards, I clicked Set With
the default location is also located in the UK. Map. Now, I can use my mouse to pick the exact
location of the launch.
accelerating upwards at an ever- to 1,000 feet per minute; a typical feels a wind force that accelerates it
increasing speed. ascent rate for my balloons). The to match the wind speed and
How can one predict the ascent calculator then determined that the direction. As the balloon catches
rate of a balloon? Rather than run the 1,200 gram balloon needed 314 up to the wind speed and direction,
calculations yourself, go to cubic feet of helium. the wind force experienced by the
http://habhub.org/calc and have the What if youre using hydrogen balloon decreases, and the balloon
website run the calculations for you. instead of helium? Click on Constants travels ever more closely to the
HabHub is a UK website dedicated (Advanced) and there you can winds speed and direction. Ideally
to high altitude ballooning (HAB), change the gas from its default of then, a balloon is always traveling in
and the Balloon Burst Calculator is its helium. After selecting hydrogen, the the direction and speed of the wind.
online tool for calculating the amount calculator determined that only 285 The winds aloft are measured by
of gas needed to achieve a specific cubic feet of gas was needed for this the National Weather Service (NWS)
climb rate or burst altitude for flight. every 12 hours from about 100 sites
balloons. Youll need to remember the across the US. The measurements are
burst altitude of the balloon in order made using radiosondes, or balloons
Determining the Ascent to predict its flight. So, after carrying a sensor package to
determining the balloons ascent rate, measure pressure, temperature, and
Rate and Burst Altitude also record its burst altitude. relative humidity. By measuring the
of a Balloon Youll find theres an inverse azimuth and elevation of the
relationship between ascent rate and radiosonde over time, the NWS can
The only thing that makes burst altitude. The higher a balloon determine the wind speed and
HabHub difficult for Americans to can reach before burst, the slower it direction at specific altitudes
use is that the UK (like the rest of must ascend to that altitude. Thats (nowadays, the NWS is starting to
Europe) uses the metric system. Still, because a fast ascending balloon has use GPS enabled radiosondes).
its a great site for anyone launching a large initial gas load and therefore The data from radiosondes
high altitude balloons. less volume available for the gas to becomes an input into a model used
Lets look at a calculation that I expand into. Once the gas has to calculate future weather
ran for this article. A typical balloon expanded to the maximum volume conditions. Near space explorers use
for high altitude ballooning is the the balloon can hold, the balloon will the results of this computer model to
Kaymont 1,200 gram balloon burst. predict future balloon flights. One of
(http://kaymontballoons.com). A those models is the GFS, or Global
payload weight of 13 pounds (this Wind Forecast System. The important data
includes the one pound parachute) is from the GFS model is the speed and
5,900 grams. I adjusted the Target The remaining force acting on a direction of the winds at various
Burst Altitude field until the webpage balloon is the wind. Anytime a altitudes.
generated an ascent rate of five balloon is not traveling at the same A prediction of a balloon flight
meters per second (this is equivalent speed and direction as the wind, it divides the balloons ascent into
14 August 2017
Verhage - Near Space - Aug 17_Near Space - Aug 15.qxd 7/4/2017 6:29 PM Page 15
Heres the webpage as Im making a prediction for The results of a balloon flight prediction.
the weekend.
slices, and then calculates the effect altitude, and parachute descent to Set With Map.
the winds have in each slice on the speed. Now, were ready to go online After pinpointing the exact
balloons flight. Easy. However, dont and run some predictions. launch site, enter the remaining
be in a hurry to do this for yourself fields. I chose a burst altitude of
because Ill show you shortly how to Predicting the Path and 27,000 meters based on the output
do this online. from the HabHub Burst Calculator
Recovery Zone of a Near (and my experience). An ascent and
Descent Under a Space Mission descent rate of five meters per
Near space predictions can be second is right around 1,000 feet per
Parachute made at http://predict.habhub.org. minute and typical of my near space
The final phase of a near space Youll notice the inputs to the missions.
flight is the parachute descent. A prediction application are the latitude Be sure to select the correct
parachute functions by significantly and longitude of the launch site; the launch day and time. The prediction
increasing the drag of a falling object. launch time and date; the balloons application defaults to the current
Once the speed of descent is high ascent rate; the balloons burst day and time. If you dont notice this,
enough, the parachutes upwards altitude; and the parachutes landing you may be greatly surprised when
drag equals the weight of the object speed. I feel the Launch Altitude is the actual flight doesnt match
downward, letting the object not a significant field to fill in since predictions. Now all I need to do is
descend at a constant (and safe) the balloon will climb much higher click the Run Prediction button.
speed. Recall, however, that drag is than any possible launch (or landing) The output of the balloon flight
also proportional to air density. This altitude. prediction webpage is a Google Map
means that unlike a balloon, a One can move to the location of of the balloons travels. The red circle
parachutes descent speed at high the launch by zooming out the map, is the launch site, the spiky circle is
altitude is greater than its descent dragging close to the desired launch the burst point, and the green circle
speed at low altitude. location, and then zooming back in is the landing site.
The parachutes speed at altitude for precision. Alternatively, if the As you can see from this
is easy to calculate if the landing latitude and longitude of the launch prediction, a launch from my nearby
speed of the parachute is known (by site is already known, those values airport on June 2nd and reaching an
using a model of the atmospheres can be entered. altitude of 27,000 meters would end
density as a function of altitude). Notice theres an option called up in the Boise Mountains near the
Most people dont calculate the Set With Map. If clicked, this option town of Prairie. Obviously, were
landing speed of a parachute. The lets you click on a point on the map going to have to pick a different
landing speed is normally stated by to use for the launch site. The launch site for this flight.
the manufacturer of the parachute. latitude and longitude fields are Thats the beauty of the balloon
That covers the four things we automatically filled in when using this flight predictor; you can move the
need to know about a balloon flight, option. I normally zoom out, drag, launch site and time around until you
ascent rate, winds aloft, burst and then zoom back in before opting get a flight that will work for you.
August 2017 15
Verhage - Near Space - Aug 17_Near Space - Aug 15.qxd 7/4/2017 6:29 PM Page 16
16 August 2017
Page 17 - Aug 17_Layout 1 7/4/2017 6:32 PM Page 17
www.poscope.com
FREE
PCB Layout Software &
PCB Schematic Software
- USB #"
- Ethernet - Encoders
- Web server - LCD
- Modbus #"
"
- CNC (Mach3/4) #""
- IO
- up to 256 - up to 32
microsteps microsteps
- 50 V / 6 A
3 PCBs 3 PCBs 3 PCBs #"! ""
- 30 V / 2.5 A
$
41 $
61 $
81
- Isolated
+ shipping + shipping + shipping
""
2-layer 2-layer 4-layer ""
MiniBoard MiniBoardPro MiniBoardPro
(Shipped in 1 business day) (Shipped in 2 business days) (Shipped in 3 business days)
5
#" ""
RECEIVE top quality boards in just days - 7 in 1: Oscilloscope, FFT, X/Y, Recorder,
"""
" "
" """"
"
MADE IN THE USA | www.expresspcb.com
August 2017 17
New Products - Aug 17_Mar15 -NV - NewProducts.qxd 7/4/2017 6:33 PM Page 18
HARDWARE
PRECISION SPUR
GEAR MOTORS
P recision spur gear motors from ServoCity are available
now for $34.99. There are eight available choices offering
a wide selection of RPMs (from 6-90 RPM).
D-SERIES HITEC
SERVOS
S ervoCity is also offering Hitecs D-Series servo line which
sets new standards for advanced programmable
technology. Powered by their 32-bit MCU (Microcontroller
Unit) and 12-bit ADC (Analog-to-Digital Converter) industrial
science, these powerhouses dominate the servo arena. Their
potent combination of wide voltage capabilities, high
resolution, rapid response, and patented Smart Sense
technology brings maximum performance to all radio control
applications. Members of this particular D-Series group are all
designed with extremely durable titanium gears; the D941TW,
D946TW, and D951TW trio boast full metal cases. Pricing is
$157.99.
assignment or discussion question. the longer an individual continues to One-Stop Shop for
Normally in electronics textbooks, subscribe, enabling the maker to M
readers would find a number of always feel challenged and to
questions to test their understanding encourage them to constantly learn EX
EXPLORE
of the topic. The interactive nature of and innovate. DE
DESIGN
the EPTSOFT courses means they can Thimble is the invention of two BU
BUY ONLINE
take a much more exciting approach young Buffalo entrepreneurs: a
with a broader assignment, computer engineer and a former w
no minimum requirement
encouraging students to explore the college admission officer who came
topic further and learn by testing their together to share their passion for
own inputs/measurements within the STEM (Science, Technology,
apps. As these courses are self- Engineering, and Mathematics)
evaluated, users do not have to satisfy education and to make it more
an instructor only themselves that accessible to the masses. The
they fully understand the topic before company started as a grassroots
moving on. Kickstarter campaign, and offers the
Businesses can purchase these kits both through individual sale and
courses as an employee benefit or monthly subscriptions. The first kit
around which to develop their own received comes with a reusable
trainees and apprentices. Parents Arduino-compatible microcontroller
wanting to provide a little extra help and the option to purchase a toolkit
to their children can buy the course that will help novices to hit the
as a gift. ground running.
In addition to the online course Through Thimble, we hope to
content, EPTSOFT is giving a free PC inspire all individuals from budding
based app (Electronics, Mechanics, hackers to semi-professional hobbyists
Maths & Computing; worth around to fulfill their curiosity and interest
$150 and available on Amazon). First in building electronics, says Oscar
published in 1992 as PC based Pedroso, CEO and co-founder of
Educational Software, these apps Thimble. DC loads can draw max power up to
have since been developed and Individual kits are available for 350W, 150V, and 60A, providing the
installed on thousands of computers $89 or can be as low as $59 each baseline performance required for
by individuals, schools, and colleges when they are part of a 12 month most current mainstream designs.
worldwide. subscription. Pricing includes US What differentiates the DL3000 is its
shipping. industry leading 5A/us slew rate, 30
For more information, contact: kHz dynamic frequency, unique 4.3
EPTSOFT Limited For more information, contact: inch TFT display, as well as LAN and
www.eptsoft.com Thimble remote control capability.
www.thimble.io Whatever a user's power analysis
MONTHLY requirement, the DL3000 will provide
BUILD IT YOURSELF
By Dave Prochnow
20 August 2017
Prochnow - Eclipse Pin Projector - Aug 17_Blank Project NV.qxd 7/4/2017 6:34 PM Page 21
Post comments on this article and find any associated files and/or downloads at
www.nutsvolts.com/magazine/issue/2017/08
FIGURE 1. This unique map shows the path of the moons umbral shadow in which the sun will be completely
obscured by the moon during the total solar eclipse happening August 21, 2017, as well as the fraction of the
suns area covered by the moon outside the path of totality.The lunar shadow enters the US near Lincoln City,
OR at 9:05 a.m. PDT.Totality begins in the US in Lincoln City, OR at 10:16 a.m. PDT.The total eclipse will end in
Charleston, SC at 2:48 p.m. EDT.The lunar shadow leaves the US at 4:09 p.m. EDT. A partial eclipse will be
visible throughout the United States. Credit: NASA/Goddard/SVS/Ernie Wright.
P
repare yourself for the cows coming home early, Wright of NASA Goddard Space Flight Center in
chickens roosting, and a renewed search for the Greenbelt, MD used LRO-generated elevation maps for
lost planet, Vulcan. These are just a handful of accurately showing the continuously varying lunar profile.
historical snippets from colorful past events that have He then combined this lunar data with earthly terrestrial
surrounded a total solar eclipse blackout. On Monday, elevation maps for an accurate observer sighting
August 21, 2017, millions of Americans will need to have depiction.
their eyes safely glued to the ground! We couldnt have done visualizations like this even
Not since 1918 when a total solar eclipse swept 10 years ago, Wright said. This is a confluence of
across the United States spanning from Washington to increasing computing power and new datasets from
Florida have the residents of the US been able to remote sensing platforms like LRO and the Shuttle Radar
witness such a visual treat. In fact, according to NASA, Topography Mission.
everyone in North American will be able to experience Wright was also able to accurately illustrate the shape
this eclipse. of the moons umbra as it races across the topography
Coupling the moons elevation data obtained from the here on earth. Gone are the days of the umbra being
NASA Lunar Reconnaissance Orbiter (LRO) with NASAs represented as a clean disc-like shape. Wrights new NASA
detailed earth topography maps has enabled anyone and lunar umbra is an irregular polygon featuring slightly
everyone to have the most detailed and precise maps ever curved edges (see Figure 2).
created for predicting all of the eclipse data along the path
of totality (see Figure 1). Make a Pinhole Solar
In order to create such precise predictions, Ernie
Projector
Eclipse map/figure/table/predictions courtesy of Fred In the areas of totality, you can expect a central
Espenak, Emeritus, NASA/Goddard Space Flight duration of approximately two minutes and 40 seconds. If
Center, from eclipse.gsfc.nasa.gov. youd like to visually experience this celestial spectacle,
August 2017 21
Prochnow - Eclipse Pin Projector - Aug 17_Blank Project NV.qxd 7/4/2017 6:34 PM Page 22
FIGURE 2. This map shows a detailed image of the moon's umbral shadow as it passes over the US during the
August 2017 total solar eclipse. Credit: NASA/Goddard/SVS/Ernie Wright.
22 August 2017
Reader Feedback - Aug 17_Layout 1 7/4/2017 6:28 PM Page 23
laid out more than a decade ago, and editorial on Real Electronics ... April A combination open source and
Word still works with the same this year, I switched one Dell 1737 free-to-use software is the only way I
template I devised back in 2003. So, laptop to Ubuntu Studio for my audio have found to stop the continued cost
what is my incentive to pay an annual and SOC work. The other Dell laptop increases of software.
fee to Microsoft because some dirt-toe still has OEM Vista installed on the hard For hardware, the Rasberry Pi 3
rearranged everything to make it drive, but is set to boot a USB drive and ESP8266 have worked well for IoT
"better" and "more efficient." directly to an up-to-date unregistered and media services.
As an old guy, I can tell you that Win 10. Not the best solutions, but I have found VNC combinations to
there are a finite number of brain cells. useful in my volunteer work as sound work well. I use NoMachine for audio
Most brain cells cannot be and system technician for the Happy
Continued on page 40
reprogrammed for long-duty service, as Feet Cloggers.
happened when I was much younger.
My neurons are all filled. So stop
changing stuff that does not need
changing!
Sure, young people are enamoured
by the constant churn and changes.
Just wait until those little smarties start
to get old and figure out just what
grandpa was bitching about. Hah!
When young, you memorized
things you will never use again. I still
know how to use Micropro's WordStar
for crying' out loud. Heck, I could still
use ED.COM as delivered in CP/M 1.4!
B#T<CR> I23<CR> the quick brown fox
jumped in front of the truck
123456789 times<CR> B#T<CR>. And,
I could probably still write in "ENGLISH"
on a Microdata minicomputer using the
Pick operating system.
However, I cannot "unlearn"
ED.COM commands in order to make
room for more Microsloth's same old
Word with a facelift, just to screw with
your mind! Does anybody care about
that? Nope.
I had a couple more paragraphs
but the Internet ate it. Since Windoze is
so bloated with updates and Kaspersky
won't let me type, I switched over to
my Linux box so I could communicate.
Sometimes Linux and Firefox do not
play nicely together. I guess that
anything else I had was probably
unimportant.
Tom Farrand
More Real-ality
In regards to the June 2017
August 2017 23
Gladney - Bi-Lingual Timer - Part 1 - Aug 17_Blank Project NV.qxd 7/4/2017 6:36 PM Page 24
BUILD IT YOURSELF
By Ronald Gladney
To post comments on this article and find any associated files and/or
downloads, go to www.nutsvolts.com/magazine/issue/2017/08.
FIGURE 6. Example web page from FIGURE 4. Sonoff with programming header installed.
reprogrammed S20 or Sonoff Wi-Fi switch.
PARTS LIST DC-DC converter max 12V input to 3.3 VDC capable of
at least 700 mA P/N 1083356
Itead S20 Smart Socket Wi-Fi switches P/N 120 VAC to 9 VDC at one amp adapter to power the timer
IM160308002 purchased from Itead.cc.com P/N 916174
Itead Sonoff hardwired switches (option)(Wi-Fi only) X-10 (CM17A) Firecracker module purchased from eBay
P/N 1019971 Banggood.com (also available at (also available from X10.com)
Itead.cc.com)
Misc Parts:
Note: There is also a Wi-Fi version that includes 433 MHz Hookup wire to connect components
remote control. The software has not been tested on the Miscellaneous pin sockets salvaged from old electronics
version of this switch that includes a 433 MHz remote, 10K ohm 1/4W resistors (interface to ESP8266)
and my software would disable the remote control (Note: 1K ohm or 4.7K ohm resistors are also acceptable.)
functions. 1K ohm 1/4W resistor (Voltage divider for ESP8266
Receive pin)
Available from Banggood.com: 2K ohm 1/4W resistor (Voltage divider for ESP8266
Arduino Uno R3 ATmega 328P P/N 964163 Receive pin)
LCD/keypad shield for Arduino P/N 937405 (Note: A 2.2K ohm resistor is also acceptable.)
ESP8266-01 P/N 958131 1N4148 diode (To enable reset of ESP8266 from
DS3231 AT24C32 IIC real time clock for Arduino LCD/keypad reset button)
P/N 81066 100 mfd 15 volt capacitor (filter for DC-DC converter
output)
August 2017 27
Gladney - Bi-Lingual Timer - Part 1 - Aug 17_Blank Project NV.qxd 7/4/2017 6:36 PM Page 28
RESOURCES
GitHub.com Locations for add-on libraries that must be
installed
https://github.com/marcoschwartz/aREST
https://github.com/marcoschwartz/aREST_UI
https://github.com/espressif
https://github.com/adafruit/RTClib
https://github.com/ekstrand/ESP8266wifi
correct state if power was lost and restored while lights 3D printed enclosure
were either on or off. The X-10 control was added after www.thingiverse.com/thing:142282
everything else was functioning because it seemed a Itead
shame not to take advantage of the many X-10 modules www.itead.cc
that I presently own. Refer to Figure 7. www.itead.cc/smart-socket.html
I selected the Arduino standard serial port to www.itead.cc/sonoff-wifi-wireless-switch.html
communicate to the ESP8266 module. This kept the
Arduino
Arduino code cleaner because only one serial bus www.arduino.cc
communication channel was needed, and it avoided the www.arduino.cc/en/Main/Software
potential pitfalls that exist with the Software Serial
Library. The only limitation of this approach is that the ESP8266
ESP8266 must be unplugged or have its serial port https://espressif.com/en/products/hardware/esp8266ex/
overview
disconnected during any reprogramming effort on the https://kbeckmann.github.io/2015/06/28/Tinkering-with-the-
Uno. Once the timer is up and running, I anticipate a ESP8266
few cases where I will reprogram the Arduino.
If you choose to use my serial methodology but Banggood.com
www.banggood.com/UNO-R3-ATmega328P-Development-
later add diagnostic [Serial.write()] commands, be sure to
Board-For-Arduino-No-Cable-p-964163.html?rmmds=search
comment out those diagnostic messages before www.banggood.com/LCD-Keypad-Shield-V2_0-LCD-
connecting the ESP8266 serial bus. Any time an upper Expansion-Board-For-Arduino-p-937405.html?rmmds=search
or lower case letter (a through j) appears on the serial www.banggood.com/3Pcs-ESP8266-Remote-Serial-Port-WIFI-
port, it will cause the associated Wi-Fi module to Transceiver-Wireless-Module-p-958131.html?rmmds=search
www.banggood.com/DS3231-AT24C32-IIC-High-Precision-
respond. The ESP8266 draws more current (up to 300 Real-Time-Clock-Module-For-Arduino-p-
mA) than the Arduino 3.3 volt regulator can supply. 81066.html?rmmds=search
Therefore, I added a DC-to-DC converter to power the www.banggood.com/DC-DC-12V-5V-to-3_3V-Step-Down-
ESP8266 directly from my AC-to-DC adapter. Voltage-Regulator-Power-Module-p-
The Arduino provides a direct pin connection to the 1083356.html?rmmds=search
www.banggood.com/9V-1A-Power-Supply-Adapter-US-Plug-
9 VDC input (Vin header pin), so no cutting and splicing 2-Flat-Pin-For-Arduino-p-916174.html?rmmds=search
of the adapter power supply is required. There are many
DC-DC converters on the market. Be sure to choose X-10 CM17A Firecracker interface
one that can accept your maximum DC input voltage http://web.archive.org/web/20040326214130
with some operational margin. Also, if you choose a http://www.geocities.com/ido_bartana/Firecracker_protocol.htm
www.x-10.com
variable output DC-DC converter, be sure to adjust it to www.6502.org/mini-projects/firecracker/firecracker.htm
3.3 VDC before connecting the ESP8266 module.
The schematic (Figure 8) shows all component BroHogan
wiring required for this project. I incorporated the DC- http://playground.arduino.cc/X10/CM17A
DC converter and all ESP8266 support components on http://brohogan.blogspot.com
a small breadboard with an eight-pin header to plug in Location for Arduino.cc libraries
the ESP8266-01. R5 and R6 are required because the www.arduino.cc/en/Tutorial/EEPROMWrite
ESP8266 cannot accept +5 VDC that could be supplied www.arduino.cc/en/Tutorial/Wire
on the serial transmit pin from the Arduino. The serial www.arduino.cc/en/Tutorial/LiquidCrystal
receive pin on the Arduino will accept the 3.3 VDC
Installation of ESP8266 boards into Arduino IDE
signal from the ESP8266 transmit pin, however. https://learn.sparkfun.com/tutorials/esp8266.../installing-the-
My software does not require data to be transmitted esp8266-arduino-addon
28 August 2017
Gladney - Bi-Lingual Timer - Part 1 - Aug 17_Blank Project NV.qxd 7/4/2017 6:36 PM Page 29
30 August 2017
Bogatin - Radioactive Cat - Aug 17_Blank Project NV.qxd 7/4/2017 6:37 PM Page 31
BUILD IT YOURSELF
By Eric Bogatin
Post comments on this article and find any associated files and/or downloads at
www.nutsvolts.com/magazine/issue/2017/08
A
web search revealed there is another treatment used to image deep tissue. This is the basis of PET
for hyperthyroidism with a 95% success rate in (Positron Emission Tomography), for example. Youre
cats, based on radioactive Iodine-131. The idea injected with a biologically active material that emits
is to kill off the overactive regions of the thyroid with positrons an anti-electron. As soon as it is emitted, it
radiation. Because the thyroid selectively absorbs iodine, a immediately annihilates with the first electron it
radioactive form of iodine is injected into the cat. It encounters, and the pair gives off two gamma particles
concentrates in the thyroid and over a few weeks, kills off which make their way out of the body and are detected.
some of the thyroid. When done correctly, this is a Iodine-131 decays into Xenon-131 by emitting a beta
permanent cure. However, it means making him particle with energies ranging from about 190 keV to 606
radioactive, but only for a few weeks. keV. This is what does all the medical work. This is a lot of
energy to be deposited locally into the targeted tissue. The
Radioactivity and Iodine new Xenon nucleus is created in an excited nuclear state.
Immediately after the neutron emits the beta particle and
Every element on the periodic table has just one decays into a proton, the new proton jiggles around, drops
unique atomic number. This is the number of protons in its down to a ground state, and emits a gamma particle with
nucleus; the same as the number of electrons in the atom. an energy of 364 keV.
The atomic number of iodine is 53. Iodine can have a By comparison, a dental x-ray may be as high as 70
wide range of neutrons in its nucleus. We call these keV. This 364 keV gamma ray particle makes its way
different forms of iodine (with different numbers of outside the body and we see it as radiation. With I-131,
neutrons) isotopes. we get a 2-for-1. The beta particle does the therapeutic
There are 37 known isotopes of iodine all with 53 work and the gamma particle allows us to see it in action.
protons in the nucleus, but with 55 to 93 neutrons. We Every gamma particle we detect means there was a beta
track the total number of particles in the nucleus as the particle killing off thyroid tissue.
atomic weight. For iodine, it varies from I-108 to I-144. The half-life of I-131 is eight days. This means every
All of these isotopes are radioactive except I-127, eight days, the number of I-131 atoms left is reduced in
which is stable. Iodine-131 has special use in medical half, and the rate of decay has decreased by half. After 16
treatments. This is partly because iodine is biologically days, there are about 1/2 x 1/2 or 25% of the starting
active and is selectively taken up by the thyroid. It is a number of I-131 atoms left, which means the radiation
beta and gamma emitter with a half-life of eight days. This emitted is reduced to 25%. After 60 days (or about eight
is perfect for targeted radiation attacks on thyroid cells. half-lives), there is only 1/ 2^8 = 0.4% of the radiation
There are three types of radioactive particles emitted levels as initially.
in radioactive decay: alpha particles, which are two I expected Maxwells radiation levels to drop off faster
protons and two neutrons; beta particles, which are high than an eight day half-life because he was constantly
energy electrons; and gamma particles, which are high losing radioactive iodine from his body as it cycled
energy light photons. through. It was flushed out of his system and ended up in
Alpha particles have the potential to produce the his kitty litter, which would also be radioactive.
most biological damage, but they dont penetrate much The vets at the clinic warned us not to spend much
more than the thickness of a piece of paper. However, if contact time with Maxwell until his radiation levels
the radioactive source is ingested or inhaled, it can do a dropped and to not throw his litter out in the trash. They
lot of local cell damage. said the radiation levels in his used cat litter might set off
Radon is a noble gas which decays and emits alpha radiation detectors at municipal dumps.
particles. Breathe it in and it decays in your lungs, and you I wanted to build a radiation detector to see how hot
have a higher chance of contracting lung cancer. This is Maxwell was initially, and how quickly his radiation levels
why we test for radon in basements where it is a decay (and his used cat litter) dropped off.
product of uranium into radium, and then into radon,
naturally occurring in bedrock. Detecting Radiation
Beta particles dont penetrate more than a quarter of
an inch in tissue. This means that if they can be placed Since I was only going to detect gamma particles, a
strategically in tissue you want to kill off, they will deposit Geiger counter was the obvious detector choice. The
all of their lethal effects very localized. Beta emitters make original name for the detector is really a Geiger Muller
the perfect surgical strike killers. tube, named after Hans Geiger and Walther Muller, who
Gamma particles are just a form of light but of very developed the detector in 1928. Its sometimes referred to
short wavelength, or high energy per photon. They travel as a GM tube, including both inventors.
much farther through the body and through air than beta A GM tube is basically a vacuum tube with about
particles. These will make it out through the body and are 1/10 an atmosphere of air. A central wire (the anode) is at
32 August 2017
Bogatin - Radioactive Cat - Aug 17_Blank Project NV.qxd 7/4/2017 6:37 PM Page 33
FIGURE 5.
Circuit for the
high voltage
power supply.
34 August 2017
Bogatin - Radioactive Cat - Aug 17_Blank Project NV.qxd 7/4/2017 6:37 PM Page 35
Exporting to
Excel
I love numbers. If math is the
language of theoretical science,
measurements are the language of
FIGURE 8. Count rate
experimental science. Measurements
measured while Maxwell are especially valuable when we can
was in his cat apartment. bring them into Excel and analyze
He can be seen inside the them. In searching on the Web, I
top hole in the photo to came across an invaluable free tool
the left.The Geiger which allows me to write data directly
counter is right above him.
into an Excel spreadsheet. Ive written
about this in Nuts & Volts a few times
(see Resources).
The application is called PLX-DAQ v2 and is basically an Excel file
with a macro that reads the serial port and parses the printed values
into cells (see Resources for a link to download an Excel file with this
macro embedded).
I wrote a sketch to count pulses in 10 sec intervals, then calculate
the counts per minute and print these values every 10 seconds to Excel.
36 August 2017
Bogatin - Radioactive Cat - Aug 17_Blank Project NV.qxd 7/4/2017 6:37 PM Page 37
My Prototyping
Philosophy
From my years of experience in startups and
product development programs, Ive embraced the
motto, Fail often and fail early. This means I want
to design and build a prototype with the best
practices I can think of, but get it done quickly.
Then, I can use the prototype to test my approach. I
want to use my prototype to help me find the things
I could not anticipate, so the next versions get better
and better.
When I build Arduino circuits, I always start out
building them on a solderless breadboard. It takes
minutes to put something together and test out. Figure 9 to see, but was it really detecting radiation?
is the prototype Geiger counter that I put together in I needed a radiation source to test my Geiger counter
about three hours. It is so much quicker than designing a (remember my wife forbade me from ordering anything
circuit board, sending it out to get made, and assembling that could potentially trigger a Homeland Security alert).
it. When I have a final stable design and may want to Turns out, I could buy one at Walmart.
make multiple units, I will design a board at that time. There are two types of smoke alarms: photoelectric
The downside to using a solderless breadboard is that based and ionization based. The ionization based smoke
it may have more noise and not as good signal integrity as detectors have a small piece of Americium-241. It is
a multi-layer circuit board. This is one reason I mount my radioactive, and emits an alpha particle and a very low
solderless breadboards on a copper base connected to energy gamma particle. The gamma particle has an energy
ground. I keep wires short and route signal lines close to of 59 keV which is in the range of dental x-rays. I had no
the copper base, and pay attention to all signal return hope of detecting the alpha particle, as it would be
paths. In other projects, Ive been able to keep voltage stopped by the metal wall of the Geiger tube. However, I
noise levels from AC and RF pickup below 1 uV RMS. thought I might be able to detect the low energy gamma.
My designs may not look pretty, but I can construct I bought an ionizing smoke detector for $7 and took it
them quickly, make changes on-the-fly, and optimize the apart. I found a piece of metal that looked like it could be
design in hours instead of weeks. They have surprisingly the ionizing source. I pulled this off the detector and
good performance.
Testing My
Geiger
Counter
When I turned on the voltage
to my Geiger counter, I
immediately began detecting pulses
when the applied voltage was
above 290V. I settled on 310V as
giving a steady rate of pulses, at
about 30-50 counts per minute. FIGURE 10. Americium source pulled from a smoke detector and placed
This was the background I expected on top of the Geiger tube.
August 2017 37
Bogatin - Radioactive Cat - Aug 17_Blank Project NV.qxd 7/4/2017 6:38 PM Page 38
Maxwell is Hot
One week after his injection of I-131, we
picked up Maxwell at the vet and brought him
home. It was a little hard to get him to stay still
long enough to measure his count rate. I had cut
the counting interval down to 10 seconds, but I
FIGURE 11. Background count rate and when the smoke still needed the cat to stay still for a few minutes to
detector source is on top of the GM tube. get good statistics. Figure 12 shows my first
attempt to get a reading on Maxwell.
I found early on that his count rate was
strongly dependent on how close he was to the
detector. To get stable and reproducible readings
and compare his count rate changes each day, I
decided on measuring him with a fixed distance of
12 inches from his neck. I also waited for him to
settle down in one of his favorite napping
locations. Figure 13 shows the typical setup I used
to get reproducible measurements.
On his fourth day home, his count rate was
about 850 counts per minute at 12 inches. Figure
14 shows these initial stable readings.
On day 11, Maxwell was down to 160 counts
per minute. By day 13, he was down to 92 counts
FIGURE 12. First reading of counts from Maxwell. He was at per minute only twice above background.
more than 6,000 counts per minute almost at the Unfortunately, his poop wasnt.
measurement limit!
What Do You Do with
Radioactive Kitty
Litter?
Part of the reason Maxwells counts dropped so fast
was that he was excreting a lot of the radioactive iodine.
This meant his kitty litter was radioactive. I scooped up
the first sample and kept it in a bag to use as a reference.
The decay rate of this clump should reflect the decay rate
of I-131. I kept this around my lab and measured it
periodically, trying to be careful to keep it the same
distance from the detector each time.
I used the lid of the plastic box of the Geiger counter
as the reference position. Figure 15 shows the sample
resting in the detector box while I took readings for an
hour to get good statistics. With a count rate of about 600
counts/min over one hour, I collected about 36,000 total
FIGURE 13. Maxwell napping while I measured his counts. The standard deviation on this is about
count rate with the detector 12 inches from his neck. sqrt(36,000) = 190 counts/per hour = 3 counts/min. My
38 August 2017
Bogatin - Radioactive Cat - Aug 17_Blank Project NV.qxd 7/4/2017 6:38 PM Page 39
pass-through with TeamViewer on an "Real Electronics ..." to the new computer and go online to
iPad 6s to access my laptops in the Here is a different solution to the VMware and download a new driver
garage from my rocker in the living constant change in computers and program.
room or from the porch in cooler operating systems that may be of An interesting side note is that
weather. Tightvnc and Tigervnc also interest to your readers. VMware is a subsidiary of Dell
work well with SOCs. Copy your old computer onto your Computer (ref: www.vmware.com).
Since the iPad has an Internet data new computer to run as a program An old old reader from the
connection, I can also connect away using VMware (Virtual Machine Ware). Popular Electronics age
from home if needed using a single I had a local computer service Gary Bates
open port on the router. convert the contents of my old
Frank Townsend computer onto a new computer to run Excellent solution!
as a program. I've used VMware in the past with
Thanks for sharing. I'm not aware of All I do now is click on a program some success. It happened to be with a
everything that you mentioned, and will icon to run my old computer and its CAD program as well (killer prices!), but
put them on my 'must investigate' list. old programs. that was over a decade ago. Still works
Bryan Bergeron This saved me over $7,460 in today, I imagine. Thanks for the
upgrades on just two CAD programs suggestion. I'm sure many readers will
Real Solutions alone and cost me $99 to have the be appreciative.
Regarding Bryan Bergerons conversion done. Bryan
editorial in the June 2017 issue titled Now when I get a new computer, (also a past fan of Popular Electronics)
all I need to do is copy the program file
with MIDI keyboards, controllers, and and T-RackS Deluxe with Mic Room. generate output signals at up to 12
synths to record MIDI tracks, control iRig Pro I/O is available for MHz.
virtual instruments, use control $149.99. Prices exclude taxes. The IO-Warrior56 is available as a
surfaces, pedalboards, and connect plug-in PCB module or as a 56-pin IC
outboard sound modules and more. For more information, contact: for installing on a custom board. Also
The multi-color LEDs on iRig Pro I/O IK Multimedia available is a new IOW56 Starter Kit
provide visual feedback of MIDI www.ikmultimedia.com with a large breadboard area,
in/out activity. designed specifically for the IO-
For real time monitoring on the UNIVERSAL USB I/O Warrior56.
go, iRig Pro I/O features a high Warrior ICs from Code
quality 1/8" headphone/line output CONTROLLER Mercenaries are a family of universal
with level control. Users can plug in
their headphones, connect to a mixer,
or hook up a set of powered
S aelig Company, Inc., has
announced an improved USB
I/O controller the IO-Warrior56
I/O controllers for USB that handle all
complex USB protocol details without
requiring special Windows drivers
monitors like iLoud Micro Monitor. now with 50 I/O pins as well as since Warrior ICs appear to the OS as
With any connection, the integrated complex functionality. In HID Device Class (Human Interface
headphone/line output delivers addition to I2C, SPI, 8x8 key matrix, Device).
crystal-clear audio for accurate 64 x 8 LED matrix, and support for This means that Warrior ICs are
representation of the audio program. most alphanumeric and graphic LCD controlled without screen prompting
iRig Pro I/O features a Neutrik modules, the new version also offers for additional software; standard
XLR/1/4" combo input that lets users system drivers allow access to
plug in all their gear; from dynamic, Warrior ICs directly from
condenser, or ribbon microphones to application programs. A Linux
unbalanced Hi-Z or line level driver is also available.
instruments like guitars, basses, and All of the modules work with
more. iRig Pro I/O features a 48V standard HID system drivers, so no
phantom power switch for powering special installation software is
condenser or active ribbon needed; just hook up to a USB port
microphones. and connection is immediate.
With the adjustable numeric IO-Warrior56 technical data is
input gain control, users can easily as follows:
recall the gain settings for their
recordings. Full speed USB (12 Mbit/s, 1,000
iRig Pro I/O can operate on 2x reports/s)
AA batteries (included) when Works with built-in system drivers
connected to an iPhone/iPad, or on 50 I/O pins for general use
USB power when used with a Mac or I2C master, 50/100/400 kHz
PC. iRig Pro I/O also features a new Direct control for most
DC in port that when used with its alphanumeric and graphic LCD
dedicated power supply unit an eight-channel 14-bit A/D converter modules
charges a connected iPhone or iPad and a 16-bit PWM generator. SPI master up to 8 Mbit/s
while in use for unlimited playing or The IO-Warrior56 handles the LED matrix up to 64 x 8 with
recording time, whether on stage and control of more complex signals external shift registers
in the studio. internally in order to reduce USB 8 x 8 key or switch matrix
iRig Pro I/O comes with Mini- traffic and CPU programming burden. 16-bit PWM generator (up to 12
DIN to USB and Mini-DIN to With the addition of an A/D MHz output)
Lightning cables along with two five- converter, the IO-Warrior56 is now Available as chip, module, or starter
pin MIDI to 2.5 mm cables for capable of handling analog signals. kit
connection to standard MIDI gear. Each of the eight analog channels can
iRig Pro I/O comes with more be sampled every 385 s. When The IO-Warrior56 Starter Kit is
than $500 worth of included IK running in single channel mode, the priced at $44.
software. sample rate is 7,800 Hz.
Users get full versions of IK's titles A new 16-bit PWM generator For more information, contact:
like AmpliTube 4, AmpliTube for uses an internal 1 kHz, 250 kHz, 2 Saelig Company, Inc.
iPhone and iPad, SampleTank 3 SE, MHz, or 48 MHz clock and can www.saelig.com
August 2017 41
Fisher - Solar Intensity Monitor - Aug 17_Blank Rough NV.qxd 7/4/2017 6:40 PM Page 42
A
pplying a data acquisition system (DAQ) to record or otherwise monitor the behavior of small laboratory
sunlight intensity throughout the day makes perfect projects.
sense to me. Required hardware is minimal, and
working through the related software challenges is Application Detail
a great learning experience.
I first considered using the standard Arduino serial Besides creating a 10 hour profile plot of sunlight
intensity, I wanted the application to provide a means to
set up the next day data collection start time the night
before, and then have it capture the required solar
intensity data for the desired 10 hour period without any
further attention from me. After the plot start time is
entered, a numeric display field shows remaining minutes
in the countdown period until plot start.
The application captures a jpg image of the data plot
and Event Log, and saves it to the PCs hard drive prior to
shutting down at the end of the plot period. A collection
FIGURE 1. A collection of of recent 10 hour plots can be seen in Figure 1.
recently captured sunlight
intensity plots. Finally, for reassurance that all is in sync, a display
field on the MakerPlot user interface shows what time
the Arduino is using so it can be visually checked for
agreement with PC time.
42 August 2017
Fisher - Solar Intensity Monitor - Aug 17_Blank Rough NV.qxd 7/4/2017 6:40 PM Page 43
By Ken Fisher
To post comments on this article and find any
associated files and/or downloads, go to
www.nutsvolts.com/magazine/issue/2017/08.
FIGURE 3. Plugboard
junction box, MakerPlot
Arduino Uno, and
duplicate of window As mentioned, MakerPlot is a collection of
mounted solar cell. control components such as meters, switches,
input/output text fields, data plots, and the like
which you can place and size as desired on your display
Primary Components screen. MakerPlot replaces the text based serial monitor
that is part of the Arduino IDE (integrated development
Please refer to Figure 2. The Arduino Uno environment) with something much more colorful and
microcontroller is mounted in the small black dust cover visually interesting.
enclosure near the center of the figure. As most readers The Arduino and the PC communicate using serial
will already be familiar with the Uno microcontroller ASCII data over the same USB cable link that is used by
(except for unique project specific aspects), further the standard Arduino IDE to download a new program
overview information will not be included here. into the microcontroller module. No physical cables need
The plugboard (which can be seen in greater detail in to be switched to use MakerPlot; just be aware that you
Figure 3) serves as a junction box for the various can only do one of two tasks at a time: either display
component interconnections required. The white wire with MakerPlot app data or download code to the Arduino
alligator clip connections leads to the solar cell taped to controller.
an 8 x 12 piece of cardboard which is propped against a This is the same constraint as when using just the
sunny window pane above the workbench. A duplicate of Arduino IDE; sharing the data link between program
the window mounted solar cell is included in the photo. downloads to the controller and displaying data on the
The DVM (digital voltmeter) is not
required, but you should check to see
that your solar cells output stays under
the Arduinos analog input max voltage
spec of 5 VDC when exposed to
maximum levels of sunlIght before FIGURE 4. Wiring diagram.
connecting it to the Uno. The
MakerPlot user interface runs on any
Windows based PC and will be
discussed further in the next section.
Component interconnections are very
simple (Figure 4). The 100 ohm load
resistor is not absolutely necessary, but
its presence will result in an overall
lower impedance circuit. We will
therefore gain higher noise immunity.
August 2017 43
Fisher - Solar Intensity Monitor - Aug 17_Blank Rough NV.qxd 7/4/2017 6:40 PM Page 44
need to! MakerPlot can provide the PCs time and date
information to the Arduino program. Additionally, using
the Arduino Time library makes it easy.
The Arduino Time library (contributed by Michael
Margolis) is a key factor in simplifying adding real time
monitoring and control capability to projects such as
this one. You can easily add this optional library to
your library collection from inside the Arduino IDE
(Sketch > Include Libraries > Library Manager ...); refer
to Figure 6.
The library is built around a software clock. It has
all of the functions you would expect to retrieve;
typical date/time variables such as month(), day(),
year(), hour(), min(), and sec(), plus many others that
you will more fully appreciate when you start
FIGURE 5. User control panel. developing your own software with it. To make this
clock into a first class time reference, you will want to
serial monitor. You can do one or the other, but not both. periodically synchronize it to an accurate time source; in
To allow MakerPlot to use the link, simply click the our case, the PCs internal clock via the MakerPlot/PC
CONNECT switch at the lower left of the user display comm link. (Example code will follow.)
(Figure 5) which causes the switch to turn green. That will Because your PCs clock is almost certainly synced
give MakerPlot control of the link. To give the link back to with an Internet Time Service (or could be), you now have
the Arduino later for another program download, simply an excellent real time capable data acquisition and control
click the CONNECT switch again. MakerPlot will give up system at your fingertips!
control of the link and the switch color will turn red. As a test, I set the software to sync the Arduino clock
If you do forget and leave the link connected to to the PC/MakerPlot clock once per hour and logged the
MakerPlot while simultaneously attempting to download a resulting hourly drift data for an 11 hour period
new program to the Arduino, no harm will be done. (SYNC_TIME_INTERVAL = 60). This setting was sufficient to
However, the download will fail and the Arduino IDE will keep the hourly interval drift errors to one second or less
protest. (I have done this by mistake more times than I can over the entire period.
count!) Many specific examples of coding for
Arduino/MakerPlot data transfer in both directions will be First Use
described later in this article.
Any data acquisition system needs to know real world Lets take one trip through a first use scenario. Then,
time. The Arduino has no built-in facility for this. You we will look at software detail.
could add an additional RTC module based on (for
example) a DS1307 chip to the system, but you dont 1. Install the Arduino Time library, and compile and
download the .ino file to the
microcontroller using the Arduino IDE.
2. Assuming you have already installed
MakerPlot on your PC, double-click the
MakerPlot sim.spm file as furnished in the
downloads at the article link. That should
open the user interface for the project on
your PC. (The location of the sim.spm file is
not important. Just put it in an appropriate
place in your Arduino projects folder after
expanding the ZIP file.)
3. For this first test, use the X axis
controls to set the X axis for a 60 sec total
span. (Normally for a 10 hour plot, this
would be set for 600 min.) Also, click the
Stop Max button which will freeze the
FIGURE 6. Use the Library Manager to install a copy of the Arduino Time plot when it reaches the right margin.
library on your PC. 4. Click the red CONNECT rocker
44 August 2017
Fisher - Solar Intensity Monitor - Aug 17_Blank Rough NV.qxd 7/4/2017 6:40 PM Page 45
Serial.println(). Other previous substrings will use // service the plot grid and meter
float v1 = (5.0 * analogRead(A0))/1024;
Serial.print(). See the example shown under Plot Grid. Serial.println(v1);
Example of an Arduino command sent to MakerPlot: // Bare numeric values like this go directly
// to the plot
(e.g., Reset Plot, Label Y Axis, Stop Plotting). These // Update the meter
commands are prefixed with a !. A complete listing of Serial.print(F(!POBJ voltMeter.value = ));
MakerPlot commands can be found in the MakerPlot User Serial.println(v1);
Guide (Section 15: Control instruction Summary; see
Resources) Examples are: Note the use of print() vs. println() in the last line
above. Very important!
Serial.println(F(!SPAN 0, 5.0)); Another example of MakerPlot object update coding
Serial.println(F(!PLOT OFF));
Serial.println(F(!YLBL VOLTAGE)); is the fragment below where the red IDLE status text
display (Figure 8) is updated to instead show a blue
Example of Arduino sending an update to a COUNTDOWN system state indication.
MakerPlot Control object: For instance, updating a meter Only four properties are available in this text object
to move its pointer from its current position to 74 on the for updating by the Arduino, and we will use three of
meter scale, or to display a switch in the ON rather than them:
OFF position. The meter shown in Figure 7 is typical. In
this case, the object name voltmeter was manually Serial.println(F(!POBJ sStatus.Back Color =
9)); // Blue
assigned, but if the developer chooses not to assign one, Serial.println(F(!POBJ sStatus.Text Color =
MakerPlot will assign its own unique identifier. 15)); // White
Serial.println(F(!POBJ sStatus.Text =
The four numeric coordinates (Left, Top, Width, and
COUNTDOWN));
Height) can be manually changed, but it is more likely you
will use your mouse to move and resize the object. Select This is very similar to the voltmeter example above. A
46 August 2017
Fisher - Solar Intensity Monitor - Aug 17_Blank Rough NV.qxd 7/4/2017 6:40 PM Page 47
little simpler perhaps since no variable like voltage in the library clock. Most of the time, if you want current-instant
previous example is involved. It is all static data! data, you should instead use the library hour(), minute(),
Plot Grid: The second statement in the previous second(), etc., functions to get the desired data relying on
voltmeter fragment updates the plot grid. Up to 10 points sufficiently frequent PC/Arduino sync activity to ensure
can be plotted simultaneously. If you wanted to plot four that this locally-maintained software clock time data is
points, for example, the statement would be expanded to accurate.
something like this: For example, refreshing the Arduino Time as displayed
on the MakerPlot user interface display is as simple as
Serial.print(v1); Serial.print(,); executing the following code fragment on every pass
// building comma separated string
Serial.print(v2); Serial.print(,); through the loop() code in your Arduino sketch:
Serial.print(v3); Serial.print(,);
Serial.println(v4); // Update MakerPlot display of Arduino time and
// println on ONLY the last one! date
void updateMPlotTime() {
For illustrative purposes and assigning arbitrary char aTime[25];
sprintf(aTime, %02d/%02d/%4d
example values for v1 through v4, the carriage-return- %02d:%02d:%02d,
terminated ASCII string MakerPlot would accept and plot month(), day(), year(), hour(),
minute(), second());
would look something like: Serial.print(F(!pobj aTime.text = ));
Serial.println(aTime);
1.37,2.5,3.00,0.54CR }
Receiving data from MakerPlot: We have looked at Syncing the library software clock: The following
example code for sending commands (e.g., !PLOT ON) to function is called initially by setup() to initialize the
MakerPlot and also for sending updates to a MakerPlot software clock and later by loop() every
object (!POBJ sStatus.Text = COUNTDOWN). SYNC_TIME_INTERVAL minutes to re-synchronize it:
What about the Arduino getting data from MakerPlot?
How would you get the current date and time from // Synchronize the Arduino Time Library software
// clock with the PC clock via the MakerPlot
MakerPlot? (Im sure by now you have guessed that a // comm link. First get current date & time data
bunch of Serial.print() and Serial.println() statements are // from the PC via MakerPlot.
flushBuffer();
involved!) Serial.println(!Send [(DATE),Trim] );
MakerPlot always has the current date and time String dateStr = Serial.readString();
available (as determined by the PCs clock) in its DATE int yr = dateStr.substring(6,8).toInt();
int mo = dateStr.substring(0,2).toInt();
and RTIME variables. So, int day = dateStr.substring(3,5).toInt();
you would ask it to send flushBuffer();
Serial.println(!Send [(RTIME),Trim] );
the current values (already String timeStr = Serial.readString();
formatted as mm/dd/yy int hr = timeStr.substring(0,2).toInt();
and hh:mm:ss strings) int min = timeStr.substring(3,5).toInt();
int sec = timeStr.substring(6,8).toInt();
back using the MakerPlot
!SEND or !READ // Set the Arduino s/w clock == PC clock
FIGURE 9. Temporary test of
Arduino current date and time commands as shown in setTime(hr, min, sec, day, mo, yr);
display in two unused spare the following code
user interface text boxes. fragment. As you can see, we first ask MakerPlot to send the
Also shown is how PCs current date string (mm/dd/yy), parse it for month,
you might then use those results to update text field day, and year, converting from ASCII to integer at the
objects on your user display (Figure 9): same time. Then, we do the same for the time (hh:mm:ss)
string. Finally, we call the Time library setTime() function to
Serial.println(!Send [(DATE),Trim] ); actually set (or update) the software clock.
String dField = Serial.readString();
Serial.println(!Send [(RTIME),Trim] ); Persistent Offered Start Time: I wanted to make it as
String tField = Serial.readString(); easy as possible to arm the system for countdown to the
Serial.print(!POBJ dField.text = );
Serial.println(dField.c_str()); next plot start time. You can enter any future date and
Serial.print(!POBJ tField.text = ); time you like. However, tomorrows date with the start-
Serial.println(tField.c_str()); time equal to the previous start-time entered is offered as
the default subject to your edits.
Note, however, that you will only infrequently request Make your desired changes to the date and time first,
time related data from the PC via MakerPlot; for example, then click the blue Start as per below... button.
when you are originally setting or later syncing the Time The Arduino startup() function increments todays date
August 2017 47
Fisher - Solar Intensity Monitor - Aug 17_Blank Rough NV.qxd 7/4/2017 6:40 PM Page 48
6. Save your work! If you make any additions or MakerPlot is described by the manufacturer as a Data
changes to your user interface (.spm file) that you want to Acquisition and Graphical Plotting Software Package for
Microcontrollers. A free 306 page user guide and a free 30
keep, YOU MUST EXPRESSLY SAVE your work before day trial installation is available, as well as a discount for
closing MakerPlot. Nuts & Volts readers who decide to purchase MakerPlot at
You will NOT be prompted to do so when you click http://store.nutsvolts.com/books/sku17212.
the red x at the upper
right to close Nuts & Volts published a 10-part series of articles on
MakerPlot between October 2013 and July 2014
MakerPlot. (You might (MakerPlot The DIY Software Kit, by John Gavlik and
find that a little Martin Hebel). If you have a Preferred Subscriber Network
shocking, but you will subscription to Nuts & Volts, you already have digital
probably decide as I access to these archived issues. Or, you can purchase
did after getting used individual back issues at the Nuts & Volts web store at
www.nutsvolts.com.
to MakerPlot, that this
makes sense in normal More information on Arduino SRAM and use of the F-
.spm file use.) Macro can be found at:
To save the http://playground.arduino.cc/Learning/Memory.
changes in this special
The solar cell used in this project was part of a small
screen development solar USB charger kit available from KipKay Kits. However,
situation, follow these there is no need to purchase the entire kit just for the tiny
steps: solar cell included in it. Any small solar cell should work;
A. Open the perhaps with the addition of a small two-resistor voltage
divider if the cells rated output is greater than the 5V max
Macro Builder by of an Arduino analog input. The 4.2 volt cell (PN 228030)
clicking the last toolbar available from Jameco Electronics should work fine
button on the right (www.jameco.com).
(wrench symbol).
B. Some of your I try to leave them in place across the bottom, and
changes at this point use the right side for my specific control objects. Shrink
exist only in memory. the plot grid to make more space if necessary using the
You must also click the Object Editor Plot Percent configuration fields mentioned
FIGURE 12. Save a copy of your
recent user interface display wrench symbol at the earlier.
changes with the Macro Builder top of this Macro
control panel. Builder window to Log(Debug/Immediate) Window: Unfortunately, you
rebuild the macro still have to write special debug code yourself when
prior to saving it. needed, but MakerPlots separate Log/Debug window is
C. Now, click the DOWN ARROW button and very helpful to watch debug variables as the program runs,
complete SAVE AS to your hard drive (Figure 12). helping you track down inevitable bugs.
D. In the future, double-click this new .spm file to start You already saw one way previously to use this
MakerPlot. You will find all of your previously made window in the immediate mode (Step #5b above) to
changes in place when it opens. simulate commands from the Arduino code and see if
7. At some point, you will want to delete some of the MakerPlot reacts as you expect. In that scenario, whatever
original control objects from the starter example screen to you type is immediately acted on by MakerPlot.
make room for new ones of your own choice. I have The second use is more like as a log file. You can add
found that most of the groups of controls across the Arduino code to display status messages or variable values
bottom of the mp_alarming_meters.spm interface display of your own choosing in the debug window. Example
are quite useful. statements are:
August 2017 49
Fisher - Solar Intensity Monitor - Aug 17_Blank Rough NV.qxd 7/4/2017 6:40 PM Page 50
PROJECT BOX,
3.7V 1800MAH LI-ION
4" X 3" X 1.6"
RECHARGEABLE BATTERY Black ABS plastic.
PKCELL# LP103450. Interlocking lid secured
3.7Vdc 1800mAh Lithium- with self-tapping screws.
$ 00
ion rechargeable battery.
1.9" x 1.3" x 0.4". 2" leads.
Interior slots for pc boards.
Includes hardware.
3 each
Charging protection circuit. CAT# MB-173 10 for $2.75 ea.
Note: Ground Shipping Only.
CAT# LBAT-1801
$ 95
10 for $5.50 each 5 each
100 AMP BRASS BUSS BAR
Bocatech Inc BTMH-15B
100 Amp, 48 Vdc / 300 Vac FIGURE 13. The Log (Debug/Immediate)
35MM PIEZO ELEMENT 2 feed terminals window is helpful in development
2" pigtail leads. 10 distribution terminals activity. Use it to display debug
Solid brass on insulated base $ 95 variables or to test proposed Arduino
CAT# PE-63
5-3/4" x 1-1/4" x 1-1/16" 6 each command formats to MakerPlot.
2 for $ 00
1 100 for 40 each CAT# BR-100 10 for $6.50 ea.
50 August 2017
BY LOU FRENZEL W5LEF OPEN COMMUNICATION
30 to 50 meters is possible. SIGFOX sells the hardware Category 0 and 1 are available to address the needs of IoT.
technology and sets up networks to operate and maintain. One of the new LTE versions is called LTE-M. Instead
Ingneu. Ingenu does not use the lower frequencies of using a full 10 or 20 MHz LTE band, it only occupies 1.4
as do the other long range standards. It uses the popular MHz. This greatly simplifies the radio, yet it can achieve a
2.4 GHz band. It gets its long range capability by using its data rate of up to 1 Mbps and uses very low power. It uses
own special modulation technique called Random Phase the standard LTE network for communications.
Multiple Access (RPMA) that is a form of direct sequence Figure 2 shows an LTE-M radio module for embedding
spread spectrum (DSSS) with differential BPSK. It also relies in IoT or M2M products. It is ubloxs SARA-R410M LTE
on low data rates, special coding techniques, and highly Cat M1 module. It operates in any one of four LTE cellular
sensitive receivers to achieve wide area coverage. Ingenu bands.
also builds and operates their own networks. A second version is called NB-IoT. This standard uses a
Weightless. Weightless is a group of long range narrow band (NB) of only 180 kHz and even lower power.
wireless technologies specifically targeting IoT and Data rates to 250 kbps can be achieved. Both LTE-M and
M2M applications. It is an open family of specifications NB-IoT use OFDM but with more limited modulation
with different capabilities fitting a variety of use cases. choices to keep power consumption low.
Weightless N, for example, is a simplex (one way) standard Both of these new LTE versions fit a wide range of
for sensor monitoring. It uses the less than 1 Gbps ISM uses. Radio module prices are reasonable so can be readily
bands for long range using differential BPSK. With low incorporated into other products or systems. Just keep in
speeds, it can achieve a range of up to 5 km. mind that you do need to pay for access to the cellular
Weightless P is the two-way standard. It uses low data network with a service contract.
rates of 200 bps to 100 kbps, and GMSK or offset QPSK Watch for increased use of these technologies as the
modulation to reach out about 2 km. An interesting version field of IoT grows. Even newer standards are likely to show
is Weightless W that uses the TV white space spectrum; up. NV
unused 6 MHz TV channels in the 470 to 790 MHz range.
With wide channels, data rates up to 10 Mbps are possible
at a range up to 5 km thanks to the low frequencies. All the
Weightless standards are available royalty free.
Wi-Fi. Standard Wi-Fi like 802.11n/ac or other current
versions are not really long range technologies. Their Innovative Holding Solutions
advantage or benefit is very high speeds with multiple
users. However, some special versions of Wi-Fi have been
created for long range work. These are the IEEE 802.11f
and 802.11h standards. The 802.11h version is referred to
as HaLow. It uses the 902-928 MHz ISM band. Modulation
is OFDM with BPSK, QPSK, or QAM to achieve data rates
up to 1 Mbps. Range can extend to a kilometer or more
even with low power.
The 802.11f version (like Weightless W) uses the
TV white space frequencies. Known as White-Fi, this
standard can produce data rates of up to 24 Mbps in a 6
MHz channel. Range can be up to 10 miles if the lower
frequency TV bands are used. These new standards are not
widely utilized yet, but are expected to be more attractive
alternatives as the Wi-Fi Alliance gets certification programs
in place.
Cellular. Perhaps an unexpected technology for IoT
projects is the current fourth generation (4G) cell phone
standard called Long Term Evolution (LTE). It is generally
considered to be too complex and expensive for simple
sensor monitoring and like applications. On the other
hand, IoTs close relative M2M technology has used older
2G and 3G cellular networks for low speed applications,
and especially for its relatively long range (several
kilometers) capability. Now, new LTE versions designated
August 2017 53
B4R
B4R aimed at Arduino program development is a
cousin to B4A (formerly called Basic for Android). B4R is
also related to B4J, a Java based RAD (Rapid Application
Development) program development environment. You
pay for a B4A license. B4R and B4J are free. B4R uses the
resources provided by the Arduino family of libraries. B4R
also provides native support for the ESP8266 and can be
used to develop firmware for many Arduino boards. The
ESP8266 support is why we are here.
B4R Setup
The Arduino IDE (integrated development
environment) must be installed before you can use B4R.
PHOTO 1. The WeMos D1 Mini is based on the
Youll need to install the latest and greatest Arduino IDE. ESP8266. Everything we need to program and use the
The next step is to install B4R and configure the paths. ESP8266 are on the WeMos D1 Mini PCB.
This is done within B4R and simply sets the directory path
to the Arduino IDE. You can also optionally specify
directories for additional libraries.
Once you have your Arduino paths laid out, the next
step is to load some target hardware support information
into the Arduino settings as you can see in Screenshot 1.
Adding the Additional Boards Manager URL enables
support for our target hardware, which happens to be the
WeMos D1 Mini smiling in Photo 1.
We can now dive back into the B4R IDE and
introduce our new WeMos D1 Mini to the B4R IDE. We
have done just that in Screenshot 2. The B4R IDE sensed
the WeMos D1 Mini via the COM port connection
between it and the Mini. At this point, we can use the
B4R IDE to produce ESP8266 firmware and load it into
the WeMos Mini using a simple USB connection.
SCREENSHOT 1. Performing this
operation adds support for our target
hardware.
The WeMos D1 Mini
The WeMos D1 Mini circuitry is not at all
54 August 2017
Eady - Design Cycle - Aug 17_Design Cycle - Sep 15.qxd 7/4/2017 6:43 PM Page 55
August 2017 55
Eady - Design Cycle - Aug 17_Design Cycle - Sep 15.qxd 7/4/2017 6:43 PM Page 56
initialize variables and objects at the beginning of the Private Sub Timer1_Tick
Dim currentState As Boolean =
application. In this case, well do our initializations in the d4.DigitalRead
AppStart subroutine: Log(CurrentState: , currentState)
Dim NewState As Boolean =
Private Sub AppStart Not(currentState)
Serial1.Initialize(115200) Log(NewState: , NewState)
Log(AppStart) d4.DigitalWrite(NewState)
pin2.Initialize(2, pin2.MODE_OUTPUT) End Sub
Timer1.Initialize(Timer1_Tick, 1000)
1000mS = 1 second
Timer1.Enabled = True Both sets of code end up at the same destination.
End Sub They both blink the Minis LED. The really cool thing is
that no special programming hardware is required. A
This looks a lot like Arduino. However, the Log simple USB connection between B4R and the WeMos D1
statement is B4R and prints the argument in the B4R Log Mini is all we need.
window. The Timer1 statements are also B4R. Weve
directed the Timer1 object to roll over every 1,000 ms. At B4R Wi-Fi
each Timer1 roll-over, the Timer1_Tick subroutine is called:
Lets blend in the rESP8266WiFi B4R library and
Private Sub Timer1_Tick program the Mini to join the EDTP lab network. Like all
Dim currentState As Boolean =
pin2.DigitalRead B4R programs, we begin by populating the
Log(CurrentState: , currentState) Process_Globals subroutine:
Dim NewState As Boolean =
Not(currentState)
Log(NewState: , NewState) Sub Process_Globals
pin2.DigitalWrite(NewState) Public Serial1 As Serial
End Sub Private server As WiFiServerSocket
Private d1 As D1Pins
Private espWifi As ESP8266WiFi
All of the LED blinking action occurs within the Private astream As AsyncStreams
Timer1_Tick subroutine. The current state of the D4 Private timer1 As Timer
output pin is read and logged. Then, the current state is Private inputPin As Pin
Private ser As B4RSerializator
inverted, logged, and written to the D1 Minis D4 output End Sub
pin. As a result, the Minis LED blinks at a one second
interval. The Serial object is the same one we used to blink the
Lets write our LED blinker code with a bit more of Minis LED. Its primary purpose is to bridge the WeMos
B4R seasoning: Mini and the B4R IDE. The WiFiServerSocket is a member
of the rESP8266WiFi library as is ESP8266WiFi. As you
Sub Process_Globals would imagine, all of the Wi-Fi and networking stuff lies
These global variables will be declared
once when the application starts. within the rESP8266WiFi library.
Public variables can be accessed from AsyncStreams is a component of the
all modules.
Public Serial1 As Serial rRandomAccessFile library. AsyncStreams is the conduit in
Private Timer1 As Timer which we can send and receive data using pipes or
Private d4 As Pin streams without blocking the application flow.
Private d1Pins As D1Pins
End Sub B4RSerializator is part of B4R and its job is to convert
bytes to objects for transmission and convert the objects
back to bytes at the receiving end. These converted data
In this version, we have included the rESP8266 library streams are logically transported by AsyncStreams.
and can call upon the definitions laid down in D1Pins. The inclusion of D1Pins tells us that the rESP8266
Only a single line changes in the B4R-flavored AppStart library is also part of this solution. At this point, its time to
subroutine: craft the code that will make up the AppStart subroutine:
Private Sub AppStart Private Sub AppStart
Serial1.Initialize(115200) Serial1.Initialize(115200)
Log(AppStart) Log(AppStart)
d4.Initialize(d1Pins.D4,d4.MODE_OUTPUT) If espWifi.Connect2(edtp,password)
Timer1.Initialize(Timer1_Tick, 1000) Then
1000mS = 1 second server.Initialize(51042,
Timer1.Enabled = True server_NewConnection)
End Sub server.Listen
Log(Waiting for connection.)
The changes in the Timer1_Tick subroutine are small as Log(My ip: , espWifi.LocalIp)
Else
well:
August 2017 57
Eady - Design Cycle - Aug 17_Design Cycle - Sep 15.qxd 7/4/2017 6:43 PM Page 58
Sub astream_NewData (Buffer() As Byte) Nothing new here. The Android code will be using
Dim be(10) As Object
used as a storage buffer. AsyncStreams and B4RSerializator for compatibility with
Dim objects() As Object = the D1 Mini code. We will need to initialize the Timer
ser.ConvertBytesToArray(Buffer, be)
Log(Received:) object we call watchdog and the B4RSerializator:
For Each o As Object In objects
Log(o) Sub Service_Create
Next watchdog.Initialize(watchdog, 1000)
End Sub ser.Initialize
End Sub
58 August 2017
Eady - Design Cycle - Aug 17_Design Cycle - Sep 15.qxd 7/4/2017 6:43 PM Page 59
Private Sub Watchdog_Tick Input and output AsyncStreams pipes are constructed
If DateTime.Now - lastValueTime > 10 *
DateTime.TicksPerSecond Then for the new connection (socket.InputStream,
Log(Watchdog closing socket.OutputStream) and astream subroutines are defined
connection.)
If astream.IsInitialized Then (astream). The Android GUI is updated by calling the
astream.Close Main Activitys StateChanged subroutine and the
Astream_Error watchdog timer is enabled.
End If
End Sub When data is received from the D1 Mini server, the
Astream_NewData subroutine is called:
Private Sub Astream_Error
Log(Disconnected) Private Sub Astream_NewData (Buffer() As Byte)
connected = False CallSub2(Main, NewValue,
CallSub(Main, StateChanged) ser.ConvertBytesToArray(Buffer))
watchdog.Enabled = False lastValueTime = DateTime.Now
End Sub astream.Write(ser.ConvertArrayToBytes
(Array(Android Time,
Before we let the dog out, we must establish a DateTime.Time(DateTime.Now))))
connection between the Android client and the D1 Mini End Sub
server. This is done by touching the connect button on the
Android GUI, which kicks off the Connect subroutine: The incoming data from the D1 Mini server is
converted from bytes to an array of objects using
Public Sub Connect(ip As String) B4RSerializator and is logged using the Main Activitys
If astream.IsInitialized Then
astream.Close NewValue subroutine:
End If
socket.Initialize(socket) Public Sub NewValue(data() As Object)
socket.Connect(ip, 51042, 30000) If data.Length = 0 Then Return
End Sub For Each o As Object In data
Log(o)
Next
The Connect subroutine code is self-documenting and End Sub
takes advantage of the socket objects resources (Initialize
and Connect). After the watchdog timers lastValueTime variable is
It is assumed that the user knows the WeMos Minis updated, the Android phone client sends the current time
IP address (ip). An attempt to connect to the D1 Mini back to the Mini server as a byte stream using
server will time out in 30 seconds. AsyncStreams and B4RSerializator.
Once the Android phone client connects with the As we already know, the Mini server receives the data
Mini server, the Starter Modules Socket_Connected from the Android phone as a byte stream and uses
subroutine is called: B4RSerializator to convert the incoming data to an array of
objects.
Private Sub Socket_Connected (Successful As
Boolean)
If Successful Then
connected = True
B4R and Your Design Cycle
astream.Initialize(socket.Input
B4R does more than enable
Stream, socket.OutputStream,
astream) ESP8266 modules. Take a look
B4R
CallSub(Main, StateChanged) at the documentation index on B4J
watchdog.Enabled = True
the B4x website and youll B4A
lastValueTime = DateTime.Now
End If discover that B4R supports Anywhere
End Sub
multiple products offered by Software
Adafruit and Seeed Studio. www.b4x.com
The Starter Modules connected variable is an If its Arduino that rows
argument in the Main Activitys StateChanged subroutine your boat, then youll need to WeMos D1 Mini
and is used to change the Connected/Disconnected text add B4R to your Design Cycle. Amazon
on the Android GUI: NV www.amazon.com
August 2017 59
NV Webstore - Aug 17 working_NV Webstore June 2016 working.qxd 7/4/2017 6:50 PM Page 60
60 August 2017
NV Webstore - Aug 17 working_NV Webstore June 2016 working.qxd 7/4/2017 6:50 PM Page 61
August 2017 61
TECHFORUM READER - TO - READER
#2 Simplest is a standard (cheapest I be better off with a modern Fluke the two-way radio field and personally
bimetallic) house thermostat, battery, meter with true RMS reading? prefer analog meters for several
and a simple DC bell. You dont have reasons; the first is that it is easier to
to drill holes or screw anything up, #1 The question is not average vs. detect a peak or a null with a needle
and the wire can be taken through RMS. When dealing with tuning, the on a meter than it is trying to read
a window into the house. Im sure question is the measuring of peaks changing numbers on a digital display.
you could also rig up something like and deeps. You cant measure peaks In fact, I have never seen a grid dip
an Arduino with HATs and Bluetooth and deeps with a digital voltmeter. To oscillator with a digital display.
or Wi-Fi with phone messaging, but do it, you need an analog device. The second reason is that while
unless you want to do extensive About 50 years ago, Fluke came working on a circuit board and
datalogging, I cant see the point. out with a nice digital multimeter that looking for voltages, I can glance up
However, thats often beside the couldnt be used for tuning. After at an analog meter and watch the
point in hobbyist systems. some time, Fluke added an analog needle move, and with the proper
Sally Jelfs bar graph that helps a lot for tuning range set, I have a good idea what
Brackley/Northants purposes. the voltage is with just a glance. With
Try to look for the Fluke Series some analog meters such as the B&K
[#5171 - May 2017] 170 and you will find what you need. 290 electronic VTVM that I use on
Looking For HV Field Analyzer By the way, tuning is mainly done in the bench, there is a scale on the
I am building a mid-size Tesla RF equipment and not in audio. bottom with zero centered mid-span
coil. I want to study the frequencies Avnerdee which allows me to see if a voltage/
produced and map the EM field Tel-Aviv, Israel current varies from what I have set as
potentials produced. Considering the the standard I am using, which allows
voltages and frequencies involved, #2 There are many differences me to set voltage/current to that
typical RF measuring gear will not between DMMs and VOMs. The two standard.
work. Does anyone have suggestions which might justify the old timers' While I am an analog guy, there
or links to help me build the device I advice are that VOMs have lower are times when I use a digital meter.
need to do my experments? input impedance than the typical When setting VCO voltages, you
DMM and the dial display of a VOM need a digital meter to accurately
For voltage, use a bunch of NE2 display is easier to interpret for noisy set the voltages. Another use where
neon bulbs wired in series on a long or changing amplitude signals than digital is better (in my opinion)
wood stick. Each lamp lit stands for a digital display. The higher input is reading the values of resistors
about 100 volts. For frequency, the impedance of a DMM may make and capacitors. A DMM has the
coil probably operates at or below the readings from old documentation advantage of reading capacitors,
broadcast band. If you cant hear it on based on using a VOM slightly which analog cant do. Although, it
a standard AM radio, buy or borrow inaccurate. can be a pain to read resistors on an
a set with the long-wave band. None Neither of these characteristics analog meter due to the logarithmic
of this is lab quality, but I assume you really justifies spending lots more scale and crowding at the high end of
want cheap and easy. money. Many DMMs include a bar the scale, it does excel at testing pots
Chip Veres graph display which emulates a dial, to see if the operation is smooth by
Miami, FL mooting this difference. watching the needle.
Finally, analog meters from lesser On my bench, I have the B&K
[#5173 - May 2017] makers are still available in economy 290 analog electronic VTVM, a NLS
DMM vs. AVOM markets and auction sites. If you do TT-21 digital meter, and (for field
I do mainly audio work and have find those two differences compelling, work) a Triplett model 60 VOM. What
been told by a few old timers that you can satisfy that need at costs works for me may not necessarily
analog VOMs are the only way to go comparable to most DMMs. work for you. Its based on what you
for testing and tuning gear. Problem Warren Wilderson prefer and what your requirements
is, I can get a new DMM for $20 Eagle Point, OR are. Try borrowing a digital and
on Amazon vs. an ancient Triplet or analog meter and see what works
Simpson analog VOM on eBay for up #3 The use of analog versus digital best.
to ten times that. Is it worth it? Would to me is a personal choice. I work in If you do go the analog route, go
August 2017 63
for a meter that has 20K ohms/volts time, then going back and reviewing metering system calibrated in dB is
or better; the higher the ohms/volts it can be very helpful in tracking indispensable.
the better as it will not load down a down certain problems that cant be Jim Lacenski
circuit under test as a lower range seen using other tools. Bellevue, WA
would. Andrew Ayers
Craig Kielhofer Glendale, AZ #6 Audio work can require the
Plaineld, IL measurement of voltages down to
#5 As an audio engineer, I find the millivolt range. It can also require
#4 New analog VOMs are certainly that an AC millivolt meter calibrated measurement of varying signals such
available, but quality is likely nowhere in decibels is essential for audio as voice and music. To best measure
near what used to be standard. What engineering and repair; for example, these, use an AC VTVM.
the cheap DMMs wont show you to validate the dB attenuation of a This is an electronic device with
are fast transient signals; they will Linkwitz-Riley crossover network, or a large analog meter driven by an
either average out the spurious signal to gauge flatness of a preamp. My electron tube. They usually have
(you wont see it), or they will just '80s vintage Leader LMV-187 is what I a high input impedance and wide
completely miss it due to a slower use for this work. frequency range often into the 100
sampling rate. That said, it is easy to build much kHz range. Their input voltage range
A high quality Fluke DMM can cheaper and available alternatives. is usually from one millivolt full scale
be a good choice, but there isnt any Dual channel VU meter driver boards to 300 volts full scale. The meter has
reason not to have an analog meter and decent VU meters calibrated in scales in both volts and dB with dB
on your bench if you can find a good dB are available on eBay. Front-end making it easy to measure amplifier
one (tested, calibrated, and known to one of these boards with the Low gain.
work well), along with a Fluke. cost PC Two Channel Oscilloscope Want to know what the output
Sometimes, the slight tremble circuit of the August 2016 N&V, and voltage of a microphone will be for a
(noise or hum over the signal) of an one has a decent AC metering system particular sound? Put the microphone
analog movement can be seen better for audio engineering. Be sure to AC at the desired location in relation to
by a human than a DMM can update. couple the input to the circuit; for the sound and hook it directly to an
For most things, though, you could example, with 2.2 F non-polarized AC VTVM. Then, just watch the meter
use the Fluke. electrolytic capacitors. scale. (A digital meter will just wildly
Another option to consider I use my DMMs for checking blink random numbers.)
would be a digital o-scope; being able power supply voltages, etc. For Mark Peterson
to sample a signal over a period of audio signal level work, an analog Plymouth, MN
64 August 2017
ELECTRONET
For the ElectroNet online, go to
www.nutsvolts.com and click Electro-Net USB
USB-FIFO USB-UART
Add USB to your next project--
It's easier than you might think!
USB/Microcontroller Boards
RFID Readers Design/Manufacturing Services Available
Absolutely NO driver software development required!
CLASSIFIEDS www.dlpdesign.com
LIGHTING HARDWARE
WANTED
DEC and VME
Equipment WANTED!
Digital Equipment Corp
and
Motorola VME Systems
and Parts
Wanna read even more about electronics?
Buy - Sell - Trade Check out our book selection at
Subscribe today! CALL KEYWAYS 937-847-2300
or email buyer@keyways.com
store.nutsvolts.com
ADvertiser INDEX
L O O K F O R S E A R C H F O R F I N D Find your favorite advertisers here! Accutrace ..............................67
G PO SSIBILI TIE
BI S
UP TO 67 LB THRUST
UP TO 200 MM STROKE
AVAILABLE AS LINEAR
ACTUATORS AND AS
LINEAR SERVOS
PRICES $
STARTING AT
7999
duct
Pro !
Info
AVAILABLE AT SERVOCITY.COM
sales@servocity.com 620-221-0123
Integrated HW and SW
WebDAQ 316
16 Thermocouple 75 S/s Max 24-Bit 4
Temperature Logger
WebDAQ 504
4 IEPE 51 kS/s/Ch Max 24-Bit 4
Vibration/Acoustic Logger
MCCDAQ.COM/WebDAQ
Contact us
1.800.234.4232
2017 Measurement Computing Corporation, 10 Commerce Way, Nor ton, M A 02766 info @mccdaq.com