Moonlight too low

Do you have a question on how to do something.
Ask in here.
Post Reply
clw143
Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana

Moonlight too low

Post by clw143 »

I built a DIY moonlight setup with the plan of over lighting to run royal blue light at 100% during the day and less at night for moonlight.

My concern is that with as low as I have it set, my lights with be "off" longer than new moon lasts due to the dimmable driver having to be higher than 1 volt.

So say moonlight()/2 ); ill be functioning with 0-5v and new moon "off" will last 2x longer than it should
moonlight()/3 ); 0-3.33v new moon 3x longer than it should
moonlight()/4 ); 0-2.5v but >1v will be off and new moon will be 4x longer than it should

Any thoughts on how to constrain it differently?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Moonlight too low

Post by rimai »

I think you will get better results by using a different driver.
Something like stevesled or buckpuck or any other that can go down to 1%
Roberto.
clw143
Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana

Re: Moonlight too low

Post by clw143 »

Can I just use moonlight as a function? Something like (moonlight()+3.5)/4)?

That would give me .875 to 3.375, essentially 1 step for off for 1-10v dimmers at about 1/3 brightness?
clw143
Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana

Re: Moonlight too low

Post by clw143 »

The previous equation still left too much "off" for new moon due to still going all the way to 0.

Here is the final code incase anyone else ever encounters something similar. For my meanwell analog dimmable module, 10% was on, 9% was off. Although with a volt meter on the PWM actinic output shows a small variance between the percent and actual 0-10 volts output. Does anyone know if maybe this is adjustable with a potentiometer in the relay box?

Code: Select all

  // Dimmable royal blues 100% if actinics (relay port 2) are on, else moonlight
  if (bitRead(ReefAngel.Relay.RelayData, Port1Bit)) ReefAngel.PWM.SetActinic( 100 );
  else ReefAngel.PWM.SetActinic( (0.25*MoonPhase())+9.5 ); // 0.95v-3.45v moonlight
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Moonlight too low

Post by lnevo »

What you should do is look at the map function.

You could moonphase to whatever value min (10% lets say) and max (let's say 25%).

It would look like this

map(MoonPhase(), 0,100,10,25);

This way the math is handled and you could set whatever threshold you are trying to set and could be calibrated to your drivers "off" value
Post Reply