on off timer

Talk Electrician Forum

Help Support Talk Electrician Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Am I correct in assuming when you say Rpi controlled. You mean a raspberry Pi? You can get relay boards for them. Just wire one of those to an LED and program to do what you'd like. 

May as well if it's controlling everything else. 

 
............but what would happen when the switch is opened? The cap would be in parallel with the res and led, so would it not discharge through that causing the led to light (all be it a short time)
no, as the current can only flow in one direction through the LED

even if it did discharge via the LED, that wouldnt be an issue in my case

Am I correct in assuming when you say Rpi controlled. You mean a raspberry Pi? You can get relay boards for them. Just wire one of those to an LED and program to do what you'd like. 

May as well if it's controlling everything else. 


the problem is the Raspberry Pi takes about 15secs to boot,

thats the problem, the kids press the power button a second time before it has booted up, thus sending it straight into shutdown

 
the problem is the Raspberry Pi takes about 15secs to boot,

thats the problem, the kids press the power button a second time before it has booted up, thus sending it straight into shutdown


Understood. 

So this button is powering the Pi? 

Could you not wire through a N/C contact on the Pi from the output of the button. Once the Pi is booted have it switch the relay, making the light go off. The light will only then come on once they press the button. 

 
Last edited by a moderator:
Understood. 

So this button is powering the Pi?   yes

Could you not wire through a N/C contact on the Pi from the output of the button. Once the Pi is booted have it switch the relay, making the light go off. The light will only then come on once they press the button.   that may be workable, although I'm not sure how I can change one of the GPIO to an output and keep the rest as input, I'll need to google, my knowledge of coding is very basic.
me in this colour,  :)

 
Should be able to write the code in 2 lines. 

Don't think you'll be able to change the config of an input to an output, but I believe an output board can be picked up for a few quid. 


if I knew how to code,,,   :slap

I basically stole the original code for the GPIO pins and just modified it slightly for my requirements,

I havent got the first clue how most of it works,,,,,

but its worth a go, I have a few GPIO pins spare,

I think I'll go with the delayed relay to start while I try and sort it out so its self contained via the Pi, could be an interesting learning curve

 
if I knew how to code,,,   :slap

I basically stole the original code for the GPIO pins and just modified it slightly for my requirements,

I havent got the first clue how most of it works,,,,,

but its worth a go, I have a few GPIO pins spare,

I think I'll go with the delayed relay to start while I try and sort it out so its self contained via the Pi, could be an interesting learning curve


Ask one of your kids, I'm sure I've read that they are teaching this stuff in schools now. 

Plenty of forums you could ask too. 

 
Ask one of your kids, I'm sure I've read that they are teaching this stuff in schools now. 

Plenty of forums you could ask too. 
one still has a year left at primary, the other is at Nursery, so not sure they are that skilled just yet,  ;)

I did ask on a really clever forum,  :D

I need a quick fix for now so will use the relay method, and sort out the Pi to control it when I have a bit more time

 
Top