Hydroponics System with LED controls  - Page 1
Forum section: electronics / projects

author: Pariston
author_rank: Contributor
timestamp: July 10, 2020, 03:49:08 pm
content: Hi,My name is Alex. I am a second year electrical engineering student. At the moment I am working on a small hydroponics system, but sadly I have to admit that I am lacking necessary knowledge to get this project done. If any of you would like to join me on this journey I would really appreciate your help.Below, I will attach few pictures explaining what I have done so far and explain how system should work.External controls:At first, I would like to explain all possible ways that person can communicate with a system. There are four tactile switches in total, and all of these have something to do with controlling High Power LED.SWG1: responsible for setting how many groups of LEDs are active, which is basically a way to control brightness (yes, there is a reason why we are not just controlling current through the LEDs...). When pressed, activates next group of LEDs. Initially set as FETG1-1 ON others off, but every next touch will activate another FET until all four groups are ON, if you press switch again it will go to initial state (yes, you are not able to turn all LEDs off with this switch).SWG2: This is a very important switch which defines how many hours of light a plant is going to receive in a day cycle. Initially system is set as 12 Hours On 12 Hours off (state 1). Once SWG2 is pressed, cycle increases by 2 hours, so if you press it first time, it is 14 hours on and 10 hours off(state 2). In total, there are 5 states from 12 to 20 hours, next touch sets it to initial conditions. Note: when cycle is changed, signal led at PA16 should indicate it. Ex. if changed from state 5 back to state 1, led should blink once, twice from state 1 to state 2 etc..SWG3: This switch initializes a moment in time when day cycle begins. Ex. if system is set to 14 hours on & 10 hours off(cycle state 2), and you press SWG3 at 8 am, then at 10 pm lights will turn off, until turning back on tomorrow at 8am.Question 1: I guess we need to use RTC feature to program something like this... is there any other easier way? Do I need external crystal for it or ATSAML10D has everything needed internally?SWG4: simple ON/OFF switch.System has two states of operation. We will use PA04 to consistently check incoming signal on this pin. State of this pin defines operation of the system.Question 2: How do I choose a capacitor (marked with "??" on the schematics), so that mcu has enough time to switch on battery without risks to loose power completely?Power Mode ON:Step 1: We turn off FETG1-5,6,7,8. Check voltage with PA02 and if battery is charged we turn FETG1-5 ON.if battery wasn't charged, than we start charging procedure.Charging procedure: turn on FETG1-5 for 5 min, then turn off. turn on FETG1-7 for 25 min. Check battery charge. Repeat until charged. Unfortunately, we are not able to charge batteries and run airpump all at once(Limitations of buck converter).Once battery is charged and airpump running, it is a regular condition of this system and everything should work just fine. Mcu consistently checks PA04 in case power goes off.Power mode OFF (goal is to save power without killing plant):Immediately turn on FETG1-8. turn off FETG1-5,7. 5 seconds after, turn on FETG1-6 and run in cycles 5min on 5 min off with pwm to save power. Occasionally check power across battery.At 50% send indication signal on PA16.At 30% turn off airpump with FETG1-6.At 20% turn off FETG1-8 - shut down(trying to keep battery safe).Once power is back on system should recharge battery and work normally.Question 3: what is the use of CE pin of XCL101A301ER-G (boost converter)?Question 4: is there any ground line which i should keep separate from the rest of the circuit?Notes:1. LEDs on the schematic is a simple representation of LED which i have already made and tested (it is around 28.5W at 60C).2. Most of the components which I have written in the diagram is replaceable if needed (except maybe high power led and airpump)3. At this point nothing is written in the stone and if you have suggestions on how to make it easier and cheaper, I would definitely take your advice.4. Feel free to ask anything about this project. As I previously said I am just a second year student and idiotic mistakes should be expected.Thanks for reading this through. If I didn't reply in 10 minutes, most likely i fell asleep.Hope you are having a great day :3

author: Cicada
author_rank: Regular Contributor
timestamp: July 11, 2020, 10:24:00 pm
content: Hi ParistonWelcome to the forum.As a design engineer, the datasheet is your friend.https://www.mouser.co.za/ProductDetail/Torex-Semiconductor/XCL101A301ER-G?qs=AsjdqWjXhJ8wOG80xjS4Aw==https://www.torexsemi.com/file/xcl101/XCL101.pdfCE = Chip Enable. There is no bar on the CE so it is active high i.e. the chip is enabled if the input voltage on pin Vce is high i.e. = Vbat.If there was a bar on CE it would have been active low. So to activate the chip in such a case it would require that Vce be connected to ground.Many times the CE pin has an internal pull-up resistor to pull it to Vbat or pull-down resistor to pull it to ground. This internal resistor provides a default setting for the device either enabled or disabled when the Vce pin is left unconnected. As can be seen in note 7 on page 11/18 this device has no pull up or down resistors.read "CE PIN FUNCTION" on Page 3/18read <Load Disconnection Function, Bypass Mode> on page 10/18Read note 7 on page 11/18If you want the be save leave the device switched on by following advice on page 4/18"Unless otherwise stated, VBAT= VCE= 1.5V" This is the test condition for the table on this page.Or you can switch it on and off with a switch between Vce and Vbat

author: Pariston
author_rank: Contributor
timestamp: July 11, 2020, 10:58:46 pm
content: I am planning on switching this boost converter on and off with mcu. I believe a switch between Vce and Vbat is not the best option for me, because Vbat is connected to 1.2 Volt battery (in the datasheet it says Vce min of 0.75Volt, but i would rather stay on the safe side). Instead, I am thinking of connecting Vce directly to mcu and output 1.5 Volt whenever I need to use it.Thank you for your help.