[ale] semi OT: interface

Alex Carver agcarver+ale at acarver.net
Thu May 26 15:08:41 EDT 2016


On 2016-05-26 04:44, Byron Jeff wrote:
> On Wed, May 25, 2016 at 06:47:40PM -0700, Alex Carver wrote:
>> Arduino would work for this application especially if the "smarts" for
>> scheduling are put elsewhere (e.g. a larger server that runs cron jobs,
>> websites, etc.)
> 
> I'm in the process of standardizing my embedded project architecture around
> Raspberry Pi Zeros. The combination of the $5 price point per board along
> with the standard Linux software platform facilitates using them as
> wireless endpoints without additional devices. Honestly, the total cost is
> still a bit steep:
> 
> $5 RPi Zero
> $2.50 USB wireless dongle (I bought a dozen for $30)
> $2 USB OTG cable or adapter
> $3.50 8GB microSD
> 
> gets you to about a $13 price point. I figure that cell phone chargers are
> so available as to be thrown in for free.
> 

That's the same cost as the ESP although you do get the much more
functional processor.  However, for microendpoints I'm just a fan of an
embedded controller.  I don't have to worry about corrupting my OS
because the power blinks.  I treat Arduinos, the ESP, or anything else
like I would an EPROM.  Burn it and done.

>>
>> RPi would also work but the GPIO aren't as tolerant as the Arduino
>> unless you get a hat for the RPi.
> 
> Unless it's high speed work, using optoisolators can solve a lot of those
> issues. Also RPi GPIOs drive bipolar transistors with no problems. For
> driving AC, a optoisolated TRIAC such as a MOT3021/3041 driving a larger
> TRIAC should work with no problem. 

That's implied by the use of a proper hat but it really should be
optoisolated completely because feedback is a source of some very odd
glitches on Pis.  Most isolators can go fast enough to run the i2c bus
with no difficulty.  The hats with high voltage leave high voltage in
physical proximity to the Pi although you could always separate the hat
and Pi with a cable.  However, I'm back with the EPROM idea here.  If it
glitches, a power cycle will probably bring it back in a few seconds.
Rebooting the Pi Zero means possibly having to deal with fsck at boot
and that may mean a console ("Enter root password for maintenance mode")

> 
> What I like about the RPi Zero setup is the fact that by connecting a USB
> hub and HDMI, it quickly scales up to a moderate speed Linux workstation
> that can be used for development/configuration. Once configured, the zero
> can be placed at the project site and then is accessible via ssh or web for
> continued development/monitoring.
> 
> I started down the ESP8266 path, planning on using NodeMCU and Lua for
> endpoints. But I got bogged down learning yet another framework for
> configuration and development.

NodeMCU and Lua on the ESP is a bit bloated.  You can use the Arduino
IDE to slim down the burn image or you can go all the way down to C/C++
and burn direct.  I decided to try the Arduino IDE since I hadn't used
it before.  It wasn't too bad and certainly easier than trying to come
up to speed with Lua.




More information about the Ale mailing list