I participate at other sites and I love tinkering with electronics. I have been following a discussion on 3 in 1 Dimming capabilities and what it is useful for.
For me, I found out how to use an arduino device; Storm, Typhon, or arduino uno; to dim led fixtures identical to the ones we DIY here with meanwell HLG series of dimmable drivers.
The article talks about many features, but there is an entire article elsewhere about not only dimming but also turning on/off HLG series of drivers already available in Europe, but not in the USA.
I bought the kit and assembled it and tested it today with my coralux storm controller and it works. Next I will build a duplex outlet box with two power controllers on the outside to control turning lights on/off, dim, and dim Far Red, Deep Red, IR, and Royal Blue, all controlled from one console for two rooms. The unit uses a 5v dc signal from any arduino device.
I hope this helps others and they can learn from this, as well
peace
AL
SO I have narrowed down my choices. I found this unit at adafruit for controlling circuits and it is tested and has a warranty. ->https://www.adafruit.com/products/2935
I am now working on the code for the arduino to power and control the lights and timers, with four to six pwm outputs to control receptacles like this one and led lights directly.
I am working on a grow room controller similar to the Coralux controller for aquariums, but not modified for grow rooms, but totally re-worked and designed with our needs in mind, alone. peace
I have been busy. I have been experimenting with various lcd screens and interfaces. I am liking the arduifruit i2c lcd shield. I am also using a dht11 temp/humidity sensor. I have some code completed in arduino sketch format to share. peace
#define DHT11_PIN 0 // ADC0 Analog pin A0
// include the library code:
#include <Wire.h>
#include <Adafruit_RGBLCDShield.h>
#include <utility/Adafruit_MCP23017.h>
// The shield uses the I2C SCL and SDA pins. On classic Arduinos
// this is Analog 4 and 5 so you can't use those for analogRead() anymore
// However, you can connect other I2C sensors to the I2C bus and share
// the I2C bus.
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
// These #defines make it easy to set the backlight color
#define RED 0x1
int LCD_C=16;
int LCD_R=2;
int dhtTemp=0;
int dhtHumidity=0;
delayMicroseconds(80);// now ready for data reception
for (i=0; i<5; i++)
dht11_dat = read_dht11_dat();
DDRC |= _BV(DHT11_PIN);
PORTC |= _BV(DHT11_PIN);
byte dht11_check_sum = dht11_dat[0]+dht11_dat[1]+dht11_dat[2]+dht11_dat[3];// check check_sum
if(dht11_dat[4]!= dht11_check_sum)
{
Serial.println("DHT11 checksum error");
}
dhtTemp=(int)round(1.8*dht11_dat[2]+32);
dhtHumidity=(int) dht11_dat[0];
} // end read data
---------------------------
This code will get the current temperature and humidity and print it out on the lcd screen. Obviously it does not have to report so often, and can report based on an interrupt process, which is much more elegant. Avid
Here is a link to the shield kit I am going to use for two reason. 1. it only needs four pins and 23 it has 5 buttins for navigation purposes. ->https://www.adafruit.com/products/715
Here is the code to control the shield.
/*********************
i2C RGB LCD Shield with 5 buttons and display
**********************/
// include the library code:
#include <Wire.h>
#include <Adafruit_RGBLCDShield.h>
#include <utility/Adafruit_MCP23017.h>
// The shield uses the I2C SCL and SDA pins. On classic Arduinos
// this is Analog 4 and 5 so you can't use those for analogRead() anymore
// However, you can connect other I2C sensors to the I2C bus and share
// the I2C bus.
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
// These #defines make it easy to set the backlight color
#define RED 0x1
#define YELLOW 0x3
#define GREEN 0x2
#define TEAL 0x6
#define BLUE 0x4
#define VIOLET 0x5
#define WHITE 0x7
// setup variables
int LCD_C=16;
int LCD_R=2;
int time=0;
uint8_t i=0;
// setup
void setup() {
// Debugging output
SPrintBegin();
// set up the LCD's number of columns and rows:
PrintBegin();
PrintMessage();
// Print a message to the LCD. We track how long it takes since
// this library has been optimized a bit and we're proud of it :)
lcd.print("Hello, world!");
GetTime();
}// end setup
// loop
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
ReadButtons();
Time for another update. I have a picture of the ArduinoMega2560 running the basic code set now. The sketch is running the main menu system and gathers date, tine, temperature and humidity as the main screen. menu's are accessed through hitting the select button, i.e. push the button vice left,right, up, down.
I have attached a picture of the GrowGreen LED Controller with the proposed lcd screen shield and arduino meg2560. enjoy Avid
The output pins are PWM pins 3,4,5,9,10,11, a six channel PWM driver to turn on/Off. The program display the first four channels as the LCD does not have enough room to display six channels. All six channels are set for 6:am start and 6:pm finish. times are adjustable and are maintained even when power off. After power re-start the Controller picks up right where it left of at the current time and date with the lights running just as they were set initially by the user. Each channels is adjustable and separate from each other.
I have attached a picture of the working model. I am still working on a container for the project to mount the lcd on teh surface and place the components on the inside and put a six pin PWM plug on the outside along with a 12v dc power hole for the unit power. A 12v power supply is required which is available from adafruit or others that sell arduino's. peace
latest update: I have completed the basic model the six channel PWM driver using the Arduino Uno, Rev 3. adafruit lcd button shield, DS1307 RTC, and a DHT11-optional. I am awaiting the case and some parts to package it together. i use mine on a sheet of plexiglass along with the LDD-6 Driver Board from Coralux, and the MW 48v power supply. I run cables using security cable; two wire; from the LDD driver board to the LED light dimmer circuit on the driver and the Relay switch, using a y tap for the five volt signal. I directly control the dimming and on/off capability of both CoB's and LED's. My settings are remembered even after power off. The clock resets itself to the current time it went offline and continues from there. if you spent hours offline, you will have to reset the time to the current time, but the cycles will continue as if there was no power outage.
I also have developed a twelve channel PWM driver using the exact same components. I have written two sketches for eth Arduino Uno rev 3. One is called the GrowGreen.ino and the other is called GrowGreen12Channel.ino. Both are available at this location on Github ->https://github.com/AvidLerner/GrowGreen If you buy the components as follows you can build either the six or twelve PWM channel unit as desired.:
I will provide a video in the next week or so, showing the system and it's operation. until then have fun building your own unit. I will provide DIY kits with the code loaded, unit assembled, and tested.
As soon as I get the case in, I will provide a video for you folks. My setup is running two 200w LED lights, a Royal blue channel , Deep Red. IR channels and a Far Red channel at various times and lumen levels. 24/7 and I already went through a power outage and recovered. i just had to reset my clock after being offline for hours. peace Avid
cleaned up the code. removed he dht11 and redesigned he screen and stopped some lcd screen corruption that was occurring over time. newest version avail;be at the same link.
peace Avid
Finished version 2 with a 20x4 lcd screen, Uno platform, DS32331 RTC, and a rotary encoder to access and change parameters for time and eight channels PWM control for COB's or led's using a beefcake relay fixture mounted, adafruit relay outlet, or LDD driver boards used for dimmabele LDD drivers for 3W led's. peace Avid
So I have completed the design and build of the LED controller. It works great and I laser cut my own cases. Just like the one you see above. PM me if you are interested in having one built. peace Avid
For those aware or not aware, there is an issue of 5v pwm dimming versus 10v pwm dimming. 5v dimming is good for buck led drivers, LDD drivers using a driver board. Mean Well LED Drivers uses a 10v dimming circuit alien to Arduino and it's 5v pwm dimming signal. I resolved this was a MOD to the cable from the arduino to the led driver. The cable MOD provides both 5v and 10v pwm dimming signals simultaneously, to both dim the driver and turn the driver on/off as promised. Here is the basic circuit, it has two components, a npn bipolar transistor 2222 and a 1k ohm resistor. This MOD works and has been tested using a 9v battery for the power, total cost about $3. I provide a copy of the mean well data circuit and my circuit. peace Avid
update: ->https://www.youtube.com/channel/UCd9auE6zyUoJoe9rlxoJq6Q
BTW, ask yourself, how would you invert a 10v inverted signal back to it's original orientation? Using a npn transistor and a resistor I was able to invert the signal, with the help of a 9v battery on the collector. So I asked myself, self, how would I invert that signal yet again. I slept on it and woke up thinking a second transistor connected in a similar fashion to the first transistor, should do the trick, but not just any transistor. So I started doing some more research with the thought of reversing the orientation of the signal from negative to positive. I would have to reverse the polarity of the transistor. That's right, I went with a pnp transistor to accommodate the next step of reversing the voltage from -10v to +10v. The question became which transistor to use with so many out there? The solution works, as I have had circuit boards made for the circuit, and will populate the PCB with the appropriate devices and use them to create both 5v and 10v pwm signals simultaneously for the GrowGreen LED Controller.
peace Avid
I have discovered more ways to create both 5v and 10v pwm signals within the cable allowing both dimming and on off functionality to a single channel. The GrowGreen differs from other controllers with 8 pwm channels with independent channel controls over brightness and timing schedule. Being Arduino based the controller is compatible with all lighting led systems including bucking LDD drivers and hlg style 0-10v pwm dimming. Peace Avid
A little update for folks.
First we have an arduino based industrial PLC applications using relays, and pwm drivers we have been looking at here. It is 45 minuters long, but you can fast forward to the parts you find interesting.
Second. PWM dimming for HLG drivers. Thee is a non-DIY solution for you folks out there, that are interested. here is a the simplest and cheapest solution per channel available on ebay here http://www.ebay.com/itm/262623559315?_trksid=p2060353.m1438.l2649&ssPageName=STRK:MEBIDX:IT This board will convert your 5vdc pwm signal to a 10vdc pwm signal. enjoy. peace Avid
here is a blue tooth four channel relay with blue tooth with no programming required, just for t6hose guys that want blue tooth control over a few LED fixtures.
peace Avid