3 ms·
That's scary but amazing. Did you do this and have any write ups about it? Sounds interesting!
by spicybright 4y ago
That's scary but amazing. Did you do this and have any write ups about it? Sounds interesting!
- timonoko 4y agoThis is all you need to know. Connect all parport data pins together and connect it to suitable relay. Preferably 3-pin relay, so the Wifi-power-on is the default state. $ cat wifi-off #! /usr/bin/python2 import parallel,time p = parallel.Parallel() # open LPT1 or /dev/parport0 p.setData(0xFF) $ cat wifi-on #! /usr/bin/python2 import parallel,time p = parallel.Parallel() # open LPT1 or /dev/parport0 p.setData(0x0)
- spicybright 4y agoWow, that makes complete sense. What an elegant hack!
- BugWatch 4y agoIf you are ever to pursue such a project, please pay close attention to proper electronic circuit design and safeguards when it comes to relays. Otherwise, you risk burning out the controlling pins or the whole system, due to reverse voltage (measured in hundreds) that is generated by the relay's coil when the relay is turned off. The easiest approach is to just use a commonly available relay modules used with Arduino or similar platforms/microcontrollers, as they already contain minimum or all protection mechanisms. So, the module will contain the reversed diode in parallel with the relay, while additional transistor and optocoupler will allow you a complete galvanic isolation of the controlling- from the and relay circuit. YouTube has plenty of user-friendly resources with schematics and functional overviews, just search for "relay module" or "relay arduino".
- spicybright 4y agoOh, absolutely. Even though it's just a simple (mostly) isolated relay, driving outlet power through anything but a PSU sketches me out. Great overview though, thank you for posting that.