Controlling Viparspectra Lights

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
I was inspired by @AbjectMaelstroM's reef-pi thread controlling Viparspectra lights and @ph123uk's thread controlling Viparspectra. I picked up a couple of lights recently and I'm finally getting around to checking them out.

I spent a bit of time characterizing the lights today. Of course, I found the same things the others found as well, which is good news. The documentation on the board matches the pin out.
vipar-board.jpg


The light uses 200 Hz PWM at 3.3v.
waveform.jpg


It also works at other frequencies; I tested 100 Hz - 3 kHz. It flashes once you get a bit below 100 Hz. I also noticed that the same duty cycle at higher frequencies resulted in brighter output. So that sounds like it is using an RC filter internally.

The only thing that doesn't make much sense to me is that I measured 3v on the On/Off pin. It seems that others have simply bridged it to 12v. I confirmed that connecting it GND shuts off the light, and that providing 3.3v turns the light back on. I'm not sure if 12v on that pin would be potentially damaging.

I'm feeling pretty good about this light, except that the 1% setting is still pretty bright. I haven't tried dimming between 0 and 1% yet. I plan to work on a conversion board over the next couple of weeks to get these lights over my 2 side tanks.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,966
Reaction score
3,360
Location
Sacramento, CA area
Rating - 0%
0   0   0
It also works at other frequencies; I tested 100 Hz - 3 kHz. It flashes once you get a bit below 100 Hz. I also noticed that the same duty cycle at higher frequencies resulted in brighter output. So that sounds like it is using an RC filter internally.

Actually you're probably at the limit of the control loop or switching speed. You usually want the dimming signal an order of magnitude lower than the actual DC/DC speed.
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Actually you're probably at the limit of the control loop or switching speed. You usually want the dimming signal an order of magnitude lower than the actual DC/DC speed.
That makes a lot more sense. As soon as I went to bed last night, I thought it didn't sound right. I figured something was not getting enough time to fully turn off before the cycle starts over.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
That makes a lot more sense. As soon as I went to bed last night, I thought it didn't sound right. I figured something was not getting enough time to fully turn off before the cycle starts over.
Following along...potentially switching from my beamsworks to a viparspectra for planted tank with the blues turned way down. Are these the bluetooth controllable viparspectra on amazon?
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Following along...potentially switching from my beamsworks to a viparspectra for planted tank with the blues turned way down. Are these the bluetooth controllable viparspectra on amazon?
I haven't seen the bluetooth viparspectra lights. This is the 165 watt light.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Ah ok...im wondering if just one 300w would work on a 75 gallon freshwater. The light is 32" long...if I hang it a foot above the tank and have to whites at 100 percent amd blues on just a little I wonder if id get 100 par everywhere on the bottom.
 

MattB69

Community Member
View Badges
Joined
Mar 12, 2019
Messages
28
Reaction score
33
Rating - 0%
0   0   0
Following as I've been studying up on the Reef-Pi as well and think I'm going to move forward with it...I've had the 165 for just over a year. Nice light. A little more control would be great. You are right about them being very bright at 1%. I'm interested to see if you get it to dim less than the 1% through the controller.
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
I made a bit of progress on this today. Basically, this is just using a peak detector and comparator to control the lights. The input is expected to be 3.3v pwm between 100 Hz and 1 kHz (200 Hz is ideal). I also tested with 5v pwm and it seemed to work fine.

Here's the schematic showing 2 channels of peak detector and comparator, and a 3.3v reference voltage used to set the comparator threshold and supply 3.3v to the on/off pin.
1584316839320.png

I put together a test board loosely based on the above schematic.

1584318006755.png
1584318027180.png


I made a lazy mistake and set the threshold for the comparator too high (just using 2 100k resistors). It resulted in flashing at lower frequencies and low duty cycles. Yellow represents the pwm signal and blue represents the on/off signal.

1584318083099.png


After I fixed that with a 10k resistor, I tested it for a while with duty cycle from 0.1% - 100%. It worked perfectly for me all the way down to 0.1%. It starts to get a little flaky below 0.1%; the lights turn off, but the fan stays on until it really gets close to 0 duty cycle. Overall, I'm very happy with it so far.

1584318263315.png


I believe all of these parts are available in through hole components if anyone want to make one on protoboard. It might even be a fun, practical kit.
 

Badfish2too

Community Member
View Badges
Joined
Nov 12, 2018
Messages
83
Reaction score
66
Rating - 0%
0   0   0
Do you possibly have the updated parts list for this? Is the schematic correct? And when you ere testing it, what were you using to give the signal to the lights?
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I made a bit of progress on this today. Basically, this is just using a peak detector and comparator to control the lights. The input is expected to be 3.3v pwm between 100 Hz and 1 kHz (200 Hz is ideal). I also tested with 5v pwm and it seemed to work fine.

Here's the schematic showing 2 channels of peak detector and comparator, and a 3.3v reference voltage used to set the comparator threshold and supply 3.3v to the on/off pin.
1584316839320.png

I put together a test board loosely based on the above schematic.

1584318006755.png
1584318027180.png


I made a lazy mistake and set the threshold for the comparator too high (just using 2 100k resistors). It resulted in flashing at lower frequencies and low duty cycles. Yellow represents the pwm signal and blue represents the on/off signal.

1584318083099.png


After I fixed that with a 10k resistor, I tested it for a while with duty cycle from 0.1% - 100%. It worked perfectly for me all the way down to 0.1%. It starts to get a little flaky below 0.1%; the lights turn off, but the fan stays on until it really gets close to 0 duty cycle. Overall, I'm very happy with it so far.

1584318263315.png


I believe all of these parts are available in through hole components if anyone want to make one on protoboard. It might even be a fun, practical kit.
I have sleeves of thru hole lm393's left over from a former job. Be pretty easy to whip up on a protoboard
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Do you possibly have the updated parts list for this? Is the schematic correct? And when you ere testing it, what were you using to give the signal to the lights?
It looks like you already have it figured out.

The schematic is correct, but I don't have a BOM generated for it yet. The values on the components are good though.

I tested using an inexpensive signal generator. It looks like the price on it has gone way up. I don't really recommend it (especially at that price) since the voltage setting it isn't very accurate. I always have to tune it using the oscilloscope.
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Any plan to make a module to plug straight into the ML hat ;) for this device.
I need to have a few made for my lights. Things have been a bit chaotic lately, but I expect to put in a new parts order in the next few days.
 

Badfish2too

Community Member
View Badges
Joined
Nov 12, 2018
Messages
83
Reaction score
66
Rating - 0%
0   0   0
It looks like you already have it figured out.

The schematic is correct, but I don't have a BOM generated for it yet. The values on the components are good though.

I tested using an inexpensive signal generator. It looks like the price on it has gone way up. I don't really recommend it (especially at that price) since the voltage setting it isn't very accurate. I always have to tune it using the oscilloscope.
If you end up making a list, I could always double check ha. I might have to wait until after my quarantine is over to get parts. Otherwise it looks like I would be buying kits to get a few parts shipped
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
I finally got my boards! I assembled and tested a few tonight and it's looking good. Hopefully, I'll have some time to hang the viparspectra lights tomorrow.

Here's a couple of boards assembled. They have white and blue channel output (CH1 and CH2). These boards also support daisy chaining, so I can chain 2 pwm signals to multiple lights.
IMG_20200506_222403.jpg


Here's a preview of testing the boards. I'm excited to get them installed soon!
IMG_20200506_222137.jpg


The project is on github at https://github.com/Ranthalion/viparspectra-adapter.
 

JT26

Community Member
View Badges
Joined
Jun 24, 2019
Messages
51
Reaction score
42
Rating - 0%
0   0   0
I finally got my boards! I assembled and tested a few tonight and it's looking good. Hopefully, I'll have some time to hang the viparspectra lights tomorrow.

Here's a couple of boards assembled. They have white and blue channel output (CH1 and CH2). These boards also support daisy chaining, so I can chain 2 pwm signals to multiple lights.
IMG_20200506_222403.jpg


Here's a preview of testing the boards. I'm excited to get them installed soon!
IMG_20200506_222137.jpg


The project is on github at https://github.com/Ranthalion/viparspectra-adapter.
Can’t wait for the test and release .
 

When to mix up fish meal: When was the last time you tried a different brand of food for your reef?

  • I regularly change the food that I feed to the tank.

    Votes: 29 27.4%
  • I occasionally change the food that I feed to the tank.

    Votes: 35 33.0%
  • I rarely change the food that I feed to the tank.

    Votes: 33 31.1%
  • I never change the food that I feed to the tank.

    Votes: 7 6.6%
  • Other.

    Votes: 2 1.9%
Back
Top