Code for power expansion module

Do you have a question on how to do something.
Ask in here.
Post Reply
bmhair03
Posts: 159
Joined: Sun Mar 20, 2011 1:22 pm

Code for power expansion module

Post 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.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for power expansion module

Post by rimai »

The power expansion can't do variable voltage.
Roberto.
bmhair03
Posts: 159
Joined: Sun Mar 20, 2011 1:22 pm

Re: Code for power expansion module

Post 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. ???
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for power expansion module

Post by rimai »

Try this:

Code: Select all

  ReefAngel.StandardFan(Box2_Port1,780,806);
  ReefAngel.StandardFan2(Box2_Port2,850,900);
Roberto.
bmhair03
Posts: 159
Joined: Sun Mar 20, 2011 1:22 pm

Re: Code for power expansion module

Post by bmhair03 »

Awesome thank you.
bmhair03
Posts: 159
Joined: Sun Mar 20, 2011 1:22 pm

Re: Code for power expansion module

Post by bmhair03 »

All my codes fail on the void setup() line ?
What could be wrong. Even the preloaded code and wizard compiled code. ??
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Code for power expansion module

Post by lnevo »

Whats the error. Are you using the RA installer package or Arduino downloaded independently
bmhair03
Posts: 159
Joined: Sun Mar 20, 2011 1:22 pm

Re: Code for power expansion module

Post 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.
bmhair03
Posts: 159
Joined: Sun Mar 20, 2011 1:22 pm

Re: Code for power expansion module

Post 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.
bmhair03
Posts: 159
Joined: Sun Mar 20, 2011 1:22 pm

Re: Code for power expansion module

Post by bmhair03 »

I got code to work. had to remove relay expansion part ,but it seems all good Thanks
Post Reply