Turn on for 8hrs after 2hrs One Shot 240V - Page 1
Forum section: electronics / projects

author: NivagSwerdna
author_rank: Super Contributor
timestamp: July 29, 2025, 06:23:14 pm
content: I'm so confused!I want a relatively off-the-shelf solution for charging my e-bike... I would like to have a push button that starts a delay, after the delay the charger gets 240V for 8hrs and then switches off.I can see some 240V relays on Aliexpress like DH48S which are sort of what I want but these appear to be more of the "turn it continuously on" after a delay type? or some that seem to cycle but I want a one-off?I don't mind having two devices if I have to... but I want to put it in an enclosure with a start (and maybe a reset) button.Any pointers appreciated!

author: themadhippy
author_rank: Super Contributor
timestamp: July 29, 2025, 06:59:38 pm
content: how about 2 of theseuse the switch to trigger the first timer in mode 2 for the delay ,at time up the first timers relay triggers the second timer in mode 1.1

author: voltsandjolts
author_rank: Unknown
timestamp: July 29, 2025, 07:03:43 pm
content: I assume the objective here is safer charging, which I'm totally on-board with.Is the initial delay so charging starts during the daytime, rather than charging at night which is more hazardous (because folks are asleep)?If you went for full custom mcu + mains ssr, you could add in a temperature monitoring option (maybe non-contact), to kill charging power if over temperature detected. I suggest this because the higher risk is during charging, rather than after charging.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: July 29, 2025, 07:14:24 pm
content: The initial delay is so that I can press the button when I arrive home but give the battery a while to cool down before the charge cycle startsPSThe charger has an LED which turns on whilst charging and it does turn off (or at least slowly cycle) when the battery has charged. Theoretically it does not need to be turned off... if you were to trust the charger... but for peace of mind I would like to give it max 8 hrs (probably six) charging time.PPSThis is not in a people-ly area... garage building; I understand the risks of charging (potentially dodgy) e-bike batteries... and accept the risk!PPPSI hoped not to create another microcontroller project for myself... would prefer mostly off-the-shelf components

author: langwadt
author_rank: Super Contributor
timestamp: July 29, 2025, 07:19:59 pm
content: Quote from: NivagSwerdna on July 29, 2025, 07:14:24 pmjust use a regular mechanical timer, set 8 hours ON and set the time to some time before those 8 hours

author: NivagSwerdna
author_rank: Super Contributor
timestamp: July 29, 2025, 08:19:18 pm
content: Quote from: langwadt on July 29, 2025, 07:19:59 pmToo fiddly

author: langwadt
author_rank: Super Contributor
timestamp: July 29, 2025, 08:33:15 pm
content: Quote from: NivagSwerdna on July 29, 2025, 08:19:18 pmyou only have to set the ON time once, after that all you have to is turned the time to some time before the ON time

author: NivagSwerdna
author_rank: Super Contributor
timestamp: July 29, 2025, 08:45:05 pm
content: fwiw...This is what I have currently... and it works well... but doesn't have the ON delay... that's what I am after!

author: kloetpatra
author_rank: Regular Contributor
timestamp: July 29, 2025, 08:46:54 pm
content: Why not use a tasmota smart plug? Most of them got a button where you can set custom rules.Press button -> switches on after 30 minutes -> switches off after 6 hoursCode:Rule1 ON Button1#State=3 DO RuleTimer1 1800 ENDONON Rules#Timer=1 DO Power1 ON; RuleTimer2 21600 ENDONON Rules#Timer=2 DO Power1 OFF ENDONhttps://tasmota.github.io/docs/Rules/

author: Twoflower
author_rank: Frequent Contributor
timestamp: July 29, 2025, 08:51:47 pm
content: kloetpatra beat me by mere seconds, I was on the way to suggest Shelly plugs.And instead fixed on-time, you can set them to switch off if consumption falls below a threshold.

author: kloetpatra
author_rank: Regular Contributor
timestamp: July 29, 2025, 09:03:33 pm
content: Yes that's true. Also some tasmota plugs have integrated power monitoring. Those use ICs like HLW8012, CSE7766 or BL0937.Press button -> Switch on after 30 minutes -> Switches off if power consumption is less than 10 W for over 60 seconds. Also switches off after 6 hours.Code:Rule1ON Button1#State=3 DO RuleTimer1 1800 ENDONON Rules#Timer=1 DO Power1 ON; RuleTimer2 21600 ENDONON Rules#Timer=2 DO Power1 OFF ENDONON Rules#Timer=3 DO Power1 OFF; RuleTimer2 0 ENDONON Energy#Power<10 DO RuleTimer3 60 ENDONON Energy#Power>10 DO RuleTimer3 0 ENDON

author: NivagSwerdna
author_rank: Super Contributor
timestamp: July 31, 2025, 06:36:55 am
content: Thanks for the pointer... I have ordered a "Shelly Plus Plug UK" to play with.

author: Phil1977
author_rank: Frequent Contributor
timestamp: July 31, 2025, 10:24:46 am
content: Quote from: NivagSwerdna on July 29, 2025, 07:14:24 pmJust as a consideration: The worst stress for Li-Ion batteries is if they are charged at *too low* temperatures (<10°C). As long as the battery does not get hot (>40°C) during discharge, it should be of no concern to immediately start charging.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: July 31, 2025, 12:42:26 pm
content: TBHI only take the cool down part from eBike folk lore.No idea if it is true!