Chinese LED hacking HELP!

thegasman2000

New member
So I have been running a 130w Chinese LED for few years and noticed some rust... So I dismantled it and found the case was leaking. Could explain my SPS deaths.

Anyway I am making an arduino controlled reef controller and wondered if I could bypass all the electronics in this unit and just reuse the power supplies and the array itself.

The array
https://imgur.com/pjTMOVa

The PS
https://imgur.com/Pnp4hOT

and the board I wish to do away with
https://imgur.com/YaMP09m

So I figured a couple of LED drivers and I am in business right?
 
The "power supply" you show is the LED driver..
But yes you can certainly ditch everything but just use the LED array itself provided you use the proper driver (that one is listed as 50-100VDC output at 500-550mA..)
So the Vf of the array is somewhere in that 50-100VDC range.. and your driver needs the same.. Finding one with a DC output rating of 100V and 500mA is what you want..

Note: Those are high voltage drivers and there are greater risks associated with those as they exceed SELV (safety extra low voltage ratings ) meaning that the voltage levels are sufficient to pose a real shock hazard..

Or you can just use the power supplies it comes with and PWM the output for dimming or whatever you are intending to do with them..
again.. caution.. high voltage.. not for the inexperienced (which you are.. no offense)..
 
No I totally agree I am inexperienced and a friend who is an electrician will be testing and looking over everything when its ready to hook up.

I cracked open the PS and sure enough I could see it was the driver and the power supply.
On the PCB it has a 4x connector and I think its labeled above here
https://imgur.com/a/BqERn

Ground
PWM
+12V
On/Off

Does that make sense? Can I manipulate the PWM here to dim the unit?
 
There is usually no need to open the LED driver..
I'm quite positive it has the following easy to identify wires (well easy if you haven't unhooked everything yet ;) )

AC input power (2 wires usually) many have a 3rd green ground (I see England but you still have 3 prong plugs composed of hot/neutral/ground)
DC output power( 2 wires that go to the LED board - probably red and black in color)
PWM input (1 or 2 wires that you apply a PWM signal too to dim)

So now its just a matter of figuring out if the driver needs a 5V PWM or 10V or something else..
You should be able to measure the output of the "board you wish to do away with" and see what the PWM peak voltage needs to be
 
So while looking at the driver I had determined that
https://imgur.com/fptoxlx
Is the 240V input

https://imgur.com/O7oOfln
Is the LED output

https://imgur.com/CBpxUNM
This is the Fan Connection

https://imgur.com/yJ3QTJp
And this is the connector I need to manipulate.

The labelling on the PCB isnt too clear but I think the writing above shows that the pins are

Ground
PWM
+12V
On/Off

Top to bottom.
https://imgur.com/N7sab43

So I guess I plug the PWM from the arduino into the second pin and test the V values needed to dim and turn on and off the unit?
 
you attach a GND wire from arduino to GND (pin 1 from top) and then PWM pin from arduino to PIN2 (from top)
 
Have done this to a SB reef light to control with an apex. Similar setup to what you are trying to accomplish. The PWM signal was 0-10V well more like 2 - 10V. You can't actually turn the lights off. Will have to cut power in order to do that.


Sent from my iPhone using Tapatalk
 
So I tested it with the tutorial code for fading an led with PWM and it worked a charm. I had to provide 5V to the bottom pin though. I guess this is my on and off then? Just use a digital pin for the 5V and set to high or low?

Edit:

Used this code and it works a charm.


int blueledPin = 9; // Blue LEDs connected to digital pin 9
int bluepinon = 8;
int whiteledPin = 10; // White LEDs connected to digital pin 9
int whitepinon = 7;
int bluelevel = 255;
int whitelevel = 255;
void setup() {
// nothing happens in setup
}

void loop() {
digitalWrite(bluepinon, HIGH);
analogWrite(blueledPin, bluelevel);
digitalWrite(whitepinon, HIGH);
analogWrite(whiteledPin, whitelevel);
}



Now I need to figure out some networking to allow me to change the value of the bue and whitelevel.

Thanks!
 
Last edited:
Sounds like you got it..
I'd highly suggest using an ESP8266 or ESP32 if you want to get into wifi,etc...
Get one thats a "development board" so it has the USB/serial chips,etc.. on it already and they can be programmed just like an arduino using the same IDE..
It makes wifi stuff simple as its all built into that small little chip vs needing to go with an expensive ethernet shield or a crappy enc28j60 type ethernet board..

Something like this..
http://www.ebay.com/itm/NodeMcu-Lua...%3A0d725d9b15f0a86bd4669459fffc6841%7Ciid%3A1
 
thegasman2000, you might find this useful: http://www.reefcentral.com/forums/showthread.php?p=24206611#post24206611

It shows a hack of the MarsAqua I did. I don't know if your fixtures work the same way (I am inclined to think they are quite similar given the pin out posted above, the dimming may be reversed though). But either way, it gives an example of how to isolate the electronics and shows how to implement a higher resolution PWM (14 bit versus 8 bit) on the Arduino (assuming you choose a board and pin arrangement that supports this). It also includes code to fit the dimming to a bell curve if you are interested.

If your driver does indeed use an actual PWM signal to dim, then you can drop the RC filter on the output of the optoisolator in the circuit I posted in the thread.
 
Funnily enough mcgyvr I have a nodemcu8266 which I have made into an alexa enabled relay controller. I love them and was wondering about using one but my one hangup is getting it to talk to the main Arduino of my controller.... Seems complicated!

Thanks jrhupp I am definitely looking for a nice bell curve lighting schedule.

I should add that an arduino uno is the base of my controller at the min as the esp doesnt have enough gpio. The uno wont eventually and I will need a mega :)
 
Last edited:
Funnily enough mcgyvr I have a nodemcu8266 which I have made into an alexa enabled relay controller. I love them and was wondering about using one but my one hangup is getting it to talk to the main Arduino of my controller.... Seems complicated!

Thanks jrhupp I am definitely looking for a nice bell curve lighting schedule.

I should add that an arduino uno is the base of my controller at the min as the esp doesnt have enough gpio. The uno wont eventually and I will need a mega :)
Stick an MCP23017 on the ESP via I2C and you can have as many IO pins as you like - just needs the two pins from the ESP and you can add multiple MCP23017s :)

Tim
 
I will need a mega

I've been using an Ethermega for a bunch of projects at work.. Wired ethernet is just better for my applications..and also I don't pay for it because its kind of pricey..

But yes you can easily add i2c expanders,etc...

but yes the ESP stuff is great/simple..
(and its easy to just use it as a wifi shield too)
 
I will need a mega

I've been using an Ethermega for a bunch of projects at work.. Wired ethernet is just better for my applications..and also I don't pay for it because its kind of pricey..

But yes you can easily add i2c expanders,etc... to any micro

yes the ESP stuff is great/simple..
(and its easy to just use it as a wifi shield too)
 
MCP23017 seems like it would do the trick. I wanted to try and make a pcb anyway :)

I used the Nodemcu and got the interface to: https://imgur.com/M2VCMvW

Its functional but now I need to try and figure out how to set the intensity in the interface. I have a variable in code already. I also need to checkout if the nodemcu has a rtc on it and if I can get a schedule set up. Then complicating it more by making that schedule adjustable in the interface.

edit:

Actually I am connecting it to the internet so I will just get the current time from good old google :)

Another Edit:

I managed to get the time and get it to display in both the serial monitor and on the web interface. I have no idea however how to use the time as a variable for setting a light schedule... Anyone got any advice? I just want a simple if time is after 7am turn on blues, if after 11 am turn on whites. If after 8pm turn off whites and if after 11pm turn of blues. I will fade in and out later! (this is fun :) )
 
Last edited:
I managed to get the time and get it to display in both the serial monitor and on the web interface. I have no idea however how to use the time as a variable for setting a light schedule... Anyone got any advice? I just want a simple if time is after 7am turn on blues, if after 11 am turn on whites. If after 8pm turn off whites and if after 11pm turn of blues. I will fade in and out later! (this is fun :) )

My preference for stuff like this is to convert to seconds or minutes after midnight and base my logic on that. Much more straight forward (at least to me anyway) then trying to work with human readable timestamps and it makes on/off type logic easy. Its easy for 24 hr time: (hour x 60) + minutes gets you minutes after midnight.
 
Personally I prefer to keep the time in hours and minutes where possible as it is more readable and saves messing if you are displaying it. But, to be fair, I have also used minutes since midnight, too.

Are you willing to share your code? Not necessary but would make it easier to give advice that fits in with how you have things.

Are you storing all the settings in the program? For example in an array? If so, you can simply loop thru the array from the highest value to the lowest, checking for the first you find that is lower or equal to the current time. That way you need the PWM levels associated with the time you've just matched are the ones you want :)

Tim
 
Tim I will share my code no problem its just in separate bits all over at the min. I decided to use the NodeMcu... then blew it up putting 12v through a gpio pin (dont ask) I have another on order. I have an uno to work with too and am now working on the ATO / Relay code as it doesnt need a clock and I dont have a RTC here.
 
Oops! :lmao:

I've just picked up an ESP8266 for a play whilst I'm carefully watching the updates on the ESP32 Arduino integration threads (very active development on the outstanding issues, but a hell of a lot of functionality already implemented). Got lots of Arduino nanos which is what I tend to use, but I also have a handful of the ESP32s so want to start doing some stuff with control interface via Bluetooth/web, but absolutely no experience on that - yet!

Tim
 
Back
Top