[lug] Fwd: Ethernet Enabled PLC/Linux Microcontroller
Jeffrey Haemer
jeffrey.haemer at gmail.com
Mon Aug 3 11:04:29 MDT 2009
---------- Forwarded message ----------
From: Geoff Probert <GProbert at azteknetworks.net>
Date: Mon, Aug 3, 2009 at 11:00 AM
Subject: RE: [lug] Ethernet Enabled PLC/Linux Microcontroller
To: Jeffrey Haemer <jeffrey.haemer at gmail.com>
At Sparkfun, take a look at *BOB-00199. Powered from the USB and has a few
GPIO pins.*
---
Geoff Probert
Senior Systems Engineer
Aztek Networks
2477 55th Street, Suite 202
Boulder, CO 80301
303.415.6144
*From:* Jeffrey Haemer [mailto:jeffrey.haemer at gmail.com]
*Sent:* Monday, August 03, 2009 10:00 AM
*To:* hwaz; Terry Norton; Ninh Nguyen
*Subject:* Fwd: [lug] Ethernet Enabled PLC/Linux Microcontroller
Gentlemen,
I wasn't paying much attention to this thread, but it finally occurred to me
that you might have something to contribute.
Sometimes it takes a while for the light bulb over my head to go on.
Probably insufficient voltage.
---------- Forwarded message ----------
From: *Carl Wagner* <carl.wagner at verbalworld.com>
Date: Mon, Aug 3, 2009 at 9:46 AM
Subject: Re: [lug] Ethernet Enabled PLC/Linux Microcontroller
To: "Boulder (Colorado) Linux Users Group -- General Mailing List" <
lug at lug.boulder.co.us>
One other option if you don't want to learn about micro controllers is
to just throw a PC at the problem that has Ethernet and parallel ports.
Just poll the parallel port at whatever interval you would like (or set it
up
for interrupt driven).
You may need to condition the signal coming in but that should be trivial.
Assuming around < 50 VDC
DEVICE ----/\/\/\/------+------- Parallel port
|
V 5 Volt zener diode
--
|
____
__ Ground
.
The resistor value will depend on the input voltage and the current supply
of
the device you are connecting to. But a 1 meg ohm would probably cover it.
Things get a little more complex if the device is putting out less than 5
VDC.
(you would need to add a transistor and use the power supply from the PC to
get 5 VDC)
The nice things are that you could monitor 8 devices (actually more if you
use the control
lines), it can be Linux based, very low cost, and is probably not to far out
of your comfort zone.
DISCLAIMER: I am a CS guy so you EE's out there should pick this apart.
Ideally this should be opto isolated, but that would be hard to do with
ASCII-Schematics!
And old PC's are cheap!
On the other hand, if I had the time, I would order a AVR Olimex board from
SparFun,
use AVR-GCC and have a cool toy, that was rather inexpensive. ( < $40 if
you want to
convert the signal to Serial.)
http://www.sparkfun.com/commerce/product_info.php?products_id=360
$16.95
Don't forget to order the AVR chip $2.88, the Wall Wart $5.95 and the
Parallel
port programmer $12.95 (if you have a parallel port). They also
have USB
programmers but they are more expensive.
Advantages: uses < 1 W of power, no fans, uses a lot less space, is cheaper
than
most other solutions, especially if you let the magic smoke out, and you
could
pick it up today as they are in Boulder.
But you would probably still need to condition the incoming signal.
Sean's solution sounds fun to!
And re-read Nate's email if the voltage > around 30V.
Carl.
Dan Ferris wrote:
You could look into a PIC that runs PIC basic. I worked with a EE that
swore by them and he made some interesting devices.
You are right about high voltage AC. I nearly electrocuted myself on a
device where the ground was isolated during a test and the chassis
became energized at 264 VAC. Talk about pain... Guess that's why there
are isolation transformers and optoisolators.
Dan
Nate Duehr wrote:
p.s. Disclaimer: If you're talking about reading anything that
outputs 120 VAC or uses it as an input, and you're building it
yourself without knowing more than the basics about electronics, such
devices have the ability to KILL someone, and you should find a
professional EE or at the VERY least an EE student before proceeding
-- that or embark on at least a few months of study and find said
people you can ask questions of.
I always forget to mention that... when people show up on mailing
lists asking about "simple" switches or circuits to measure "on and
off"...
Measuring a low DC voltage, you can build things to your heart's
content until you get what you want it to do, correct. Messing around
with 120 VAC from a wall socket, you can come real close to killing
yourself, pretty easily. Start to get into 220 VAC for motor and
other controls, and you'd better be a professional or hire one.
Additionally, if other people are regularly going to come into contact
with these devices, you need to take care to make them as
intrinsically safe as you can. The electronics become a bit more
convoluted from a beginner's point of view, but are all well-known and
well-documented techniques. I've seen some really scary shit (and
yes, I'm not censoring that word, because that is what they were)
built by hobbyists become things that companies used for long periods
of time until a shocked (hopefully not literally) EE walks by and
reaches for the master power kill switch and tells no one to go
ANYWHERE near it until it's been re-designed to be safe.
Just be careful and think... and you'll be fine. But nowadays, I've
run into SO many folks who don't... I figured I'd better follow up
with the disclaimer.
Common sense, isn't so common anymore. I've seen fully licensed
Amateur Radio operators ask if they can transmit RF without an
antenna. Seriously. Unbelievable. "But I bought this radio! Can't
I use it somehow before I buy feedline and an antenna?! Isn't it like
a cell phone?" When you explain that there's an antenna INSIDE the
cell phone, they're usually quite surprised. Then they want to know
why a VHF radio doesn't include the same feature. And these are folks
tested to KNOW that a quarter-wavelength at 144 MHz is roughly 19"
long, and the case of the radio is only 6" deep. Seriously. Really.
It's that bad.
Okay so... all the above said, there's little that's truly "new" in
Electronics. A little study time at any well-stocked public library,
or inter-library loan, and you can learn what's safe and what's not.
Most folks today haven't had the "fun" of working on tube-based
electronics where voltages were into the thousands of volts, even if
low-current, and everyone passed along safety knowledge as part of the
culture. Lots of help "out there" though -- plenty of brilliant EE's
out of work who'd enjoy teaching a bit...
(By the way, my learning of electronics is from almost two decades in
Amateur Radio -- I do NOT consider myself and expert and EVERY design
I create I "run by" some trusted friends with formal training and
knowledge of electronics. Over the years I've learned enough to "get
myself by", but I can't offer much in the way of training... or at
least I think I can't still... don't really want to fry someone to
find out... heh heh.)
Nate
On Aug 1, 2009, at 1:52 AM, Nate Duehr wrote:
On Jul 31, 2009, at 7:27 AM, Swavek Skret wrote:
I need to control a hardware unit that does not have a standard
interface (ethernet, RS-232, etc) but simply provides a binary
voltage to flag that it functions correctly or not. I am considering
using an ethernet enabled microcontroller with Linux OS ideally.
If anyone has related experience and would like to share or
recommend a particular hardware I would appreciate it.
Thanks,
Swavek
Full blown embedded Linux is probably overkill. Any microcontroller
can be made to do simple voltage monitoring and spit out serial
information to a connected PC, phone line via a modem, whatever...
Microchip and Atmel are the most popular for "hobby" projects, and
there's thousands of designs available for commonly used ones on the
Net.
Both have free Assembly and C programming language support, but you do
have to learn a bit about how to program "at the hardware level", so
to speak. A month or two of study will yield a lifetime of cheap,
virtually bullet-proof hardware control solutions.
There are also development kits for both major chipsets that make
programming them a breeze in languages like BASIC and similar. Even
some GNU/GCC projects for both, if you're willing to put up with the
usual crappy open-source documentation and brain-damage.
The forums at Microchip.com or avrfreaks.net are good starting points,
if you already know basic electronics including Ohm's law and how to
solder, both of which are pretty basic -- and there's plenty of "DIY"
ways to learn both on the Net.
There's no need to use an entire OS like Linux, when a few lines of C
code compiled into machine language by a free compiler and dumped into
a chip will do the job. The logic involved is basically 1 for on, 0
for off... something we all know, and the electronics involved in
seeing if a device is "on or off" is not much more difficult than the
circuit for a typical table lamp.
Going all the way to Linux on a chip will be more "fun", but WAY more
expensive both in the short and long term, unless you're only doing
ONE of these. I do suggest hunting the web for microcontroller
circuits to do such a thing.
Other "medium difficulty" options might be to use something like a
PicAXE or Arudino where a hardware engineer has already developed the
board, the layout, defined the chip(s) needed and provided a
rudimentary real-time "OS" FAR better suited than Linux to handling
the little (inexpensive) chipsets.
http://www.rev-ed.co.uk/picaxe/picaxe.htm
http://www.sparkfun.com/commerce/categories.php?c=103
Etc etc... the possibilities are endless. But Linux on the chip
certainly sounds like SERIOUS overkill when a single chip can do the
job...
--
Nate Duehr
nate at natetech.com
http://facebook.com/denverpilot
http://twitter.com/denverpilot
_______________________________________________
Web Page: http://lug.boulder.co.us
Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
Join us on IRC: lug.boulder.co.us port=6667 channel=#hackingsociety
--
Nate Duehr
nate at natetech.com
http://facebook.com/denverpilot
http://twitter.com/denverpilot
_______________________________________________
Web Page: http://lug.boulder.co.us
Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
Join us on IRC: lug.boulder.co.us port=6667 channel=#hackingsociety
_______________________________________________
Web Page: http://lug.boulder.co.us
Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
Join us on IRC: lug.boulder.co.us port=6667 channel=#hackingsociety
_______________________________________________
Web Page: http://lug.boulder.co.us
Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
Join us on IRC: lug.boulder.co.us port=6667 channel=#hackingsociety
--
Jeffrey Haemer <jeffrey.haemer at gmail.com>
720-837-8908 [cell], 303-997-1219 [Google voice], @goyishekop [twitter]
http://seejeffrun.blogspot.com [blog],
http://www.youtube.com/user/goyishekop [vlog]
--
Jeffrey Haemer <jeffrey.haemer at gmail.com>
720-837-8908 [cell], 303-997-1219 [Google voice], @goyishekop [twitter]
http://seejeffrun.blogspot.com [blog],
http://www.youtube.com/user/goyishekop [vlog]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20090803/d5221f62/attachment.html>
More information about the LUG
mailing list