[lug] Ethernet Enabled PLC/Linux Microcontroller
dan at usrsbin.com
Sun Aug 2 21:03:28 MDT 2009
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.
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
> 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.)
> 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.
>> 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
>> 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.
>> Etc etc... the possibilities are endless. But Linux on the chip
>> certainly sounds like SERIOUS overkill when a single chip can do the
>> Nate Duehr
>> nate at natetech.com
>> 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
> 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
More information about the LUG