Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
craigcampbell404@gmail.com  
#1 Posted : Thursday, April 02, 2015 5:19:47 AM(UTC)
craigcampbell404@gmail.com

Rank: Newbie

Groups: Registered
Joined: 3/24/2015(UTC)
Posts: 2

Thanks: 1 times
Good Morning,

in this instance i believe i will be using the timer to control a relay on and off duration
for 3 different intervals

on for 18 hours, off for 6
on for 12 hours off for 12
on for 22 hours off for 4

first: in the timer agent do i convert the hours into seconds for on duration
secondly: do i create a secondary timer and convert the hours into seconds for the off time?

i know this is a simple question to you but for me i'm beginning to become muddled in the many various approaches.

this first step here, once the concept is clarified to me, i will be able to expand my controls to manage the remainder of my output controls.

i thank you

craig campbell
EmbrioAdmin  
#2 Posted : Thursday, April 02, 2015 6:41:51 AM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 654

Thanks: 1 times
Was thanked: 36 time(s) in 33 post(s)
I've attached a project that does this.

The hardest part of this one is the long time intervals. The timer node uses a "long" value to count microseconds, so a timer can only count up to about 35 minutes. I hadn't thought to put a limit on the max seconds node, I'll do that in the next update.

To get around that I made a "long timer" node group, in which a timer set to 30 minutes (in the project it's at 1 second so we can see what's happening, change the max seconds value to 1800 for 30 minutes) triggers an incrementor. When the incrementor is full, the timer is done. This is a pretty ugly node group because of the overlap. I should eventually change the timer so it can deal with longer intervals. The last piece of this is that because all numbers in Embrio are from 0 to 1, you have to calculate the appropriate increment value. So if you want it to last for 8 hours, that's 16 ticks at 30 minutes each, so 1 / 16 makes for an increment of .062. I set all the increment values in the main control agent already.

That's the hard part. Next I made an "on off timer" node group, which is just two of these long timers. The first one kicks off the second one when it finishes. Finally on the main control agent, I used 3 of these on off timers, hooked them up to run in sequence, and attached their triggers to the on/off triggers on the switch.

The trick is using "reusable node groups" effectively. If you need help with those this video explains them: http://embrio.io/project...ts/reuseable-node-groups
File Attachment(s):
Long On Off Timer.zip (9kb) downloaded 5 time(s).

You cannot view/download attachments. Try to login or register.
thanks 1 user thanked EmbrioAdmin for this useful post.
craigcampbell404@gmail.com on 4/2/2015(UTC)
craigcampbell404@gmail.com  
#3 Posted : Thursday, April 02, 2015 1:06:54 PM(UTC)
craigcampbell404@gmail.com

Rank: Newbie

Groups: Registered
Joined: 3/24/2015(UTC)
Posts: 2

Thanks: 1 times
Wow,

I thought i was having a hard time warping my head around it earlier when i was trying to tie two timers together with a duration of 18 seconds on one and then when it completed it started a timer for 6 seconds as off just for scale.

inputting ph sensors and light par sensors should definitely be fun.
blanius  
#4 Posted : Tuesday, June 30, 2015 3:04:42 PM(UTC)
blanius

Rank: Member

Groups: BetaUser, Registered
Joined: 5/24/2015(UTC)
Posts: 17

Originally Posted by: craigcampbell404@gmail.com Go to Quoted Post
Good Morning,

in this instance i believe i will be using the timer to control a relay on and off duration
for 3 different intervals

on for 18 hours, off for 6
on for 12 hours off for 12
on for 22 hours off for 4

first: in the timer agent do i convert the hours into seconds for on duration
secondly: do i create a secondary timer and convert the hours into seconds for the off time?

i know this is a simple question to you but for me i'm beginning to become muddled in the many various approaches.

this first step here, once the concept is clarified to me, i will be able to expand my controls to manage the remainder of my output controls.

i thank you

craig campbell


Sounds like you should consider using a RTC then you can do the math based on reading the actual time and you are not dependent on constant power so you could implement low power options

Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error