Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Linux to home appliance interfacing extremely basic design

Status
Not open for further replies.

burntt999

New Member
Hello everyone,

I was looking through all of my collected books, links, etc that i've collected over the years in my backup drive and came across a favorite circuit that i've always wanted to do but never found the time until now. Looking it over i had some questions as I go along in testing this out. First of all heres the link.. some might recognize this:


Home Electrical Device Control HOWTO
Rui Li
<ruili@worldnet.att.net>


To clarify what i'm doing. I want to learn about all this home automation without going to any of the X10 devices. I need to start from the most simple and work my way up so I have a firm grasp on it all.

The diagram in the link uses a parallel cable, but i was initially going to use a laptop to get this to work and well i do not rememeber ever seeing a parallel port on a laptop.. also the parallel port was for powering 8 different relays and since i only want to start from the bottom 1 relay is fine. I was also thinking 1 relay so i could maybe use a usb cable.

I grabbed an unused usb extension cable and wacked the female port off. took about a 2 inches off and noticed that its shielded ( i honestly dont know if having the shield would make a diff). So i took another 4 inches of jacket off so i could pull back the shield carefully hoping to reuse and underneath was a stranded copper wire(ground?) and the 4 usb wires wrapped in foil.


going back to the schematic now. This is what I am having problems with currently. I hope i can explain what I'm not understanding clearly.

I noticed that the relay in the diagram had a Vcc in it. Referencing Vcc under the diagram said

"""
P data parallel port data line(pin 2 to pin 9, use any)
Vcc - depends on the type of your relay. I'm using 12VDC.

and then...
+5 volts from parallel port will turn on the relay. Once the relay is on, the
device connected to that relay will be on. When the parallel port's data line
goes back to 0, it will turn off the relay, and device is off.

"""
I am guessing that the relay used in example diagram needs 12vdc from say a battery pack?




and if you look further down the link at the bottom there is a design under

CONNECTED RELAY BOARD

Tried to copy and paste. it did NOT work at all.
but refering to the diagram under " connected relay board"


The only thing i can think of is that the PLUG connects to a wall receptacle and the thing labeled POWER OUTLET is something like a female end of a power cable??? Then plug in appliance to the female outlet.


Am I making sense of this diagram or am I on the correct track?
 
thanks for the reply. but an arduino is exactly what i wanted to avoid. and i have 5 old laptops so in the event that happens its no big deal. But i seriously want to start with the most basic possible way of doing this. And i do have an arduino. 3 actually. I just dont want to start with them.


to explain a little more.... i'm basically doing this for my own understanding
 
After rereading the paragraph below the last diagram that i was confused about it explains that i had it backwards...
"""
To connect the system, just connect your home electrical device to the power
outlet. That is it! You don't need to make any change on the electrical
device. And you can connect any kind of device to that power outlet. Plug
this power outlet into any wall outlet.
"""
 
Also I want to make the circuit myself. I feel like using an Arduino would basically be just like having someone else do all this for me.
and i dont HAVE to use usb but that was the only way i initially thought i could interface with my linux laptop. i'm guessing i could use a parallel to usb port and just see what i can get away with by running the program that is needed to control the appliances from the laptop and using a multimeter to see what voltages i can get by playing around with the program on laptop end and voltmeter on the parallel end of the usb to parallel cable..
 
usb, no.
very basic electronics.

i really didn't think it would require a whole lot of expertise to send 5volts from a computer to turn on a relay. The program to do so is already written and zipped available in the link.

is that not what the whole circuit in the link comes down to?



i appologize. i'm sure what i'm trying to say is not clear. Its the fun part of dyslexia and having a thought disorder :).

the link in the OP has a simple circuit and also has a downloadable program to control 8 different relays for 8 different home appliances using a parallel cable. I simply wanted to know if there were any other way to connect the computer to the board. (hdmi, vga, ethernet, etc). i've seen some instructables and other projects where people use all kind of strange cables to connect their devices.

thats my question
 
Last edited:
Usb is not going to work so say good bye to your laptops
You need a USB to port adapter be it parallel port or serial
par.jpeg


Or this
ser.png


Then you need one of these
relay.png
 
USB is a very complicated protocol that involves lots of negotiation before any communication can take place - so, you can't just connect it to something and expect it to work.

Mike.
 
And basically a arduino is a way to let your laptop do things in the world plus you get write your own code
It gives usb to serial then the avr chip gives you ports you can switch or read

And like Mike just said But I'll say how I would tell someone USB is useless without something on the end of the cord that can talk USB

It would take a long time just to learn how to write your own usb code let alone a driver for your computer then your back to having to have a uC on the end of your usb cord or buy one of the above "USB to port adapter be it parallel port or serial"
Or get a cheap 3 dollar uno or learn how to use a bare chip AVR or PIC or any of the one's that have USB and code you could learn from.
 
Last edited:
ah hah. Thank you for all the replies clarifying all this. Yeah my whole thought switching the parallel cable for usb seemed too easy to be true. i'm going to research these bare boards and see what i can learn about them. Thanks
 
If you want to use just your computer for this, then I think that a USB to parallel port adapter controlling relays would be the easiest way to go for you.
 
This is an older thread, not that 9/2019 is real old but isn't quite current. I have no idea if the thread starter ever found his dream? I have not seen a parallel port on a motherboard in quite a few years. My old Dell 530 MT workstation has one running Windows 98 SE. Years ago I had a bunch of software I wrote in old VB 6.0 to communicate with the parallel port and turn data lines on and off. I even made some connector breakout boards back then. No clue where half that junk is now but it's here somewhere. :)

I guess if I wanted to play around with parallel port today I would run with a USB to Parallel Port adapter as crutschow suggested. Another little slick trick is using the RS 232 port which now are all but extinct on motherboards today. Less using the data lines. The DCD, DSR and CTS inputs of a RS232 Comm Port can be used as digital inputs and the RTS and DTR outputs can serve as digital outputs. I did write a little routine to use these RS 232 pins. I used an old Keyspan USB to RS232 adapter and what becomes important is the pin outputs and inputs are not to true RS 232 specifications. My experience was outputs high were 5 volts and outputs low were -5 volts, inputs were low 0 volts and high 5 volts worked just fine. I have an old Belkin adapter USB to RS232, parallel port and USB ports but the last drivers were for Windows XP. :(

If anyone has an interest my RS 232 Program can be downloaded by clicking here. The user interface looks like this:

Comm 1.png


Important to first choose a comm port.
Comm 2.png


Then just open the port and when done close the port. Also be it an old parallel port or RS 232 port using adapters make sure you know how much current a pin can output (source) because in many cases a transistor driver is needed if you plan to drive relays to turn things On/Off. :) The above runs fine on Win 98 through Windows 10.

Ron
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top