![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I want to connect a relay to a PC RS232 (serial) port, than use programming control this on or off. I test the serial port pin 3 voltage allway in high level when I set it low in program. I found some information from internet that the serail port need a interface for its external devices. Please if you know how is this interface circuit, show me the circuit. simple is the best. for control a LED or a relay. Thank you all. | |
| |
| | (permalink) |
| any advice or link can help me? please. | |
| |
| | (permalink) |
| I would do it with a PIC, but there are many different ways. You could use an old UART, I seem to remember the 6402 was one?, or you could use the handshake lines to feed a relay via a simple driver. Personally I would advise a PIC solution, where you could easily (and more reliably) control the switching on and off of the relay - either by simple characters, or even text strings. My RS232 PIC tutorials show how to do this with LED's, you would just need to replace the LED's with transistor drivers feeding relays. | |
| |
| | (permalink) | |
| Quote:
http://www.winpicprog.co.uk/pic_tuto...s232_board.htm or other link? can you post it, please. I really want to know seperate a bit state, e.g. bit0 is on or off, from the serial bits(start bit, bit0-bit7, stop bits, etc.) | ||
| |
| | (permalink) | ||
| Quote:
Quote:
| |||
| |
| | (permalink) |
| Thank you. Nigel. I found a link http://www.rentron.com/pc-relay.htm "Building a Basic Stamp I & PC Relay Controller". But I cannot find a Basic Stamp I from local shop. I has the 2051, 16F84 on hand. how can I use these microcontroller to control the relay? also how is the programming code for the microcontroller? I need your help. Have a nice day. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| nigel code on your tut how can i get it to turn led on form pc would like to send serial data to pic and have it turn led on /led off . have pc program that can send data to port how do i get pic to take data (eg . somthing like b30 have it turn led off or b31 turn led on | |
| |
| | (permalink) | |
| Quote:
If you want to use multicharacter strings (as in your example) you would need to buffer the strings and then check what they were. If you want to do something like that you might try looking at Dontronics PICEX software, which although very old now is free and very versatile, have a look at http://www.dontronics.com/picex.html. | ||
| |
| | (permalink) |
| If you only need 1 or 2 relays you can use the handshaking lines of the rs232 port. You can simply set them or clear them in software, no pic needed, just a transistor and a diode to drive the relay. | |
| |
| | (permalink) |
| want to use 8ch for relays do not need to recieve anything just want to turn relays on and off | |
| |
| | (permalink) |
| If you want 8 channels from the serial port then you'll have to receive a byte from the uart. Simplest way is with a pic, if you don't have any pic expierience and don't want to get involved in it then i suggest you use the parallel port. | |
| |
| | (permalink) |
| A Solid State Relay may also also be adviseable as you can trigger them easly with low voltage and low amperage with theres no click noises every time like standard relays. | |
| |
| | (permalink) |
| IN Tutorial 7.5 what character do i send to pic from pc to turn on led 1 | |
| |
| | (permalink) | |
| Quote:
| ||
| |