Maker Pro
Maker Pro

Most awful hack job REDUX

R

Rich Grise

What I am really thikning about is somehow making an array of relays
that are controllable from a computer (say, USB or RS-232). So that I
coudl write programs and say things like (in perl)

$relays[5]->close;
$relays[7]->open;

and that would close relay 5 and open relay 7. I do not want to start
talking much about it, because I want to finish my tig DC-Squarewave
AC inverter project.

Iggy, please cheer down. Controlling relays in the fashion you suggest
is almost trivial to one skilled in the art, but you are asking for
a very great leap, specifically from perl to RS-232. There are software
drivers available to do this, and there are abundant websites with the
circuitry that you'd need to implement it, and you could even probably
find hardware drivers that perl could talk to, but there are intermediate
steps. For example, perl can open a socket just like it can open a file.
And, since I haven't heard otherwise, I'm guessing she can open a port,
just like C can. But somebody would have had to have written the driver.

In assembly language, you can output a byte to a port. You can even
do that in some C implementations. But to write directly to ports with
modern operating systems, you have to have a driver that can get
permission from the operating system to own that resource. And you
have to get permission from the operating system to let your resourse
preemptively issue system-level interrupts.

I guess you could boot in single-user mode, albeit it'd cut off your
internet access... ( ;-p )

Good Luck!
Rich
 
R

Rich, Under the Affluence

On Sun, 20 Nov 2005 21:32:03 +0000, Ignoramus28489 wrote:

Just to offer a mellowing of my tirade in my other response here:

The point is, not to quit trying stuff, and exploring, and doing
new stuff - -
But why do the same damn stuff that's been done thousands of times
over before? That's what books and stuff are for

You don't have to discover everything about reality anew - you _can_
use other pepooles' reports of their experiences for references.

Good Lcuck!
Riuch
 
I

Ignoramus14135

What I am really thikning about is somehow making an array of relays
that are controllable from a computer (say, USB or RS-232). So that I
coudl write programs and say things like (in perl)

$relays[5]->close;
$relays[7]->open;

and that would close relay 5 and open relay 7. I do not want to start
talking much about it, because I want to finish my tig DC-Squarewave
AC inverter project.

Iggy, please cheer down. Controlling relays in the fashion you suggest
is almost trivial to one skilled in the art, but you are asking for
a very great leap, specifically from perl to RS-232. There are software
drivers available to do this, and there are abundant websites with the
circuitry that you'd need to implement it, and you could even probably
find hardware drivers that perl could talk to, but there are intermediate
steps. For example, perl can open a socket just like it can open a file.
And, since I haven't heard otherwise, I'm guessing she can open a port,
just like C can. But somebody would have had to have written the driver.

I will talk about linux since I have no interest in microsoft windows.

There are probably drivers in the linux OS that treat RS-232 as a file
descriptor. That is, high level applications could open /dev/serial or
some such (my vague recollections) and then use system calls like
read, write and fcntl to drive the serial port.

So, if I can get some circuit that could talk to RS-232 in its native
form, then writing a linux app that would talk to RS-232, is just an
exercise in programming.

I am not into low level programming and such, however I could do it.

In assembly language, you can output a byte to a port. You can even
do that in some C implementations. But to write directly to ports with
modern operating systems, you have to have a driver that can get
permission from the operating system to own that resource. And you
have to get permission from the operating system to let your resourse
preemptively issue system-level interrupts.

chgrp lusers /dev/serial
chmod 660 /dev/serial

The OS would translate system calls on /dev/serial into byte outputs.

I guess you could boot in single-user mode, albeit it'd cut off your
internet access... ( ;-p )

Sorry, I cannot do without internet access.
 
I

Ignoramus14135

On Sun, 20 Nov 2005 21:32:03 +0000, Ignoramus28489 wrote:

Just to offer a mellowing of my tirade in my other response here:

The point is, not to quit trying stuff, and exploring, and doing
new stuff - -
But why do the same damn stuff that's been done thousands of times
over before? That's what books and stuff are for

You don't have to discover everything about reality anew - you _can_
use other pepooles' reports of their experiences for references.

Perhaps you misunderstand what I want.

I am not really looking for doing months of labor just for the sake of
doing cute stuff.

The TIG inverter project, for example, is done so that I can weld
aluminum. (even though, at this point, I realize that I already spent
an ungodly amount of time and will rarely, if ever, need to weld
aluminum). But at least there was some external justification, I
thought, how about making a $7,000 AC welder for the price of $9.99
for the DC welder and some power electronics to convert it to AC.

Same is with these relays. If I can find a manufactured solution that
can let me control relays via RS-232 or some such, I would gladly pay,
say, $50 for it. $100 if it also provides digitized feedback.

Then I would use it to make toys and perhaps home automation or
welding automation, etc.


i
 
D

DoN. Nichols

According to Rich Grise said:
I don't know about this alleged "conflict monitor" - I'd have written
the controller such that no such of a thing ever happened in the first
place.

Your program only controls the output signals from the
controller which are fed to the relays controlling the lamps. It is
still possible for a solid-state relay to short, or a relay contact to
weld, so there is a benefit to be had from extra hardware to monitor the
actual power to the lamps, and to switch onto blinking red mode if such
a condition occurs.
There are arbitrations, of course, between the various traffic
sensors (and there can be more than one per lane, to detect multiple
cars backups), and pedestrian button requests, but one thing I _do_
know that existing stop-lights have - when one pole gets knocked down,
the rest of them pause a second, as if to consider the situation, and
then revert to flashing red, 4way stop mode. And they do alternate the
red between the crossing streets. (IOW, when the N-S are red, the E-W
are off, and they switch.)

I know, because I saw a guy take out one of the poles, and that's
what happened. :)

Probably an interesting thing to watch -- but then there is the
time lost testifying to the police and later the court case (if any).

Enjoy,
DoN.
 
G

Gunner

Perhaps you misunderstand what I want.

I am not really looking for doing months of labor just for the sake of
doing cute stuff.

The TIG inverter project, for example, is done so that I can weld
aluminum. (even though, at this point, I realize that I already spent
an ungodly amount of time and will rarely, if ever, need to weld
aluminum). But at least there was some external justification, I
thought, how about making a $7,000 AC welder for the price of $9.99
for the DC welder and some power electronics to convert it to AC.

Same is with these relays. If I can find a manufactured solution that
can let me control relays via RS-232 or some such, I would gladly pay,
say, $50 for it. $100 if it also provides digitized feedback.

Then I would use it to make toys and perhaps home automation or
welding automation, etc.


i
You may wish to bookmark this link....

http://www.bb-elec.com/

Gunner


"The importance of morality is that people behave themselves even if
nobody's watching. There are not enough cops and laws to replace
personal morality as a means to produce a civilized society. Indeed,
the police and criminal justice system are the last desperate line of
defense for a civilized society. Unfortunately, too many of us see
police, laws and the criminal justice system as society's first line
of defense." --Walter Williams
 
R

Rich Grise

Your program only controls the output signals from the
controller which are fed to the relays controlling the lamps. It is
still possible for a solid-state relay to short, or a relay contact to
weld, so there is a benefit to be had from extra hardware to monitor the
actual power to the lamps, and to switch onto blinking red mode if such
a condition occurs.


Probably an interesting thing to watch -- but then there is the
time lost testifying to the police and later the court case (if any).

The funnest part was looking at the other driver in the eye, and deciding
to get the **** out of the way.

What it was was, I was sitting at the stoplight, in the right-hand lane,
waiting for the light to change. There was a car right next to me, in
the left lane. It had just started raining, so the streets were slicker
than snake snot. There was an armored truck approaching from the left
on the cross-street, who had a green light. Apparently he was going a
little bit fast for conditions, because he (the armored truck) started
fishtailing. His fishtailing got worse, but he was on a new trajectory.
His destination was right exactly in the spot where the car to my left
was sitting, waiting for the light. He looked at me, with a sort of
panic-stricken look in his eye, like, "My god! He's coming right at me!",
so I just hit the gas, blew the light, got out of the guy's way, he did
likewise, the armored truck hit the stoplight pole sideways, and came to
rest right where the guy to my left had been sitting. (we were well out
of the way by that time). The pole went down, of course, and the rest of
the lights switched. I did give a report to the cops, but it seemed
pretty open-and-shut - the guy lost control, took out the light pole,
and came to a stop. There were no injuries, and the only damage was to
the armored truck and the light pole, so I guess they dealt with it.
All the cops needed from me was to tell them what I'd seen.

But it is kinda fun retelling the story. :)

Cheers!
Rich
 
Top