What's new
  • As of today ICMag has his own Discord server. In this Discord server you can chat, talk with eachother, listen to music, share stories and pictures...and much more. Join now and let's grow together! Join ICMag Discord here! More details in this thread here: here.

Micro Adventures with Mr. Sparkle

M

Mr. Sparkle

My Arduino starter kit will be here tonight. :biggrin:

Sweet, if you have any question feel free to ask.

Inspirational as usual sir. Ashla is looking incredible.

Thanks Tbone, might not look the same now as i chopped 3 of the AK48's, mainly just because they didn't have the smells i liked best out of the group and were also weaker resin production wise, it also freed abit of space for those Lemon Kush and Cherry Bomb clones i brought over recent.

Puffed a little bit of that Cherry Bomb tonight actually, 3 month cure from the last plant i harvested. Its Pretty Decent, smell has faded out, kinda narcotic which i'm not a fan of, and an effect that's not quite my cup of tea, it will probably be its last run because of that. Which also means more opportunity for new genetics, which is a bonus.


As for the soil sensor picture here you go.

Very basic, all it is, is two stainless steel rods that are about 2in tall separated by a chunk of non conductive material which in my case is old fiberglass electrical guard material which i cut into rectangles and drilled for the rods, the rods i have crimped around the top of to allow a grove for the wire to be wrapped around a couple times, i then used solder to fill the gaps, now solder doesn't stick to stainless steel because of its properties and dissimilar metals, and im not brazing it together, if i had a tig welder maybe, but because of that it acts more as a physical connection point than a copper to copper solder connection. that is in turn covered in heat shrink, and is also epoxied in place so it isn't going anywhere, i should of encapsulate the top in epoxy, but i didn't at the time, and its just wired out to a Chinese ebay soil senor module, which is just a simple little circuit to feed one of our analog pins on our arduino.

pc6F7gp.jpg
 

Captain & El P

New member
Great set up Mr Sparkle.
I grow in a cabinet but I think I could use an Arduino for my set up as I travel for work.
Currently using a ghetto setup with a pump in a reservoir hooked up to wifi controlled outlet. I flip it on from my phone for a few minutes when I need to water. Seems to work but it would be great getting soil moisture readings because I really "guess" :dunno: when i should shut it off.

Always striving for a better way to grow.
Thanks

-Cap
 
M

Mr. Sparkle

Great set up Mr Sparkle.
I grow in a cabinet but I think I could use an Arduino for my set up as I travel for work.
Currently using a ghetto setup with a pump in a reservoir hooked up to wifi controlled outlet. I flip it on from my phone for a few minutes when I need to water. Seems to work but it would be great getting soil moisture readings because I really "guess" :dunno: when i should shut it off.

Always striving for a better way to grow.
Thanks

-Cap

Could have a wifi camera that's internet accessible then you have a real time view is so desired, but it still wouldn't determine how watered something is.


My long winded story to where i'm at today is as follows if interested.

My original goal was to have an automated watering system that could extend my away time from tending my cases for up to a week, say if you went away on holidays, or had to work away from home.

I use to just pre water heavily and leave excess in a tray before i left which was good for about 4-5 days max, but it wasn't good for the plants.

Then i scraped together a basic system that say after 3 to 4 days would open a valve to a small gravity fed reservoir for set amount of time, super easy to do, but was just a one time event and very basic with pretty much zero control, if say i had a power outage the count would start over from the time of the power outage, which did happen once, and i came home to some crispy plants.

It quickly progressed to a looping cycle with smaller more frequent waterings, which allowed me just over a week, but definitely didn't keep the plants that happy.

Thats where the soil sensor came in, which was in my original plan at the beginning just took me a bit of time to get there with coding and implementing it during my free time, but quickly after implementing it, i had my cheap plated sensor fail on me, causing the code to think i had super dry plants, which due to my code released the floodgates per say, and i came home to drowned then crispified plants.

So that's where i made my own soil sensor first out of just 2" finishing nails, which worked but were prone to corrosion and would give off not quite stable results, but at the same time i also worked at changing my code around, to increase my probe longevity, as with the way they work is by forcing a voltage through the probe and measuring the output, the wetter and more conductive it is the more voltage that is passed, but if you have this running consistently, which most code out there does, it cause electrolysis, which is the same process as electroplating, which can degrade the sensors probes really quickly.

What i changed with the code was two parts one to have the probe only turn on when a soil sensor reading event was taking place, which pretty much infinitely increased the longevity of my probes from any electrolysis, and two to put in a sensor overrun guard that in a situation where a sensor fails it will not cause a valve to go full open, after that i ran into where plants weren't being equally watered, which is where i made false bottoms and slightly sloped my trays to allow easier water flow and distribution.

Then i eventually ran into some general corrosion with the nail sensors which i knew was gonna happen eventually, but it was causing somewhat false readings, which was causing a constant fiddling with code to try and dial in watering trigger points, and that's where the stainless steel probes come in, and i've been running like that since, its pretty solid now for the most part, still get the odd not equally watered plants, but that i've been fine tuning and is determined by which plant the sensor is stuck into and how far away its from the dump tube and if the tray is slanted or not.


I now get two weeks of untouched watering with my current reservoirs on a full case and actually rarely ever water or trigger a watering event myself, which i have a button programed to do just that, but i just fill my res's once every two plus weeks and it does its own thing.

Took quite a bit of trial and error to get here but now that it's in place, i honestly wouldn't give it up, makes things alot easier.
 
Last edited:
M

Mr. Sparkle

Have you ever run some Durban or Durban crosses? The head high is where it is at with that shtuff ...

I have had some cross stuff, but we're talking like 25% or less in percentage, ive considered it just haven't gone down that route yet, as i've been hunting other stuff.
 

ReikoX

Knight of the BlackSvn
Sounds very similar to the path I'm following (more or less). I'm looking at using it as a cycle timer hooked up to a small 12v pump. Next I'll be getting some soil sensors. Finally I plan to use some PID algorithms to humidity, dehumidifier, cool, and heat.

First I need my board, which didn't show up last night, but is there now according to Amazon.
 

kstrader

New member
So that aside what specifics do you want to know about. My specifcs break down as follows

Relays (even though they are linked to other functions)
Real Time Clocks and Light Control
PWM Fan control (2 speed)

Temperature and humidity display
Button control
Soil Sensor readings with automated watering (which ties into a lot of things)

I'm more interested in those sections of the code and if you are storing time values in EEPROM in case of power shut down.

Do you have a back up power supply in case of power outage?

Thank you in advance! I will not ask you to modify the code for my needs. Just want to see it and use it as an example :) :tiphat:
 
M

Mr. Sparkle

My RTC has a 2032 cell battery for backup incase of power loss, so in that even it jsut picks off and continues on with what the actual time is. But this is some of the fan and light timer code its missing a couple of the setup values that i have in the top of my code but for the most part is the direct code.

Also the fan code is copied from another persons project, it involves using one of the internal timers and making a PWM signal off of it, bit over my head if i had to write it myself, but easy enough to copy and past and tweak what i needed.


int addTime(int hourAlarm, int minuteAlarm) // Adds hour and min together as if counthing in minutes
{return (hourAlarm * 60) + minuteAlarm;} // Which makes comparing figures below easier

int startTime = addTime(4,00); // Set start time here in 24hr without leading zeros + 1hr Daylight savings
int stopTime = addTime(22,00); // Set stop time here in 24hr without leading zeros + 1hr Daylight savings
const int fanslow = 68; // Sets fan speed when light are off
const int fanfast = 16; // Sets fan speed when light are on



// Set up the PWM pins for a PWM frequency close to the recommended 25KHz for the Intel fan spec.
// We can't get this frequency using the default TOP count of 255, so we have to use a custom TOP value.
// Only timer/counter 1 is free because TC0 is used for system timekeeping (i.e. millis() function),
// and TC2 is used for our 1-millisecond tick. TC1 controls the PWM on Arduino pins 9 and 10.
// However, we can only get PWM on pin 10 (controlled by OCR1B) because we are using OCR1A to define the TOP value.
// Using a prescaler of 8 and a TOP value of 80 gives us a frequency of 16000/(8 * 80) = 25KHz exactly.
TCCR1A = (1 << COM1B1) | (1 << COM1B0) | (1 << WGM11) | (1 << WGM10); // OC1A (pin 9) disconnected, OC1B (pin 10) = inverted fast PWM
OCR1AH = 0;
OCR1AL = 79; // TOP = 79
TCCR1B = (1 << WGM13) | (1 << WGM12) | (1 << CS11); // TOP = OCR0A, prescaler = 8
OCR1BH = 0;
OCR1BL = maxFanSpeed; // max fan speed



// Grabs the current datetime when connected to computer if necessary
DateTime now = RTC.now();
DateTime compiled = DateTime(__DATE__, __TIME__);
if (now.unixtime() < compiled.unixtime())
{RTC.adjust(DateTime(__DATE__, __TIME__));}

// Timer code for when to turn on and off the light relay aswell as modulating fan speed //
void lightandfantimer(){
DateTime now = RTC.now(); // Get the current time
int currentTime = addTime(now.hour(), now.minute()); //compiles current time for rtc
if (currentTime >= startTime){ // If true does below{
digitalWrite(Relay_1, LOW); // Turns relays on reverse polarity
setTransistorFanSpeed(fanfast);} // Sets PWM fan speed low
if (currentTime > stopTime){ // If true does below
digitalWrite(Relay_1, HIGH); // Turns relays off reverse polarity
setTransistorFanSpeed(fanslow);}}




ill Post a weekend update possibly shortly if i have time or later if not, and it would be nice for this forum to have the
Code:
functions as it alot easier to read with doing so
 
Great grow boxes! And some nice photography too.

+1 on wanting to see the full program.

So the watering mechanistic just opens a solenoid valve and dumps for a few seconds? How consistent is the water volume per feeding with this method? Do you have anything mixing the nute water tower?
Does that soil hydration sensor just run on 5v with a pull down resistor?

Do you control humidity or just temp? Where do you stick your DHT22 in the case? Just one?

I was thinking for an emergency backup; it wouldn't be that difficult to set up a second arduino that monitors a parameter the primary board should have under control. If it sees something amiss it could shut down the primary board and take control in a limp mode, possibly just on timers without looking at sensors in case those were the cause of the failure. This might be a bad addition for you as you're squeezing every cubic centimeter.
 
M

Mr. Sparkle

Great grow boxes! And some nice photography too.

+1 on wanting to see the full program.

So the watering mechanistic just opens a solenoid valve and dumps for a few seconds? How consistent is the water volume per feeding with this method? Do you have anything mixing the nute water tower?
Does that soil hydration sensor just run on 5v with a pull down resistor?

Do you control humidity or just temp? Where do you stick your DHT22 in the case? Just one?

I was thinking for an emergency backup; it wouldn't be that difficult to set up a second arduino that monitors a parameter the primary board should have under control. If it sees something amiss it could shut down the primary board and take control in a limp mode, possibly just on timers without looking at sensors in case those were the cause of the failure. This might be a bad addition for you as you're squeezing every cubic centimeter.

Correct on the valve, the volume decreases per same amount of time with the less thats in the reservoir due to static pressure, but if running short enough valve dumps and checking more often, it more or less auto compensated by just triggering a couple more watering events when the static pressure isn't as high.

As for anything mixing the nutrient water no, well not currently, i have a couple small 12v pumps i was gonna wire in eventually for aeration with the fluming style method instead of say a noisy air bubbler, but my reservoirs are pretty air tight fro the most part, and with it dumping into a tray and bottom feeding, the added aeration might be negligible, but i haven't tried so i don't know.

Bingo on the soil sensor, i actually trigger the 5v off an output pin to allow me to turn the power on and off only when a senor reading is taken

I control neither, the goal was to have it integrated so it could modulate fan speed based on those factors, but i haven't ventured down that yet, and its little gain for my PC case, as they can only run so cool, and my fan speed in more selected as a compromise between cooling and noise. As for the placement, the readings do vary with where its placed, mine are located mid level, where there either just above or below the canopy, but saying that you get different reading in those situations even with circulation fans and such, im not necessarily confident with control based off the DHT22 sensors as ive seen just putting light on the sensors, same place same amount of airflow just shade vs no shade give off varying result, which yes makes sense but, could run into issues if say your sensor is below the canopy reading its cool , and slows down the fans but in reality is quite hot above the canopy and the fans should be ramped up, which is where you could bring in multiple sensors if desired.

As for emergency back up you could do that or as Ice-Cream mentioned a couple pages back, add a watchdog circuit, that sends off a signal to the reset input for the arduino if it doesn't receive its regularly sent timer reset signal, which is pretty small and relatively easy to do, but if the arduino actually dies your screwed.

But that could be used the same way with a second arduino if desired, and just code it to look for that signal and have it take over if it doesn't receive a timer reset signal, but you would probably want to set it up so you could also power down the failed arduino as its outputs/inputs could lock and if connected to the other arduinos same inputs, would royally mess things up.
 
Last edited:
M

Mr. Sparkle

Weekend update:

Bogan: about day 15-18 on the F2 Dark Devils, they have their initial pistils so they will be stretching over the next two weeks and putting on bud sites, hopefully they wont require much intervention to keep them under control. The C99 x Dark Devils are about day 3-4 and are doing decent, the stowaway hasn't quite caught up yet, but hopefully she will.

OfW0Q43.jpg


Ashla: Things are kinda spread around abit right now, but the Lemon Kush and Cherry Bomb clones are stretching, the later more so and might need to be wrangled in shortly, the three remaining AK48's have nice smells, two of them are similar with the other being a bit different so we will see how they develop, and the one Bahia Blackhead is getting rather tall, hopefully shes done with the height but we may need to tame her, and they are just on the verge of throwing out budsites, so we will stay tuned on the progress.

Apart from some of those potential non-auto C99 x Dark Devils coming over, my goal is to get back to doing singular all plants at once style grows in Ashla instead of the current continuous style currently.

7GtaBvH.jpg
 
M

Mr. Sparkle

Bogan bounces back ! and it hasnt taken long at all :)
Ashla, well I want to take her home ;)

Oh forsure with bogan, here is her today " 72 hrs later ", i might need to defoliate tomorrow to slow things down and open things up a bit, as shes growing pretty quick now.

Ashla i had to chop the top off the Tall Bahia Blackhead as it grew right into the heatsink, and i decided to kill off the cherry bomb as it was its last run anyways, but it most likely wasn't gonna stop stretching and it freed up a bit of room.


Here's a pic of Bogan for a almost mid week comparison, pretty crazy how fast these plants can grow.

HEZ4RFx.jpg
 

ice-cream

Member
Ashla i had to chop the top off the Tall Bahia Blackhead as it grew right into the heatsink


"My plants grow too fast and too big"
That's a good problem to have :laughing:
Shame in a way, but on with the show :)

You'll have to have at least one grow in the Blynx style of a mad mass lump.
I think you will have some results that might rival his ???
 
M

Mr. Sparkle

"My plants grow too fast and too big"
That's a good problem to have :laughing:
Shame in a way, but on with the show :)

You'll have to have at least one grow in the Blynx style of a mad mass lump.
I think you will have some results that might rival his ???

Once those C99 x Dark Devils become bigger then yes to the mad lump, but i had to do some training and defoliation the other day as things were getting out of hand, the plants on the right put on at least 4" from Monday to Wednesday, and were making no effort to slow down, so i moved the right side Dark Devils to the far right and had to "Z" the stems on the plants on the left, and defoliated the lower big fan leaves, as they were causing the stretch, i'll post some progress pictures of what has happened this week.

Compared to Blynx who knows, it should be good bud with the way things are moving along, but yield wise no idea, till those other plants fill in and all of them really start budding out its hard to tell.
 
M

Mr. Sparkle

Weekly Update

Bogan: quite a bit of change here, the Dark Devils decided to do a mad dash for height, due to the bigger pots they were a bit more unruly in comparison to normal, so i had to separate the 4 as the far left were getting blocked out and thus wanted to stretch more, So they got separated, the lowers defoliated and the ones on the left got the "Z" Treatment to their stems, the back plant was a tad rougher with that process, but its perking back up.

Also the seedlings will be fighting for that center space within the week, so i'll have to do some more training and such once things start fighting.

oKdRVKq.jpg



Ashla: The AK48's are bulking up, they wont yield as much as ideal due to the root rot issue i ran into of not keeping my res sterile, but are still looking decent, one of the plants threw out 3 pollen sacs on a lower bud site, but that's it for all of them, its definitely due to the stress of the rot, flushes, a bit of defoliation, and a root scrape of the bad stuff, so its not unexpected that it happened. The Bahia Blackheads are still stretching but that due to it getting pretty dense with foliage on that right side. Also the Lemon Kush is just starting to bud and is doing well it will become a very nice plant by the looks of it so far.

I want to change my programming to run the box a bit wetter but im not gonna change anything till a few plants are out and i give the tray a good scrub down.

TprHJpQ.jpg
 
M

Mr. Sparkle

Maybe its time to move from Ashla and Bogan to Tython
hehehe :)

Have you thought about adding a LCD with a few buttons or a small touch screen to allow some of the parameters to be changed on the fly ?

Already have an LCD and two buttons connected, was gonna make a menu selection that would of been activated by hooking up a shorted 3.5mm audio jack to one of the stock audio ports, then use the already connected buttons for set point changes, But im dreading the coding for it, as i haven't dealt with menu selection before, and it easy to update by usb when needed.

It was my original plan way back, i would of went with the lcds with the shield that had built in buttons, but they don't fit in your standard 5.25" drive bay.

Also i think your one of the first people that has gotten the reference to the case names :tiphat:, or at least whom has mentioned it.
 

Latest posts

Latest posts

Top