Page 1 of 1
Code for power expansion module
Posted: Tue Aug 16, 2016 2:58 pm
by bmhair03
Hey everyone .Just wondering if someone can help me write some code for my Power expansion.
Id like to control 2 fans that turn on due to the temp sensors.
Fan1 turn on if temp1 reaches 80.6F and turns off at 78.9F
Fan2 turn on if temp2 reaches 90.0F and turns off at 85F
Ideal for fan 2 would be a ramp up %. 50%(6vdc) at 85.0F and 100%(12vdc) at 90.0F
If anyone could help me with this or point me in the right direction I'd be stoaked.
Re: Code for power expansion module
Posted: Tue Aug 16, 2016 3:03 pm
by rimai
The power expansion can't do variable voltage.
Re: Code for power expansion module
Posted: Tue Aug 16, 2016 7:55 pm
by bmhair03
Ok that settled. Now how would I code it for just off and on. Example codes ?I searched and can't find anything. I have a expansion relay also. I set switches. ???
Re: Code for power expansion module
Posted: Tue Aug 16, 2016 8:23 pm
by rimai
Try this:
Code: Select all
ReefAngel.StandardFan(Box2_Port1,780,806);
ReefAngel.StandardFan2(Box2_Port2,850,900);
Re: Code for power expansion module
Posted: Thu Aug 18, 2016 9:17 am
by bmhair03
Awesome thank you.
Re: Code for power expansion module
Posted: Thu Aug 18, 2016 7:25 pm
by bmhair03
All my codes fail on the void setup() line ?
What could be wrong. Even the preloaded code and wizard compiled code. ??
Re: Code for power expansion module
Posted: Thu Aug 18, 2016 7:53 pm
by lnevo
Whats the error. Are you using the RA installer package or Arduino downloaded independently
Re: Code for power expansion module
Posted: Fri Aug 19, 2016 1:09 pm
by bmhair03
It was an error in the void setup() line. On all codes I tried to compile..It seems to work now.Thank you for the reply.
Re: Code for power expansion module
Posted: Fri Aug 19, 2016 9:37 pm
by bmhair03
I entered the above 2 lines off code. And the fans do not turn on. The status of the socket does change with the temp changes but no output from module?Interesting I have 1-8 11-18. 21-28 on my display . 21-22 are the ones that toggle. I have the module plugged directly into main box. Would I need to change code because Im not using expansion relay and expansion hub? Didn't want to mess with code. Plan on replacing burnt parts soon. Thanks.
Re: Code for power expansion module
Posted: Sat Aug 20, 2016 12:01 pm
by bmhair03
I got code to work. had to remove relay expansion part ,but it seems all good Thanks