Page 2 of 2

Re: PWM Expansion

Posted: Wed Mar 28, 2012 6:21 pm
by rimai
Yes, the (-) of the power supply goes to the GND on the PWM expansion

PWM Expansion

Posted: Thu Mar 29, 2012 7:21 am
by joaocdestro
Why my PWM is above 100%?

Re: PWM Expansion

Posted: Thu Mar 29, 2012 7:58 am
by rimai
It will happen when you setup the PWMSlope to go above 100.

Re: PWM Expansion

Posted: Mon Apr 16, 2012 12:42 am
by JNieuwenhuizen
rimai wrote:1. No
2. 2nd Gen relay boxes have a usb like connector on the side of the box that you can use to connect one expansion module or the expansion hub.
3. All expansion modules can be plugged into the hub. Currently there are Relay, PWM and I/O expansion modules. Some are only on special order basis for now.
4. The PWM expansion module is a little tiny box with 6 boosted independent PWM channels. It has another 328p inside of it working as a slave. You can communicate with it through I2C. I decided to make it with another 328p in slave mode to take the load of lighting effects off of the master head unit.
So, it is very simple to call any effect that you may want or even change effects if one would like to.
Attached is the PDE file that is loaded into the PWM expansion module.
One could actually very easily turn it into a stand-alone 6 channel PWM controller, by just modifying the code.
To call the effects on the module, you can issue the following commands:

Change individual channel, where x is a number from 0 to 5, which represent which channel you would like to change and y is the a number from 0 to 255, which represent the PWM duty cycle.

Code: Select all

PWMExpansion(x,y);
For Fast Cloud

Code: Select all

PWMExpansion(6,1);
For Slow Cloud

Code: Select all

PWMExpansion(6,15);
For Thunderstorm 1 (preset pattern)

Code: Select all

PWMExpansion(7,0);
For Thunderstorm 2 (random pattern)

Code: Select all

PWMExpansion(8,0);
Hi Roberto.

I am confused - The code I am using is from another user, he has it as a PWM pde. I used it in my pde file all combined. Is it best practise to use it on the pwm only? if so, how do you load the file on your pwm?

My complete pde is here : http://forum.reefangel.com/viewtopic.ph ... 9&start=10

Re: PWM Expansion

Posted: Mon Apr 16, 2012 8:25 am
by rimai
No. You can use it anywhere you want.
The problem is that if you had the standard RA, you would not have space for the code.
That's why this person has divided the code into PWM module code and RA code.
Because you have so much memory in your RA+, you can keep everything in the RA side and leave the PWM expansion module as is.

Re: PWM Expansion

Posted: Mon Apr 16, 2012 11:21 pm
by JNieuwenhuizen
Thank You for the info Roberto.