![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
I need help. I'm trying to do some development on a project, and I would like to be able to energize a circuit with a PC or other device that would give me an adjustable and repeatable on/off signal. For example, I may want to turn the circuit on for 1 minute, then off for 5 minutes, or I may want to have the circuit on for 45 minutes then off for 30 minutes, depending on the circumstances. The on/off will be controlled with a relay. That part I'm comfortable with. What I'm not comfortable with is how to control a PC port from windows to send the on/off signal. I don't care if I use a serial, parallel, or USB port. Are there any readily available programs to send a signal like this? Or am I gonna have to find someone who is comfortable with C or C++ to help me with this? Any help would be much appreciated. I'm not dead-set on using a PC to control this, so if there is another method of making a timer that has the needed flexibility, I am all ears.
__________________ My name is Electric Nachos. Sorry to impose, but I am the ocean. http://www.bryanpryor.com (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#2
| ||||
| ||||
| NeoMoses, How about a cheap Plc, (programable logic controler)? That's what they are made for. To turn things on and off and time things or to sense presure or voltages, current ect.... I don't know tons about them, but maybe someone here does. I also have a friend that works with this stuff for a living. I could ask if need be. Here's a quick link:http://www.thomasregister.com//Catal...1&uuid=TRGuest Sorry this link doesn't get you all the way to the plc's. So you'll have to navigate to them> products>plc. Then look at the Nano series. They have starter packages.
__________________ (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) Last edited by wms; 08-05-2003 at 01:07 AM. |
|
#3
| ||||
| ||||
| I send simple hardware and software. Hardware and software use max 8 relay. System uses PC parallel port. I wrote for dos but not problem for Win 98. unsigned port=0x378; unsigned char rly0,rly1,rly2,rly3,rly4,rly5,rly6,rly7; void on_off() { unsigned char dat; dat=rly0; dat=dat|(rly1<<1); dat=dat|(rly2<<2); dat=dat|(rly3<<3); dat=dat|(rly4<<4); dat=dat|(rly5<<5); dat=dat|(rly6<<6); dat=dat|(rly7<<7); // printf("%02X ",dat); outportb(port,dat); } void main() { rly0=0;rly1=0;rly2=0;rly3=0; rly4=0;rly5=0;rly6=0;rly7=0; on_off(); // rly0 on 1 sec // rly1 on 1 sec // rly0 and rly1 off 5 sec (relay0 2 sec on, 5 sec off) // loop again (relay1 1 sec on, 5 sec off) while(rly0==rly0) { rly0=1;on_off();delay(1000); rly1=1;on_off();delay(1000); rly0=0;rly1=0;on_off();delay(5000); } } Last edited by bunalmis; 08-05-2003 at 03:19 AM. |
|
#4
| ||||
| ||||
| NeoMoses, A trivial VisualBasic code could achieve what you want (unless you timing is very critical, i.e., milliseconds accuracy). For such things, I normally use a PIC (www.microchip.com) microcontroller (programming required). In most cases, it just need a chip and some transistors (& resistors, caps) and switches. Accuracy to microseconds and fully repeatable. I could offer some help on both methods. I do need to know your 'circumstances' before suggesting a solution. Regards
__________________ Stupid questions make me smarter... See how smart I've become at www.9w2bsr.com ;-P |
|
#5
| ||||
| ||||
| NeoMoses: for a relatively cheap (<USD100) highly portable (it's smaller than a credit card) solution look into the BASIC Stamp controller. It has to be programmed but you could learn everything you need in a couple of hours. The manual is free online at http://www.parallaxinc.com in .pdf format. robotic regards, Tom p.s. I have no connection with Parallax, just a satisfied customer. I have purchased several hundred of their units over the years and only had one DOA, which they replaced over-nite free of charge. |
| Sponsored Links |
|
#6
| ||||
| ||||
| I think I'm gonna go with this. It's a kit that I get to put together, and it's got some data acquisition channels along with it!
__________________ My name is Electric Nachos. Sorry to impose, but I am the ocean. http://www.bryanpryor.com (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| G-Code to DXF | WayneHill | OpenSource Software | 189 | 01-30-2012 11:15 AM |
| Visual Basic Controller Project | dwwright | Visual Basic | 29 | 02-14-2011 02:24 PM |
| How to set a relay for a spindle motor ON/OFF control | TTaki | TurboCNC | 2 | 03-09-2005 07:26 AM |
| Parallel Port / Relay Control Question | Verboten | Computers and Networking | 7 | 12-21-2004 05:17 PM |
| E-Stop Hard Wire and to Software? | Sanghera | General Electronics Discussion | 20 | 10-30-2004 12:22 AM |