ReefPi: Trying to figure out marsaqua light dimming

MosBronco

New Member
View Badges
Joined
Jun 6, 2020
Messages
23
Reaction score
16
Rating - 0%
0   0   0
ive combed through threads for hours and im still unsure if the i need to a dac or a special board to dim my mars aqua lights. Im ok with them not turning off completely when dimming and using a outlet to turn them off. its how i have my current reefkeeper setup and i like knowing that they are completely off at night.would this work with a mars aqua light? as the mars aqua has 4 pins and not the three listed. its the exact dimmer as this but im having trouble understanding the solution that they found. any help on a simple solution would be appreciated.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Welcome to reef2reef!

I use a bunch of Mars Aqua lights on my tank and control them with reef-pi. You do need some additional circuitry to make it work though. Here's my thread on modding my fixtures to work with reef-pi. I took this approach.
upload_2019-3-16_22-34-7-png.1010884


There are 2 parts to controlling these lights, as you've pointed out.

1. on/off: As you've stated, you can do this with relays or switched outlets. You can also control this using a transistor to connect V+ to the on/off pin.

2. Intensity: Intensity is controlled by a 0-10v analog signal, similar to an old-school dimmer switch on a light (sort of). rpi (and therefor reef-pi) does not have any analog outputs, but you can generate PWM output. This is kind of like flipping a regular switch on and off real fast instead of using a dimmer switch.

There are plenty of ways to convert PWM to analog. A DAC is a possibility, but a simple Low Pass RC Filter is sufficient (and much cheaper/easier) for Mars Aqua lights. It basically determines the average output based on PWM duty cycle. If you have a 5v PWM signal at 50%, then it can be filtered to a 2.5v analog signal (5.0 * 0.5 = 2.5). A 10% duty cycle would be 0.5v (5.0 * 0.1 = 0.5).

The signal would also need to be boosted to a 10v range. This can be done using a regulator and transistor as shown in your link, or an op-amp to amplify it. I'm sure there are other ways, but these are the common techniques.
 
OP
OP
M

MosBronco

New Member
View Badges
Joined
Jun 6, 2020
Messages
23
Reaction score
16
Rating - 0%
0   0   0
@Michael Lane is their any part list/schematic you can point me towards for a low pass filter? it seems like i can find something like these everywhere for digital analog but nothing on low pass filtering, it jsut seems like im missing something if low pass rc filter is easier.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Digital to analog can be an application of a low pass filter. The part you linked to seems to be a dedicated ADC and DAC in one, but would not be compatible with reef-pi at this time. It would also need something to amplify the output into 0-10v. If you are looking for a module that ONLY converts from PWM to 0-10v analog, this might do the job for a single channel, but it depends on your voltage and frequency. I haven't tried it, and I'm not recommending it, but it's closer to what you are looking for than the module you linked.

Here's an annotated excerpt from my schematic on that part. I used a 20k resistors and 4.7uF ceramic capacitor as the low pass filter. This is only for one channel, but the other channel is the same.

1591543601122.png
 
OP
OP
M

MosBronco

New Member
View Badges
Joined
Jun 6, 2020
Messages
23
Reaction score
16
Rating - 0%
0   0   0
@Michael Lane lets pretend im a complete novice at reading electrical schematics lol.
Are the 100k(r16,r17,r18) and 300k (r14) resistors?
can all the grounds share a common ground.
if the INPUT is from the reef pi pwm and the output would go to either the blue or white channel would the j6 connector just be for power to power the circuit. if this is correct and im sure im missing something what is pin 2 for?

thanks for your help i really appreciate it
 
OP
OP
M

MosBronco

New Member
View Badges
Joined
Jun 6, 2020
Messages
23
Reaction score
16
Rating - 0%
0   0   0
also at this point i just wish your boards were in stock so i could order two but instead i ordered two of these wish me luck i guess.
 
Last edited:

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
@Michael Lane lets pretend im a complete novice at reading electrical schematics lol.
Are the 100k(r16,r17,r18) and 300k (r14) resistors?
can all the grounds share a common ground.
if the INPUT is from the reef pi pwm and the output would go to either the blue or white channel would the j6 connector just be for power to power the circuit. if this is correct and im sure im missing something what is pin 2 for?

thanks for your help i really appreciate it
The resistors you called out are, in fact, all connected to a common ground. In general, any symbol on a schematic with the same label can be connected in common. You'll often see this with Vcc, Vdd, GND, basically most power rails. If they should not be connected, then they will have different labels. Here's a snippet from my isolated pH board that shows a case where grounds cannot be common.

1591555780847.png


That diagram probably shows more information than needed. Pin 2 on the configuration header is always connected since it is connected to a jumper. It's not actually where the inputs are connected.

I've assembled a batch of my adapter boards, but have not listed them yet. I still have a few that need to go through QA to make sure they don't have any defects. They should be available again within the next couple of days.

I'm happy to help understanding circuits and schematics as much as I can. I've found electronics to be a very fulfilling hobby. Feel free to post any specific questions.
 
OP
OP
M

MosBronco

New Member
View Badges
Joined
Jun 6, 2020
Messages
23
Reaction score
16
Rating - 0%
0   0   0
The resistors you called out are, in fact, all connected to a common ground. In general, any symbol on a schematic with the same label can be connected in common. You'll often see this with Vcc, Vdd, GND, basically most power rails. If they should not be connected, then they will have different labels. Here's a snippet from my isolated pH board that shows a case where grounds cannot be common.

1591555780847.png


That diagram probably shows more information than needed. Pin 2 on the configuration header is always connected since it is connected to a jumper. It's not actually where the inputs are connected.

I've assembled a batch of my adapter boards, but have not listed them yet. I still have a few that need to go through QA to make sure they don't have any defects. They should be available again within the next couple of days.

I'm happy to help understanding circuits and schematics as much as I can. I've found electronics to be a very fulfilling hobby. Feel free to post any specific questions.

ill keep an eye out for your boards i joined the waiting list so hopefully ill get an alert when they come in stock.
i really enjoy building things but it seems im stuck in the learning curve. im hoping the boards i ordered will work but if your become available ill definitely return these ones
 

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: 22 29.7%
  • I occasionally change the food that I feed to the tank.

    Votes: 27 36.5%
  • I rarely change the food that I feed to the tank.

    Votes: 19 25.7%
  • I never change the food that I feed to the tank.

    Votes: 5 6.8%
  • Other.

    Votes: 1 1.4%
Back
Top