The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
So, i want to kinda learn how computers interact with stuff. How would you go about... say, hooking up a light bulb to a usb port and making it shine with the touch of a button? How exactly does this stff work anyway?
Well, there are a number of places to start and it's probably going to be quite awhile before doing things like you suggested with a true understanding of everything that is happening.
1) Learn to program. You'll need this skill to write the applications to tell the computer how to interact with whatever you are hooking up. For something like you suggested with the light bulb you'll need a fairly strong understanding of low level programming (low level as in close to the hardware not low level as in easy and basic).
2) Learn about system architecture. This is how computers work internally, how they store data in the cpu itself, transfer data between the CPU and RAM, etc.
1 and 2 combined will teach you a lot about how stuff works on a computer and give you a starting point for doing whatever you may want to do.
Beyond this you're still going to have to learn more stuff as you think of projects... you may have to do some custom wiring of circuits, get a better understanding of how specific things work like usb, serial, ethernet, anything specific to that project, etc.
What you're asking is basically home and building automation which alot of colleges have as a program. There would be your best bet to learn to do such things. I had very little interaction with it so I can't really explain the way it is done, just that there was a program on the computer that sent signals out to different periphrals.
What you're asking is basically home and building automation which alot of colleges have as a program. There would be your best bet to learn to do such things. I had very little interaction with it so I can't really explain the way it is done, just that there was a program on the computer that sent signals out to different periphrals.
I think what you're thinking of is using X10. That's certainly one way to go with it but requires hardware that is compatible with X10 for use.
My understanding is that he is wanting to be able to just rig up any of his own stuff that he wants to be controlled by the computer. Certainly doable, I have a friend who has wired up circuits to control panels of LEDs and written apps to control their brightness. It requires a much broader array of knowledge and at a much lower (closer to the hardware) level to implement and to know where to start than X10 stuff would, though.
I did this sort of stuff for my thesis at university.
The problem with your example of plugging a lightbulb directly into your USB port is that USB ports arent generally designed to work using only a single pin. While I assume its possible, you would constantly be working against the normal operation of a USB port with a windows system, which generally uses all/most of the pins at once. For example the automatic hardware detection which is generally active on most windows USB systems, will be probing the port for a connection, which may result in unexpected signals, even while connected and running a program.
While I assume its possible to eliminate this behavior, it would be far smarter to do this type of project with a port that stays dormant unless you specifically activate it with some type of program. Your serial port fits this description. However, a far more appropriate method of approaching this type of project is to get some hardware designed for this sort of application. You can buy off the shelf microcontroller kits that come mounted on a PCB with on board memory and input/output ports that are more easily connected to individual wires. The kit will come with software to flash assembler or C programs into the memory of the chip, and then the chip can act as a control program for your hardware circuit.
However even once you learn to control your ports to produce the signals that you want, you will need to learn a bit about electronics to do anything useful with those signals. Turning a lightbulb on is fun for all of about 10 seconds. Actually doing something interesting with your electronic control system can require some advanced electronics knowledge.
If you are really interested in learning this stuff, my advice is to study computer engineering or electrical engineering at university. This sort of stuff is the exact purpose of the course.
You might have some fun playing with Phidgets, which I understand are quite neat and don't require construction of interfaces from first principles. Haven't played with them personally though.
thanks for the help guys, but I've already slogged my way through mechanical engineering, i'm not going back through electrical just for a hobby.
Seriously, it can't be that complicated. I've got the know how to do some simple circuit stuff, and i've done a single course in c++, where do i go from here?
thanks for the help guys, but I've already slogged my way through mechanical engineering, i'm not going back through electrical just for a hobby.
Seriously, it can't be that complicated. I've got the know how to do some simple circuit stuff, and i've done a single course in c++, where do i go from here?
It depends on exactly what you want to do. You'd probably be best off picking a specific project first and then looking for help and reading up on specifics of that project in particular. Everything you do is going to be different based on the thing you're trying to control, what interface you're trying to use to control it, and what you're trying to make it do specifically. Otherwise all we can really tell you are very broad topics to study which are going to be involved in "making a computer do something."
You've got 1 idea already and some input here on what issues you're going to run into and alternate ways of doing it to look at, so why not start reading up on those things?
Learn how to use a PIC microcontroller for which you will need to learn how to program in assembler. I just finished learning how to use the Microchop PIC18F452 which has a built in UART (universal asynchronous receiver transmitter, aka serial port communications) that is very very easy to interface to a computer. The programming is very very simple and basic but requires some creative thinking sometimes. I absolutely suck at higher level programming like C++ and such, but assembler is cake.
Throughout the term we made a programmable clock with it (interfaced the chip to a LCD display and keypad), a ROT13 encoder that used the UART to hook up to a PC and encode letters you sent to the PIC, and for my project I made a learning remote control that let you save infrared button commands from most any remote control you have.
You have no idea how many things chips like this are used in.
There are automation boards that hook up to the serial port of your computer. It's pretty basic programming, just send the serial port the character corresponding to turning on or off a relay.
Learn how to use a PIC microcontroller for which you will need to learn how to program in assembler. I just finished learning how to use the Microchop PIC18F452 which has a built in UART (universal asynchronous receiver transmitter, aka serial port communications) that is very very easy to interface to a computer. The programming is very very simple and basic but requires some creative thinking sometimes. I absolutely suck at higher level programming like C++ and such, but assembler is cake.
Throughout the term we made a programmable clock with it (interfaced the chip to a LCD display and keypad), a ROT13 encoder that used the UART to hook up to a PC and encode letters you sent to the PIC, and for my project I made a learning remote control that let you save infrared button commands from most any remote control you have.
You have no idea how many things chips like this are used in.
Neat stuff dooder. where would i go about purchasing all necessary supplies and/or manuals?
Posts
1) Learn to program. You'll need this skill to write the applications to tell the computer how to interact with whatever you are hooking up. For something like you suggested with the light bulb you'll need a fairly strong understanding of low level programming (low level as in close to the hardware not low level as in easy and basic).
2) Learn about system architecture. This is how computers work internally, how they store data in the cpu itself, transfer data between the CPU and RAM, etc.
1 and 2 combined will teach you a lot about how stuff works on a computer and give you a starting point for doing whatever you may want to do.
Beyond this you're still going to have to learn more stuff as you think of projects... you may have to do some custom wiring of circuits, get a better understanding of how specific things work like usb, serial, ethernet, anything specific to that project, etc.
My understanding is that he is wanting to be able to just rig up any of his own stuff that he wants to be controlled by the computer. Certainly doable, I have a friend who has wired up circuits to control panels of LEDs and written apps to control their brightness. It requires a much broader array of knowledge and at a much lower (closer to the hardware) level to implement and to know where to start than X10 stuff would, though.
The problem with your example of plugging a lightbulb directly into your USB port is that USB ports arent generally designed to work using only a single pin. While I assume its possible, you would constantly be working against the normal operation of a USB port with a windows system, which generally uses all/most of the pins at once. For example the automatic hardware detection which is generally active on most windows USB systems, will be probing the port for a connection, which may result in unexpected signals, even while connected and running a program.
While I assume its possible to eliminate this behavior, it would be far smarter to do this type of project with a port that stays dormant unless you specifically activate it with some type of program. Your serial port fits this description. However, a far more appropriate method of approaching this type of project is to get some hardware designed for this sort of application. You can buy off the shelf microcontroller kits that come mounted on a PCB with on board memory and input/output ports that are more easily connected to individual wires. The kit will come with software to flash assembler or C programs into the memory of the chip, and then the chip can act as a control program for your hardware circuit.
However even once you learn to control your ports to produce the signals that you want, you will need to learn a bit about electronics to do anything useful with those signals. Turning a lightbulb on is fun for all of about 10 seconds. Actually doing something interesting with your electronic control system can require some advanced electronics knowledge.
If you are really interested in learning this stuff, my advice is to study computer engineering or electrical engineering at university. This sort of stuff is the exact purpose of the course.
Seriously, it can't be that complicated. I've got the know how to do some simple circuit stuff, and i've done a single course in c++, where do i go from here?
You've got 1 idea already and some input here on what issues you're going to run into and alternate ways of doing it to look at, so why not start reading up on those things?
Throughout the term we made a programmable clock with it (interfaced the chip to a LCD display and keypad), a ROT13 encoder that used the UART to hook up to a PC and encode letters you sent to the PIC, and for my project I made a learning remote control that let you save infrared button commands from most any remote control you have.
You have no idea how many things chips like this are used in.
Neat stuff dooder. where would i go about purchasing all necessary supplies and/or manuals?