Jump to content
Coral Vue Hydros

Meepduino: 2.0 RELEASED!


MeepNand

Recommended Posts

MOJOEJOEJOE

Im using the DS1307 and it works great. We had a power outage this winter for 3 days and when power came on it did not miss a beat. Its easy to interface as well.

  • Like 1
Link to comment

DS1302 Ordered! At least its cheap and ships from Georgia. Do I see some lunar cycle code in the txt file?

BTW.. if you are using this to control LDD-H drivers check out these mounting boards for the pinned versions. The guy who created the boards on RC has posted the files to have these boards created for personal use and they include a place to put in a pull down resistor so that if the controller loses power the drivers turn off instead of to 100%

 

 

http://www.reefcentral.com/forums/attachment.php?attachmentid=224562&d=1363796432

 

POST #1088

http://www.reefcentral.com/forums/showthread.php?t=2222702&page=44

  • Like 1
Link to comment

Im using the DS1307 and it works great. We had a power outage this winter for 3 days and when power came on it did not miss a beat. Its easy to interface as well.

I know, but I only have a ds1302. It's only a few $ from the link I posted on pg 1. And I don't want to order a ds1307 and have to edit the time code and make two separate versions.

The ds1307 is far more common though.

 

 

 

DS1302 Ordered! At least its cheap and ships from Georgia. Do I see some lunar cycle code in the txt file?

BTW.. if you are using this to control LDD-H drivers check out these mounting boards for the pinned versions. The guy who created the boards on RC has posted the files to have these boards created for personal use and they include a place to put in a pull down resistor so that if the controller loses power the drivers turn off instead of to 100%

 

 

http://www.reefcentral.com/forums/attachment.php?attachmentid=224562&d=1363796432

 

POST #1088

http://www.reefcentral.com/forums/showthread.php?t=2222702&page=44

Lunar cycle not in yet. That's what I'm doing right now. It will take just a few hours, before you get it.

Those boards look nice! But alas, to buy them/ order them it could cost some money.

  • Like 1
Link to comment

Lunar cycle not in yet. That's what I'm doing right now. It will take just a few hours, before you get it.

 

Sweet! will the lunar channel be one of the 6 pwms or is there room for a seperate dedicated lunar channel?

 

The LDD-H circuit boards look sick! I have 10 on order now, if you need one or two I will send them to you for free

  • Like 1
Link to comment

Sweet! will the lunar channel be one of the 6 pwms or is there room for a seperate dedicated lunar channel?

 

The LDD-H circuit boards look sick! I have 10 on order now, if you need one or two I will send them to you for free

Actually, on the first point, I was thinking that it could be one of the pwm channels and you set which one you want. That's the way probably. Although I feel like this will not look as nice. The reason I don't want a separate channel is because you would need another library to convert digital 54 (Analog 0) into a pwm channel. It wouls be easier for me, but harder for everybody else.

So when that turns off, the moon comes out. Okay.

 

Thanks for the offer on the boards, but I don't need any right now. The ldd-h I'm using for this project will be inside of the led cannon, so it's tricky to mount the boards as well.

Link to comment

Trying to minimize the lines needed for the night channel. I may just make it another lighting screen.

 

I'm testing the LDD-H drivers right now.

Link to comment
Skinnysloth

Does anyone know how many LDD drivers can one pwm channel control without frying the i/o pin? I know each Arduino i/o pin can handle up to a maximum of 40mA, but don't know how much current the LDD drivers run through the pwm signal.

  • Like 1
Link to comment

Scrapped the night cycle code. Didn't work, and was hard to manipulate.

Any ideas/ suggestions on how it should work? It originally turned on when the selected channel turned off, but that was a ton of code and wasted memory.

Link to comment

Use one of the channels at a low percentage. But when should it turn on? I'll just write to turn on after it turns off at this point.

Link to comment

You could just leave it on after the sun sets but at a very low powered state and increase the light intensity as the moon moves across the sky and then finally turning it off as the moon sets. Also would it be possible to use 2 channels? Say the royal blue and white channel to get a more desired moon light color.

  • Like 1
Link to comment

Sorry for this question of mine, but what do you use to power your controller and LEDs? I'm about to order my LEDs from ledgroupbuy but I'm unsure of which power supply to get if I use 5 LDD drivers (2 x 1000H and 3 700H). Would this be ok? http://www.ledgroupbuy.com/180w-48v-3-75a-dc-power-supply/ and how would i hook this up to the controller? I really don't have much knowledge in programing and wiring, but if there's a digram I would probably be able to follow it.

  • Like 1
Link to comment

You could just leave it on after the sun sets but at a very low powered state and increase the light intensity as the moon moves across the sky and then finally turning it off as the moon sets. Also would it be possible to use 2 channels? Say the royal blue and white channel to get a more desired moon light color.

2 channels, not a chance. I would REALLY prefer not to do that. Thanks for the input on the night cycle; I have a couple ideas for that now.

 

 

 

Sorry for this question of mine, but what do you use to power your controller and LEDs? I'm about to order my LEDs from ledgroupbuy but I'm unsure of which power supply to get if I use 5 LDD drivers (2 x 1000H and 3 700H). Would this be ok? http://www.ledgroupbuy.com/180w-48v-3-75a-dc-power-supply/ and how would i hook this up to the controller? I really don't have much knowledge in programing and wiring, but if there's a digram I would probably be able to follow it.

Power supply is a 12v laptop power supply, but I wouldn't do that due to the fact that you can only have 3 leds per string. The one you linked is too weak. You want something along the lines of 48v 5a off ebay. Just wire the + and - outputs of the driver to the meanwell drivers (+ to +, - to -) and wire ONLY a "-" output of the power supply to the Arduino ground. Is the wiring diagram a bit unclear? I'll redo it.

 

 

EDIT: Cheap power supply: http://www.ebay.com/itm/N4U8-New-48V-5A-240W-Regulated-Switching-Power-Supply-for-LED-Strip-Light-/390521637079?pt=LH_DefaultDomain_0&hash=item5aece748d7

Although the shipping time is 2 weeks. Just buzzed through the US listings and nothing with faster shipping. So two of the groupbuy power supplies if you want those. Wire the grounds together if you go that route.

Link to comment

Thanks for the new updated diagram! So off of your diagram I came up with this right here.

post-79903-0-33764700-1367300686_thumb.jpg

It doesn't specify on your diagram where each of the power lines go into both the arduino and the time keeper thing. Can you elaborate on which terminal each wire goes into? They're marked by big "?".

  • Like 1
Link to comment
jesster_rm80

I'm new to this but guessing since it is the newer version and using a touch screen lcd the code will not work for my Uno mega328 with just the push buttons.

  • Like 1
Link to comment

Thanks for the new updated diagram! So off of your diagram I came up with this right here.

attachicon.gifwiring-diagram.jpg

It doesn't specify on your diagram where each of the power lines go into both the arduino and the time keeper thing. Can you elaborate on which terminal each wire goes into? They're marked by big "?".

THANKYOUTHANKYOUTHANKYOU.

Can't thank you enough.

 

Putting that thing on the first page instead of my rectangle filled chamber pot. :P

 

Just fixed the wires you didn't know.

post-67362-0-88630400-1367357156_thumb.png

Link to comment
MOJOEJOEJOE

im doing this as a way to fade and time my light sequence. So my blue led`s are on for a total of 15 hours with 6 of those hours spent ramping up and down (int duration).

 

 

int Counter = 0; // counter that resets at midnight.
int BlueLed = 9; // blue led`s
int BlueMax = 140; // CURRENT LIMIT 12VDC INPUT
int BlueIntensity ; //VARIABLE VALUE FOR INTENSITY IF NEEDED
int BlueStart = 330; // in minutes from midnight ~~~~~~5:30am
int BluePeriod = 870;//= value/60~~~~~15 hours
//same for each channel
int Duration = 180; // time lights will take to fade on and off in minutes(3 hours)
int lastMinCounter = 0; // Storage for last minute count we processed
if(Counter != lastMinCounter)
{
if ((Counter > BlueStart || Counter > WhiteStart)
&& (Counter < BlueStart + BluePeriod || Counter < WhiteStart + WhitePeriod))
{
setLed(Counter, BlueLed, BlueStart, BluePeriod, Duration, BlueMax);
setLed(Counter, WhiteLed, WhiteStart, WhitePeriod, Duration, WhiteMax);
analogWrite(fan,FanMax);
}
  • Like 1
Link to comment

 

im doing this as a way to fade and time my light sequence. So my blue led`s are on for a total of 15 hours with 6 of those hours spent ramping up and down (int duration).

 

 

int Counter = 0; // counter that resets at midnight.
int BlueLed = 9; // blue led`s
int BlueMax = 140; // CURRENT LIMIT 12VDC INPUT
int BlueIntensity ; //VARIABLE VALUE FOR INTENSITY IF NEEDED
int BlueStart = 330; // in minutes from midnight ~~~~~~5:30am
int BluePeriod = 870;//= value/60~~~~~15 hours
//same for each channel
int Duration = 180; // time lights will take to fade on and off in minutes(3 hours)
int lastMinCounter = 0; // Storage for last minute count we processed
if(Counter != lastMinCounter)
{
if ((Counter > BlueStart || Counter > WhiteStart)
&& (Counter < BlueStart + BluePeriod || Counter < WhiteStart + WhitePeriod))
{
setLed(Counter, BlueLed, BlueStart, BluePeriod, Duration, BlueMax);
setLed(Counter, WhiteLed, WhiteStart, WhitePeriod, Duration, WhiteMax);
analogWrite(fan,FanMax);
}

Interesting. Could be blocky though, but I don't see why you can't use seconds. But what is setLed? Is it an array? Sorry, my programming skills only expand to basic syntax right now.

 

 

 

Here's mine:

if (displayhour >= onedawnonhour && displayhour <= onedawnoffhour)
  {
    onedim = ((float(((displayhour * 3600) + (displayminute * 60) + displaysecond) - ((onedawnonhour * 3600) + (onedawnonminute * 60))) /
                 (((onedawnoffhour - onedawnonhour) * 3600) + ((onedawnoffminute - onedawnonminute) * 60))) * (onemax/100));
  }
  
   
  if (displayhour >= oneduskonhour && displayhour <= oneduskoffhour) 
  {
    onedim = ((onemax/100) - ((float(((displayhour * 3600) + (displayminute * 60) + displaysecond) - ((oneduskonhour * 3600) + (oneduskonminute * 60))) /
                 (((oneduskoffhour - oneduskonhour) * 3600) + ((oneduskoffminute - oneduskonminute) * 60))) * (onemax/100)));
  }

It converts the current time into seconds, subtracts that number from the starting minute of the led cycle converted into seconds, and divides that number by the total # of seconds in the cycle. You get a decimal value between 0-1, so you just multiply by 255. onemax is a max of 25,500, so I divide that by 100 to get the 255.

 

 

To simplify that, you get any equation for dawn by using:

 

(current time) - (led start time) /

(total cycle time).

 

Dusk is the same, but it's like this:

 

(maximum led brightness) - ((current time) - (led start time) /

(total cycle time))

 

You add the (maximum led brightness) to invert what you get. The max would be between 0-1.

Link to comment

I was in the middle of temperature setting when I realized I was avoiding the night setting. And then it came to me to just set some variable for the hours on and off of the night channel using the channel that its set to. Even if you didn't understand that, it means that the night cycle will almost certainly be done today! :D

Link to comment
MOJOEJOEJOE

yeah its an array...

 

 

void setLed(int mins, // minCounter
int ledPin, // blueLed or whiteLed
int start, // blueStartMins or whiteStartMins
int period, // bluePhotoPeriod or whitePhotoPeriod
int fade, // fadeDuration
int ledMax // blueMax or whiteMax
) {
// Ramp up
if (mins > start && mins <= start + fade) {
analogWrite(ledPin, map(mins - start, 0, fade, 0, ledMax));//ramp up
return;
}
// Hold
if (mins > start + fade && mins <= start + period - fade) {
analogWrite(ledPin, ledMax); // hold current
return;
}
// Ramp down
if (mins > start + period - fade && mins <= start + period) {
analogWrite(ledPin, map(start + period - mins, fade, 0, ledMax, 0));
}
}
  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recommended Discussions

×
×
  • Create New...