Computer Controlled Relays
NumbersNotFound
Join Date: 2002-11-07 Member: 7556Members
in Off-Topic
<div class="IPBDescription">Hardware/software interface.. any ideas?</div> Hey, I wanted to make this one device to set my alarm clock by computer.
The alarm clock works by four buttons on the top, these are simple switches.
So, four relays would be used, one for each button.
I'm looking for the simplest way possible to have these relays connected to the computer and interface with C++ so I can use the program, along with the system clock, to turn the relays on and off, thus setting the time of the clock, setting alarms, etc.
Anyone know the best way?
The alarm clock works by four buttons on the top, these are simple switches.
So, four relays would be used, one for each button.
I'm looking for the simplest way possible to have these relays connected to the computer and interface with C++ so I can use the program, along with the system clock, to turn the relays on and off, thus setting the time of the clock, setting alarms, etc.
Anyone know the best way?
Comments
I'd be more concerned about reading FROM the clock, as with the four-relay system, all you'll be able to do is say 'advance clock X hours, X minutes'. No quick setup, unless you tapped directly into the clock's EEPROM, which can be a true pain in the butt.
At that point you'd more want to just get an LCD/LED/Nixie display and wire it directly to the parport and run the clock directly from system time. Maybe solder on a buzzer and link it to one of the unused pins, unless you just wanted to run an MP3 or something off the standard sound-out.
K, thanks.
Would a Serial port work as well?
The clock picks up the signals as fast as i can press the button... which is about 5 times/sec, so it would set pretty fast.
Just look into the IO libraries for external ports. It'll explain how it all works.
Also, given that you can power/depower more than 300 times a second, being able to push the button five times a second isn't all that fast, comparatively. You'll have to tweak to figure out how long it needs to be tripped to register with the clock.