Mars Aqua Chinese black box PWM Converter

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
The Mars Aqua lights have been out for a pretty long time, and there are already plenty of examples of modding them to be controlled with 0-10v analog or pwm. They usually seem to be destructive and still require a timer to actually turn the lights on and off. I came up with the following design a couple of years ago.
upload_2019-3-16_22-34-7.png


This takes the pwm and pretty much filters it into an analog voltage. The op-amp scales to 0-10v analog and drives the dim function in the light. The comparator switches the the light off under the threshold voltage.

I made these as the first round of prototypes. They daisy chain together and were originally integrated with a bunch of DIY led lights with 6 channels (which is why it uses ethernet connector)
ySn3enT.jpg


At that time I had a mix of DIY and mars aqua lights. After a few more failures of my DIY lights, I've ended up with 8 Mars Aqua lights. Making these by hand is a pain and solder mask is SUPER HELPFUL! A few of the lights have the hand made version (2 in each, 1 for each channel), but the rest have pcbs ordered from JLCPCB. I still had to make a few bodges.
NTOZqwR.jpg


The bodges solve a problem where the comparator wasn't turning the lights off at the right time. @lotus02 has also recently identified an issue that my boards also experienced, but I never realized. At certain levels (around 30% on my setup), the fans whine and don't reach full speed since they are oscillating on and off at the PWM frequency.

I'm planning to redesign these boards, so I only need one for each light, fix the whine, and get rid of the bodges.
 
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
Neat. So, is there a recommended pwm frequency ?
Generally, you want higher frequency with a low pass filter. In the case of pca9685, 1.5 kHz is recommended, and that's why my design will be optimized for. I'm just getting started with using an oscilloscope, so it will be interesting to measure the performance at various frequencies.
 
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 measured the following behavior on the lights I have.

Voltage when lights are on at minimum is 0.665 v
Voltage when lights are on at maximum is 10.11 v
The fans turn on at 4.5 v
While off V+ is around 9.1 v
While on V+ is 12.0 v
2.4 mA current flows through Von/off

The variation in V+ while on and off was the reason for the bodges. I had designed the comparator expecting 12v to switch it on and off. It would try to switch at too low of a voltage. I've designed in a zener diode to hopefully fix that problem.
 
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've made a bit of progress on the new design, and encountered a couple of unexpected issues. I populated a board and it didn't work. I was able to fade the lights up and down, but they wouldn't turn off when dialed down. After hours of troubleshooting, I finally realized there was a defect on the pcb. The comparator wasn't connected to voltage or ground! I finally got it working after a couple of bodge wires and a change to the on/off threshold.
nhoqBeR.jpg


Although the minimum voltage when running the lights was recorded as 0.6v, the minimum with this circuit is aroung 0.9v. I have a new design on the way which fixes the need for bodge wires. This design supports 3.3v or 5v pwm signal selected by jumpers at the top of the board.

Now I'm just waiting for the boards to arrive...
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I've made a bit of progress on the new design, and encountered a couple of unexpected issues. I populated a board and it didn't work. I was able to fade the lights up and down, but they wouldn't turn off when dialed down. After hours of troubleshooting, I finally realized there was a defect on the pcb. The comparator wasn't connected to voltage or ground! I finally got it working after a couple of bodge wires and a change to the on/off threshold.
nhoqBeR.jpg


Although the minimum voltage when running the lights was recorded as 0.6v, the minimum with this circuit is aroung 0.9v. I have a new design on the way which fixes the need for bodge wires. This design supports 3.3v or 5v pwm signal selected by jumpers at the top of the board.

Now I'm just waiting for the boards to arrive...
This is awesome. Do you know if this board will work for viparspectra or any other black box ?
 
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
This is awesome. Do you know if this board will work for viparspectra or any other black box ?
Good question. This design should work for any light that uses 0-10v analog dimming. I'm not sure how the other lights work, but I would be surprised if other black box LED lights worked differently. If anyone has some of the other lights, I'd like to see what they look like inside.
 

Matt Carden

Valuable Member
View Badges
Joined
Apr 13, 2018
Messages
1,641
Reaction score
4,084
Location
Detroit Metro
Rating - 0%
0   0   0
I will definitely be interested in picking up one of these boards to run my SB reeflights basic lights. They have already been modded to work with a 2.5mm audio cable. I am currently using AA batteries in series(?). In about a month I will be getting your v2 board unless you have some v3s ready and would like to get this new board also to start my reef-pi project.
 
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 will definitely be interested in picking up one of these boards to run my SB reeflights basic lights. They have already been modded to work with a 2.5mm audio cable. I am currently using AA batteries in series(?). In about a month I will be getting your v2 board unless you have some v3s ready and would like to get this new board also to start my reef-pi project.

I'm not familiar with the SB reeflights, but it should work as long as the on/off threshold is around 0.9v. Do you have a post showing how you are using the AA batteries?

I'll probably have a few v3 reef-pi hats available in a week or so. They take a while to build, and I've been procrastinating on the documentation.
 
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
How do you like the black versus the green on the PCBs? I'm going to order from JLCPCB soon and was considering black or blue for a couple designs.
The quality of the black pcbs seems fine. It's much more difficult to visually inspect the traces since the matte black doesn't look much different over the copper. I also feel like flux residue stands out more. On the other hand, cleaning the board doesn't seem to cause a bit of haze as it does with the glossy green boards. All in all, I like it better for the same price, although I still might order standard green for initial orders since it is easier to see defects.
 

Matt Carden

Valuable Member
View Badges
Joined
Apr 13, 2018
Messages
1,641
Reaction score
4,084
Location
Detroit Metro
Rating - 0%
0   0   0
I'm not familiar with the SB reeflights, but it should work as long as the on/off threshold is around 0.9v. Do you have a post showing how you are using the AA batteries?

I'll probably have a few v3 reef-pi hats available in a week or so. They take a while to build, and I've been procrastinating on the documentation.
It's my understanding that I have to shut them off at the switch. Probably accomplish that with a solid state relay which I will be using some for on/off control of heaters, pumps, etc.

I am planning on eliminating the separate converters for my pumps and powerheads in favor of a unit like this:
https://www.google.com/url?sa=t&sou...FjAAegQIBRAC&usg=AOvVaw0e8fBrD4ZIlLGm4fMgdWZu

I will be able to eliminate some extra corrosion points which I've found out in the last 6 months is a big problem.
 
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
It's my understanding that I have to shut them off at the switch. Probably accomplish that with a solid state relay which I will be using some for on/off control of heaters, pumps, etc.

I am planning on eliminating the separate converters for my pumps and powerheads in favor of a unit like this:
https://www.google.com/url?sa=t&sou...FjAAegQIBRAC&usg=AOvVaw0e8fBrD4ZIlLGm4fMgdWZu

I will be able to eliminate some extra corrosion points which I've found out in the last 6 months is a big problem.
This board is designed to eliminate the need for extra relays to turn the light on an off. That was one of my main motivators. For Mars Aqua, when it gets down to 10% the lights turn off. They turn on above 11%. It also depends on 12v power provided by the lights.

If you can send me some pictures of the inside of your SB reeflights, maybe we can determine if they are compatible with the Mars Aqua lights.
 
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
Nice work !
i did some board using dirtypcbs service and also oshpark, both did a good job.

will you sell these boards ?

i would be really interrested.

Thanks !
I've never tried dirtypcbs, but I liked oshpark. They're just a bit expensive compared to other services.

It seems like I'm always out of connectors. I have a small batch of these boards almost ready, I'm just waiting for a couple more sets of JST connectors. I'm replacing the old versions of this board in a couple of my lights, but I'll have a handful of extras that I'll put up on Tindie.

I'll also have to disrupt my fish and coral by taking one of the lights down in order to calibrate the on/off functionality. The Mars Aqua driver doesn't provide a full 12v when the lights are off, and seem to inject some voltage back into the output of the op-amp, so the calculated values don't work the way I'd like them to. I included 2 trimpots on each board to dial it in and work exactly right.

The design is open source and I have the Kicad files on github at https://github.com/ranthalion/mars-aqua. I also have gerbers exported if you'd like to give it a try. The small components were intimidating at first, but a set of tweezers and a cheap magnifying head lamp help a lot.
 

Jean-Pierre Renaud

Community Member
View Badges
Joined
Feb 7, 2018
Messages
49
Reaction score
39
Location
Blainville
Rating - 0%
0   0   0
I've never tried dirtypcbs, but I liked oshpark. They're just a bit expensive compared to other services.

It seems like I'm always out of connectors. I have a small batch of these boards almost ready, I'm just waiting for a couple more sets of JST connectors. I'm replacing the old versions of this board in a couple of my lights, but I'll have a handful of extras that I'll put up on Tindie.

I'll also have to disrupt my fish and coral by taking one of the lights down in order to calibrate the on/off functionality. The Mars Aqua driver doesn't provide a full 12v when the lights are off, and seem to inject some voltage back into the output of the op-amp, so the calculated values don't work the way I'd like them to. I included 2 trimpots on each board to dial it in and work exactly right.

The design is open source and I have the Kicad files on github at https://github.com/ranthalion/mars-aqua. I also have gerbers exported if you'd like to give it a try. The small components were intimidating at first, but a set of tweezers and a cheap magnifying head lamp help a lot.

Thanks, i did some boards before and also some SMD conponent soldering, i have a hot air station and am very good at soldering.

i will look into the open source project !

Thanks and again, great work !
 

Algae invading algae: Have you had unwanted algae in your good macroalgae?

  • I regularly have unwanted algae in my macroalgae.

    Votes: 18 34.0%
  • I occasionally have unwanted algae in my macroalgae.

    Votes: 11 20.8%
  • I rarely have unwanted algae in my macroalgae.

    Votes: 4 7.5%
  • I never have unwanted algae in my macroalgae.

    Votes: 5 9.4%
  • I don’t have macroalgae.

    Votes: 14 26.4%
  • Other.

    Votes: 1 1.9%
Back
Top