Electronics - A most productive day

So far electronics has been quite a frustrating "thing".

I've found a few quirks with some software that cost me hours, I've found an error in a catalogue that cost me hours, I had an intermittent fault in my motor due to me melting it as it was the first thing I soldered. That one cost me days. And a stack of me just doing thing incorrectly, and not being able to follow instructions.

The problem with these frustrations is the same problem beginners at anything have, and that the experts in that same thing don't every quite understand.

The beginner cant tell if the fault is in their knowledge, or in something external. Anyone with experience would have looked at my stereo jack, and said, "That catalogue is wrong!" I on the other hand presume it's me that's wrong (as I of course should), and struggle on trying to figure out whet I'm doing incorrectly.

The reality is most often than not it really is my fault. There have been a zillion times over the last few weeks where I left something out, or stuck it in the wrong way, and managed any number of other errors and omissions.

But today was different.

Today stuff seemed to make sense.

It could be because I spent and hour in the dentist chair breathing happy gas this morning, but I suspect that it's actually because I've been learning these last few weeks.

When people are learning how to type or tap out Morse code, their speed doesn't just gradually improve, it improves in big leaps, steps backwards, and stagnant times where nothing much happens.

Some of what's going on is called chunking by some. In the case of Morse code, the student taps out slow letters. They gradually get faster and faster, then suddenly they ratchet up a notch as they learn a word or two. You only need a few things that you can group together like the word "the" or "and" or even just "th" or "ing" and suddenly you double your speed. A while later and you chunk larger words or even phrases. The final step is when you start thinking in taps.

I find it a bit difficult to type what I'm speaking out loud, but I'm just starting to be able to do it now. In fact these last two sentences where done like that to prove to myself that I could at least do it a bit.

Eventually, if I keep blogging every day, I'll probably be able to type just by thinking it onto the page .

Chunking.

I think I may have just had a bit of a learning chunk with this electronics caper.

I decided to work on a new part of the feeder project. It's actually working as it is.

It's not built, but each bit works.

But if I want to change something within the software, say the number of feeds in a day or something, I have to plug it into a computer.

I'd like to make it so you don't have to do that. So you can adjust such values with a screwdriver.

A few hours ago I started to make such a thing, and with only one error that I found and solved within a few minutes, I managed to make a working version of ...


  • a button that shifts you from normal mode to adjust mode
  • a light that flashes out the number of feeds per day as you are adjusting it
  • a pot or potentiometer (volume knob or variable resistor) that adjusts that number of feeds per day
  • some code that divides the pot's min to max into 25 different values to allow you to set the number of feeds between 1 and 25
  • and pressing the button again takes you back to normal mode
Now, someone with some skills might have done this in a few minutes, but I only took 3 or 4 hours!

Actually I'm pretty pleased with myself.


120 Things in 20 years - Just a most productive day in electronics

Aquaponics - Yet another fish death

I lost another fish today.

And there is still another doing the fin on one side thing, trying to stay upright.

I found a stack of flowers in the bottom of my to pup water tub, so I guess it could be something to do with that as well, but my bet is currently on either the rotting bean and cok choy plant, or that I accidentally overfed them.

I cant be sure if this is still the aftermath of the damage that was done when I had the nitrite and ammonia spike, or if this is some ongoing problem.

I see ants in the water every day, and sitting on the rim of the fish tank, is a collection of ant parts that the ants have presumably thrown out their window.

If there is a pile of ant parts on the rim, I'm guessing quite a number fall into the tank as well.

I have no idea if ants and ant parts are bad for an aquaponics system, but I suspect they don't do any great good.

Losing fish Is no fun.

Waiting is even less fun.



120 Things in 20 years - Aquaponics - Yet another fish death

Aquaponics - Another sick fish

I have two more fish that are not out of the woods as far as their recovery goes. They are off the bottom, and swimming with the use of one side fin.

This would indicate to me that they are tending to float in an unbalanced way. For some reason when fish get sick, they seem to lose control of their swim bladder.

A swim bladder is an organ in place of the lungs, but fish use it to control their buoyancy by adding or removing air (or some gas of some other kind - I don't know) . This saves them a stack of energy in not having to swim to maintain whatever depth they want.

So a sick fish often shows problems controlling their swim bladder.

I've never noticed it before, but I've also never spent so much time looking for problems with a fish, but it might be an early indicator to a problem when you see a fish using only one of its front fins.

This Could be due to the fish trying to counter a tendency to roll due to not having its buoyancy right.

The swim bladder also aids in stabilization in an upright aspect because it sits above the fishes centre of gravity. By having their floatyest bit at the top, the also get to save energy by not have to fin in order to stay upright. The rest of their body weight acts like a boats keel.

But all that only works if there is just the right amount of floaty in their swim bladder. And I'm guessing that the fin work I'm seeing is as a result of having to adjust for faulty floaties.

If this observation is correct, it might be a useful tool in early detection of a problem.

But I wont ever know if it is correct.

Aquaponics - Honeydew

So...

Apparently, aphids eat plant sap, and then for some reason secrete a sticky fluid known as honeydew.

Ants like sticky.

And then I'm told, a black sooty mould follows.

That sounds a lot like what I'm seeing on my strawberries.

Here is a picture of an ant licking some PVC and enjoying some sticky.






120 things in 20 years - not just Aquaponics - Honeydew


Aquaponics - Nitrogen fixation

I recently had a spike in nitrites that killed two fish. Actually it killed one fish. I killed and ate the other. But they both died as a result of their being too much ammonia and or nitrite in the system.

I put it down to some mistake I must have made with feeding, but it occurs to me that it might be about my peas and beans.

Nitrogen fixing legumes take nitrogen out of the atmosphere, and stick it into the soil. Most plants take nitrogen out of the soil.

I lifted one of my bean plants that's already got beans growing on it to have a loot at the roots, and remembered that in a dirt garden, you rotate crops from season to season, and plant things like beans in a bed before you plant things like tomatoes.

Tomatoes like a lot of nitrogen, and beans put the stuff in the ground. Or at least I think that's what I remember.

But this lead me to wonder if it might be my beans putting too much nutrient into my grow bed that had caused my fish to die.










I'm still at the wondering stage, so don't take this as science or anything, but according to Wikipedia's article on Nitrogen Fixation, the nitrogen goes in as ammonia.

Bad beans.

I also seem to remember that the nitrogen forms on the roots as nodules, in the form of match head sized lumpy things. But I see nothing like that on my roots.










And...

I cant remember if the nitrogen only goes into the soil once the plants die.

But...

I did have a bok choy plant and a bean plant go all rotten on me, so there could well be a connection.

I hope the fish deaths turn out to be natures fault after all.

I'll find out and get back to you if it turns out to be interesting.

Electronics - Aquaponics - Demand fish feeder proof of concept

So the aquaponics demand fish feeder works.

Or at least the proof of concept bit works. Not the PICAXE and electronics bit.

The PVC, the motor, the hopper, and the screw all seem to work well together.












It looks like this....



This is just me touching the wires to a battery rather than the electronics triggering this, so the amount it is delivering each time is a little random.

But it will work just fine.

Yay.

Now, where did I put my education. I really need some of it now for the electronics.

I wish I had paid attention in school.

Electronics - Stage one soldered

I figure it's time to take a photo and post it if it looks slightly different to how it did before.

It doesn't actually work, but you don't know that, so you may maintain a suitable expression of impressed-ness, and congratulation.

It still needs the adjustment equipment, and then needs to be cut so it isn't so long. The plan is to fit it into the PVC tube it's sitting in, but I want to wait until everything is on the board before I trim it to size. I could probably cut it now, because I have left all that space at the top right for all the adjustable things.

Adjustments to things like numbers of feeds per day will be made with "Pots" or potentiometers. A potentiometer is a thing like a volume knob except mine will be adjusted using a screwdriver so you cant accidentally change them. 

Currently, my board looks like this.

I doesn't look like much, but it's still challenging me.

It's a dot to dot.

I made it work on the breadboard.

There are the same number of holes on the stripboard.

Just copy it over.


Except I thought I should change a few things.

Oh well.

Because this is my first project, what I should have done is made a replica of the breadboard by cutting tracks to the same layout. It would have wasted a few holes in the stripboard, but I wouldn't have had to change anything.

The other side looks like this.

Soldering on stripboard is a totally different beast as compared to a circuit board, or even the board with just coppered holes on it.

Because the strips are long and large, they act as a heat sink and suck all the temperature out of your soldering iron.

The solder also flows along the length of the strips rather than forming a nice dot around the pin you are working on.

No doubt I'll get better with practice.

Or not, who knows.


120 things in 20 years - not quite Electronics - Stage one soldered

Electronics - Breadboard

My breadboard layout looks like spaghetti.

So I put together on some software called Pebble. It runs in a web page, and is free. Just google search for "pebble breadboard" and you will find where you can download it to your system, or find a place that it runs live online.

It does this...

And it looks a lot less like spaghetti.

You can load various different boards, like breadboards, and pre made picaxe boards.

Pictured here is some stripboard.

Stripboard just has strips of copper running from top to bottom that act as conductors, and is full of holes.

The holes are evenly spaced and standard, so enable you to fit things like chips etc.

You add components to the non copper side, and solder them by flipping the board over. (bend the pins a little after putting the components through so they down fall out when you flip the board

You add wires and components, and can cut the copper strips where needed with a hand held drill bit twisted a few time. Cuts are pictured here with a red X.

The big advantage over pen and paper is it allows you to drag components around to make things fit better.

Aquaponics - My first plate fish

Vegetarians, this post might not be for you.

I ate my first Silver Perch today.

It was the one that wasn't looking so good. I figured I should put it out of it's misery as it started doing the "cant quite swim upright thing".

I also that I should cook it and eat it.

I prepared it as I prefer to eat fish. That's just lightly seasoned and cooked whole with a slice of lemon in the cavity.

The fish is probably only around 23cm long and I forgot to weigh it.








It turns out silver perch is a quality fish. Firm white flesh with a mild, subtle flavour, but not at all boring.

Also a gift to prep as they have large easy to remove bones.

I thought I would need to change my ways, and start adding flavour to the way I enjoy fish when I first started growing silver perch, but I could happily continue to enjoy them simply cooked whole with the natural flavours shining through.



All in all a great fish to eat.


120 things in 20 years just Aquaponics - My first plate fish

Aquaponics - Sad fish

Whatever it is I did wrong, I did it well.

I have some sad looking fish in my aquaponics system.

The nitrite readings are back to zero as are the ammonia readings, but the aftermath lingers on.

Most of the fish have some degree of scale damage.













And some have what looks like ulcers. I'm hoping it might have been because they were itching against sharp things because the nitrites were acting as a skin irritant, but I don't really know.











The temperatures were high over the last couple of days, and the water temperature got up to around 28 or 29c. That's pretty high water temperatures, even for an Australian native fish.

There were a lot of bugs like dragon flies around the water as I had the door to the grow house open, so It's possible the fish got a lot of natural feed that I didn't know about.

Also I've found a few ants having a bit of a swim in the system.

I found a rotting bok choy, and a rotting bean plant, that may have been contributing to the ammonia load.

Any one of these things, or all of them together may have contributed to the ammonia and nitrite spike, but I suspect I might have accidentally filled their feed jar a second time. Often they haven't eaten their maximum allotment of feed for the day, so the next day I fill the jar to the limit the system can process, and then feed them as much of that as they want over the day. But it's possible I fed them the remainder of the jar in the morning, then refilled it.

All the more reason to get this demand feeder off the bench and into the system.

Aquaponics - Nitrite Spike

I found some nitrite and ammonia in my system that I don't remember adding.

My nitrite level was at close to 1.0 ppm, and my ammonia was at .25 ppm.

My system always sits at zero for both of those readings.

I added 1 part per thousand of pure sea salt in the form of Sunray (R) pool salt. This was added because it helps to mitigate some of the damage that nitrites can do to your fish. I'm told (thanks TCLynx) that the salt's chloride ion will tend to bond with the nitrite and prevent it bonding with the fishies blood. I'm also told that it's not really a solution, but that it just helps a little.

If you add salt to your system, make sure it doesn't have iodine, or any thing else in it. Everything at my supermarket had an anti-caking agent. (I wonder what happens if you make a cake with salt with anti-caking agent in it)

My nitrite levels are already coming down, and the last time I checked they were at close to 0.25ppm.

By tomorrow morning my readings should be back to zero.

I'm yet to figure out what happened.




120 things in 20 years - not just Aquaponics - Nitrite Spike, but ammonia spikes as well.

Aquaponics - Ants

I have some new and exciting visitors to my system.

Ants.

There sure are a lot of ants when there are ants.

For the last few weeks, there has been something sticky forming on the leaves of the strawberry plants. I'm not sure if its got anything to do with the mould, but it does seem to be on those varieties of strawberry that were also trying their hand at mould farming.

Interestingly the leaves were so sticky that they were forcing aphids to stay longer than they had originally intended when landing on the sticky leaves.

I was going to write a post about how good my strawberry plants were at pretending to be sticky traps, but it turns out, ants ate the dead aphids (you can still see some aphids on the leaf to the left), and now seem to be eating the sticky.

I'm not sure if that's a good thing or a bad thing.

Currently, it's just a thing.





I'll be getting a little upset if they run out of leaf sticky and discover that strawberries are chock full of sticky, but until then, like everyone who isn't a caterpillar, a snail or a slug, they will remain welcome.

My only accommodation has been to move the create I sit on over a little to give them room to cut across what used to be my space. They seem very obsessed with maintaining their ant highway along that path, so I moved my create few inches to the left.



Not just Aquaponics - Ants, but also 120 things in 20 years.

Aquaponics - Dragon fly





No way, those wings are totally fake.






120 things in 20 years, pretty much just Aquaponics - Dragon fly 


Electronics - Features and bugs

When something doesn't go according to plan when you are programming, it's called a bug.

When that same things turns out to be useful, it's called a feature.

It's a handy distinction, and is used a lot in the software industry for marketing an faulty product.

When my fish hit their feed lever, the program is supposed to feed them one dose of feed, then restrict them from having any more for a set period. The thing is, my software allows them an extra feed if they haven't fed for a while. I cant figure out why, but I suspect it has something to do with the fact that there are two programs running simultaneously. Or at least pretending to. The chip actually just takes it in turns running one line from each program.

Actually there are three programs running...


1. checking everything over and over for changes in things like permission to feed.

2. checking over and over for lever presses.

3. reporting over and over how many feeds so far have been given for the day.


Now I think what is happening, is that the bit that checks for lever presses, diverts the program after a fish hits the lever to change a few things. For one thing it changes the permission for the fish to get a feed to "no".

But I think the part of the program that is checking to see if the fish are allowed to feed, sets the light on and activates the lever to allow a feed, before the bit that did the feeding can turn it off. The result is, there is a delay between giving the feed, and having the device decide it has actually done that.

If the fish were allowed to feed, say 5 times so far today, but haven't, they are allowed two feeds in a row.

That's a feature.

I invented that.




120 things in 20 years - In electronics, like aquaponics, sometimes bugs are features.

Electronics - Sanity and switch bounce

Sanity can be a fleeting thing, so it's best to make the most of when it visits.

When you simulate a switch turning on, it turns on. Simulate it turning off, and it turns off. In the real world a switch turning on is actually a chaotic mess of stuttering contact and breaks in contact. It's all over the shop. The one and only thing it isn't, is on or off. It's everything except on or off.

It's called switch bounce, and I never saw it when I did my first demo video with the cardboard fish (it's true, that wasn't a real fish, that was just an actor), because the program was doing some linear thing where it moved onto the next bit that was a pause.

With the new chip, the bit that is pausing is different from the bit that's looking for fish pressing levers, and that's different from the bit reporting how many feeds they have had. All this means that a single lever press can be counted as a stack of them.

The the thing that makes me feel best about wasting three days on trying to solve this, is this bit from the last line of my code....

'TODO: work something out to counter switch bounce if required 

I made a note of it ages ago, because I read about it and thought it might be an issue some time down the track.

Some days I'm smarter than I am on other days.

The days all look the same from the outside, but there is something different about them.



120 things in 20 years rarely Electronics - Sanity and switch bounce

Electronics - Insanity

It's now day three of me trying to figure out what's wrong with my circuit.

The software simulates fine (although there is an error two in the stuff I posted the other day) but when I try to build the device, the crazy thing tells me the fish have been fed 64 times.

This was to be a triumphant post showing off my new project. At least it was going to show it off all working on the breadboard in some temporary fashion.

But instead, here's a picture of some small birds drinking from a tap in the Australian outback.











At least some things make sense.



120 things in 20 years not just - Electronics - Insanity, but also small birds drinking from the only tap for miles somewhere in the Australian outback.

Aquaponics - Mould

I hate it when nature takes out the bad day it's having, by taking it out on me, and bringing me grief in the aquaponics system. What have I every done to nature?

Oh yeah...note to self - send "sorry"card to nature re: carbon footprint.

I don't mind so much when things go wrong that are my own fault. Sometimes I take shortcuts in the way I build stuff, so I feel that it's inevitable that it will need some "adjustment" at some stage in it's life.

But mould is a different story.

I mean it's still my fault, but I'd still rather it didn't happen because it's kind of icky.

When I built the new grow house, I didn't bother reinstalling the computer box cooling fan I had hanging from the top, to stir the air within the growhouse.

Opps.

So now I see mould on the PVC strawberry towers.







I have no idea how I'm really meant to spell those two words so this will have to do.

I've decided to spell mould, "mould", because when I made molds I used "mold" already, and I cant really see using "mould" for mold, and "mold" for mould would make that much difference anyway so I'll stick with "mold" for mold, and "mould" for mould.

I wouldn't want to confuse anyone.

It's also growing on the strawberry plants.

And that.

Nature.

Is unacceptable.







When my pH dropped too low, someone who knows stuff, told me they thought my leaves were showing a potassium deficiency. It turns out different minerals are available to the plants in varying degrees depending on how acidic the water is.

Sounds fair.

The solution is, you can adjust your pH by adding shell grit to your grow bed. Shells are made of calcium carbonate, and that raises your pH. The natural process of converting ammonia to nitrate via nitrite cases your system to become acidic over time, so the shell grit acts as a balance. It's convenient as well, because the more acidic your system gets, the more the shell grit gets dissolved. Once the system is no longer too acidic, the shell grit stops dissolving.

The system finds a balance.

In the meantime, as I was waiting for my system to gently come back to a pH of around 7, I added some potassium bicarbonate.

This adds potassium, which was a nice boost for my plants, but it also adjusts pH away from being too acid.

So I bought some Eco-Rose

It's actually sold as a solution to powdery mildew, and I guess that could be the culprit.


I dont actually know what powdery mildew looks like, and it would only take 5 seconds of my life to search for it, but that would take the mystery out of life.

Either way, the strawberries will enjoy it, so I'll give it a go.




Not just Aquaponics - Mould - 120 things in 20 years

Aquaponics - Visitor gecko

I love it when I get new visitors to me aquaponics system.

I get particularly happy if my visitor is also a predator.

I found this gecko in amongst the scoria trying to look inconspicuous.

I grew up in Papua New Guinea, and always enjoyed the company of anything that ate insects.

Gecko's everywhere, and a huge green tree frog that lived at the top of our front steps.

I'd love to see some frogs in the system, but there isn't much chance of that where I'm living now.





Instead I think I might look into trying to get some stingless Australian native bees.

They don't do the predator thing, but they also don't have a sting, so might be fun to have around.


not just Aquaponics - Visitor gecko - 120 things in 20 years

Aquaponics - Sacrificial plants

In my aquaponics system, I grow a sacrificial plant, who's only purpose in my garden is as a caterpillar attractor.

As generous as that might seem, it might be worth noting that the fish like to eat them, and as long as they stay on my caterpillar attractor they are easy to find. 

The plant is called Senposai, or at least it is in my garden store, and claims to be a Japanese green.

I have no idea if it tastes good, because before I get to eat any of it, everything else does.

So I grow it now to keep everything else from eating everything else.

It works a treat as a sacrificial plant.




It looks like this.

It seems those big, round, green leaves are irresistible to creatures that like to place caterpillars into gardens.

Since I've been growing it I've never had a caterpillar on anything else.

Ever.

I haven't had a lot of caterpillars, but I've had enough to conclude that they love this stuff.


Another advantage, is that the fish seem to love it as well. When I see a leaf with caterpillar holes in it I just rip it off and throw it into the fishtank. The fish go crazy for the caterpillars, then peck away at the leaf until its just a stem.

The stem even floats, making it convenient to lift out and drop into the compost bucket.

I love the stuff and will always grow it.

I just don't think I'll ever get to eat it.




not just Aquaponics - Sacrificial plants - 120 things in 20 years

Electronics - PICAXE code

I think I promised I would only write three posts with code.

I think this has to be counted as one of them.

I've been studying hard and also working hard at writing the code for the automatic demand feeder.

I haven't soldered the electronics yet, but I've built each part of it to test it on my temporary breadboard.

This is the bare bones minimum required to make the feeder as lots of the features are not yet complete, and no doubt there are still some errors.

The numbers involved, like the number of feeds per day etc, are very large because I don't feel like waiting for fifteen minutes between tests.

So all the variables are crazy, but from the tests I've done, I think it works.

Even if you have no interest in programming, its worth having a look at it, just to see how your computer actually works.

It looks like this (I'll talk a (very) little about how it works later)...


'-----------About------------------------------------------------------
          'Demand fish feeder ver 02-2011-10-11-1130
'-------------------------------------------------------------------------
'This is an open source project that lives here - http://www.backyardaquaponics.com/forum/viewtopic.php?f=50&t=10587
'and build descriptions that require a lot of photo's live here  -120thingin20years..blogspot.com
'Blame code errors and pecularities on
'BullwinkleII  at backyardaquaponics.com , 120thingsin20years on the PICAXE forum and 'http://ozelecforum.com/, and me at 120thingin20years.blogspot.com ,  
'Special thanks to...
'SABorn at the picaxe forum, and http://ozelecforum.com/
'Steve S at backyardaquaponics.com
'everybody at backyardaquaponics.com, http://ozelecforum.com/, and the picaxe forum 
'Actual PVC feeder device (work in progress (and really only proposed)) can be seen here - 120thingin20years..blogspot.com 
'-------------------------------------------------------------------------
'Uses PICAXE 14M2
'-------------------------------------------------------------------------
'Multi-itask
' Main: (start0) Checks for changed states and calculates  things as required
' Start1:       Checks for lever presses
' Start2:       Reports feeds so far
'-------------------------------------------------------------------------
'This code is provided free to the world without reservation.
'NO RIGHTS RESERVED
'read that bit again before you contribute, but please chip in if you can contribute
'=========================================================

'Variables
{
Symbol w0_DayLengthInMinutes = w0
Symbol w1_RemainderOfTheDayInMinutes = w1
symbol w2_MinimumMinutesBetweenFeeds = w2
symbol w3_ReportFeedsFrequency=w3
Symbol w4_MaxAllowedFeedsForTheDay = w4
Symbol b26_RemainingFeedsForTheDay = b26
Symbol b25_FeedsCurrentlyAllowed = b25
'b24
symbol b23_MinutesSinceLastFeed = b23
symbol b22_NumberOfFeedsNowAllowed = b22
Symbol  b21_LeverLEDState=b21
'-------------Start2 variables ----------------------------
symbol b20_Start2Count = b20
symbol  b19_Start2Count2= b19
symbol b18_FeedsSoFarToday = b18
}
'---------- Here lies everything adjustable ---------
let w4_MaxAllowedFeedsForTheDay =2880    'large number for testing only as I cant wait all day
let w3_ReportFeedsFrequency = 3000       'recomend 15000 = 15 seconds between number of feeds so far today reports
'TODO: feed ammount in fractions of seconds of motor turns
'===========================================
Main:
#simtask all   'for debug only change all to 0,1,or 2 to simulate different multitask threads (not on linux though)
{
'debug
GoSub Init: 'initialize everything required when the device is turned on
GoSub NewDayInit      'initialize everything required to reset for a new day
GoSub OngoingChecks      'main program flow that checks everything continously
end
}
'------------ Main Subs --------------------------------
OngoingChecks: 'main program loop that checks everything continously
{
'debug
GoSub IsFeedingOK    'check if its ok for them to eat
'check for dawn
'check for button press - give them an extra feed override
'check for button press - silulate a days feed
'check for HSM no water flow
'check for HSM water temp is within range
goto OngoingChecks
Return 'never seen
}
'------------------------------------------------------------------
Init: 'used once at system reboot
{
w0_DayLengthInMinutes = 1440    'should be 1440 - populates the variable with the length of a day in minutes
return}
'------------------------------------------------------------------
NewDayInit: 'used at the begining of each new day
{
'debug 'Hi mum let b25_FeedsCurrentlyAllowed = 1
let b21_LeverLEDState = 1
if b21_LeverLEDstate = 1 then High c.4 :endif ' TODO:not sure why this is needed but I was seeing some strange results
let w1_RemainderOfTheDayInMinutes = w0_DayLengthInMinutes
let b26_RemainingFeedsForTheDay = w4_MaxAllowedFeedsForTheDay
let w2_MinimumMinutesBetweenFeeds = w1_RemainderOfTheDayInMinutes / b26_RemainingFeedsForTheDay
let b18_FeedsSoFarToday =  w4_MaxAllowedFeedsForTheDay - b26_RemainingFeedsForTheDay  ' for Start2 report feeds
let time = 0 'reset time to reset minutes since last feed

return}
'------------------------------------------------------------------
NewFeedPeriodInit: 'Used after each feed
{
'debug
let b26_RemainingFeedsForTheDay = b26_RemainingFeedsForTheDay -1
      let b18_FeedsSoFarToday =  b18_FeedsSoFarToday + 1  ' for Start2 report feeds
let w2_MinimumMinutesBetweenFeeds = w1_RemainderOfTheDayInMinutes/b26_RemainingFeedsForTheDay
let b22_NumberOfFeedsNowAllowed = 0 ' dont feed the greedy things just yet
let b21_LeverLEDState = 0 '0 switch off the lever LED
let time =0 'reset time to reset minutes since last feed
return}
'------------------------------------------------------------------
 IsFeedingOK:   'check if its ok for them to eat
{
let b23_MinutesSinceLastFeed = time/60 'calculate  and store the number of minutes since last feed
if b26_RemainingFeedsForTheDay = 0 then return ' bail out of the loop if they cant have any more feeds
endif
if b23_MinutesSinceLastFeed  > w2_MinimumMinutesBetweenFeeds then return ' bail out of the loop if time isnt up
endif
let b22_NumberOfFeedsNowAllowed = 1 'if the program gets this far it means its ok to let them feed
let b21_LeverLEDState = 1 ' turn on the lever LED
'debug
return

'============= End Main ================================
Start1:   'check for lever presses
{
'debug
if b22_NumberOfFeedsNowAllowed = 0 then goto Start1 'no point going further

if pinc.3 = 1 then Gosub Feed
goto Start1}

'--------------Start1 Subs ------------------------------
Feed:
{
'debug
'deliver feed
gosub NewFeedPeriodInit
return}
'============= End Start1 ===============================
start2: 'multitask 2 - loop to  report feeds so far ---------------------------------
'debug
pause w3_ReportFeedsFrequency 'pause for the desired time between each report

if b18_FeedsSoFarToday = 0 then goto FlashZero
b20_Start2Count=b18_FeedsSoFarToday/10                 'isolate tens
for b19_Start2Count2 =1 to b20_Start2Count           'flash tens
if b20_Start2Count=0 then GoTo Remainder
                high c.1   'LED on
pause 800
low c.1                    'LED off
pause 40
high c.1
pause 40
low c.1
pause 780 next b19_Start2Count2


Remainder:
b20_Start2Count=b18_FeedsSoFarToday//10               'isolate remainder
 
for b19_Start2Count2 =1 to b20_Start2Count           'flash units
       
if b20_Start2Count=0 then goto FlashZero
high c.1
pause 200
low c.1
pause 200
 
next b19_Start2Count2
'debug
goto start2
FlashZero:
high c.1
pause 40
low c.1
'debug
goto start2
'==============End Start2 ================================

'TODO: work something out to counter switch bounce if required 

Aquaponics - Seed raising

I love seeing the first sign of a seed sprouting.

But I don't like how much space an empty pot of gravel takes up, so I came up with a better way.

I've talked before about how I've tried to make my space modular so I can shift plants to places where there is more space when they need it, but keep them packed closely together when they are small, and don't need the space.

My original plan was to use small black plastic pots from my garden store, but now I use plastic cups.

This was partly due to not being able to find a hole cutter that fit the black pots perfectly. The cups are tapered, so will cope with my lack of accuracy with the hole cutter.

They seem to work well, and cost 4 cents instead of 25 per pot.



My original plan was to bury an ice cream container into the main grow bed, and then I could sit the newly seeded pots into it where they would be watered by the flood and drain of the grow bed's cycle.

The problem is, where I would have fit 9 of the black pots, I can only fit 4 of the plastic cups. This means it would take up too much grow bed space to run the intended 18 pots.

The object was to have up to 18 pots with various stages of seed raising from just planted, to a few weeks old. These would be moved to wider spaced holes within the NFT tubes as required, but would take up little space in the meantime.

I own a small seed raising mini-growhouse, so I thought I'd give it a go.

I was hoping that the enclosed design would keep the seeds damp, and keep any pests away.









Sure enough, its a few days later and I see sprouts.

These are all basil, being raised for a new proposed basil section behind my strawberry towers.

Water drips from the roof, and has so far kept all the grow media (scoria in my case) damp. The water that drips from the mini-growhouse ceiling would be basically distilled water, and as such would have no nutrient, but I don't think seeds actually need nutrient for the first few days. I think they live off their stored energy in the seed.

There is around 2cm deep of water in the bottom, and that is probably also contributing to the moisture content as a result of wicking.

I filled the pots nearly to the top, added seeds, then added a layer of scoria. Then I gently watered them in with some water from the fish tank (gently, because it would be easy to wash the seeds away. (no doubt this deposited a small amount of nutrient onto the sroria as well)

My greatest concern was that the nutrient rich water from the fish tank would go rotten because the water was still, but it seems to smell fine after week one, and the seeds are starting to sprout.

I wonder if it's the constant "condensation rain" within the mini-growhouse keeping everything fresh.

Who knows, but it seems to be working.

It will be interesting to see what happens in the next two weeks or so when I it will be time to move them to their new homes. If they avoid growing mouldy, and the water stays fresh, I think I may have solved my seed raising requirements.

Aquaponics - Spring has sprung

I love spring.

I sneeze a lot, but I still love it.

I'm in the southern hemisphere, so its spring.

I wont use the word spring in the post again.

Because I've been busy studying electronics, I find it a real relief to walk out into the grow house every so often, and smell the roses so to speak. I don't actually have roses, but I have these.

Peas













Beans













Cucumber













Tomato




spring








Strawberry (18 on that little plant so far)













and more.


Watching plants grow, and fish swim, is the cure for study.


not just Aquaponics - Spring has sprung - 120 Things in 20 years

Aquaponics - recycling

One of my favourite things about aquaponics is that it's a relatively new field, and as such there are stacks of things that need testing and inventing. This leads to a lot of people making fresh fish and vegetables out of junk and scraps.

Another of my vavorite things to do with scraps is recycling them by planting them again. I get a lot of kitchen scraps, and no longer have things like chickens, goats, sheep and a pig, to eat them all. It seems like an insane waste to throw them out. So I compost them in the hope of one day growing some worms or black solder fly to feed my fish, and at least recycle the nutrient involved.

But aquaponics has something else going for it. It strikes roots from cuttings amazingly well. A friend bought some lemon grass from a super market. He put a couple of stalks in water, and one in the ground. after a few weeks of nothing happening, I took one of the ones from the water and put it into my system. Two weeks later, I took it back to his him with roots on it. none of his had sprouted roots at all. And I took the saddest looking one.

I suspect hormones or something from the fish waste have something to do with it.

But for whatever reason it is that it works, I'm pretty sure it does work and I'm not just imagining it.

Because of this whenever I buy anything from the super market (shame) if it has roots, or not, or looks like it still has the bit attached that roots might grow out of, I put it into the growbed. (Rince it really well to get rid of whatever poison is on it)

A lot of stuff will either keep growing (herbs etc that still have roots attached), or start growing again from scratch (striking roots on rosemary sprigs etc) or in the case of things like bok choy or celery, just stick what's left of the base into the grow bed, and a week or so later, you have an entire new plant.

The base of celery I bought looks like this.

There are no signs of roots but you can already see tiny green shoots appearing.

This one was put in two or three days ago

The shoots are already there, but the farmer harvests way before the plant reaches it's full maturity, so there are still many more stalks waiting in the wings.




Here's one that I think is between 6 and 8 weeks since I put the bare base in the grow bed. IT now has a substantial root system, and is making lots of celery stalks.

Its still only small, but hopefully I can just take a stalk or three at a time as required and have it last a while before it goes to seed.






last week I put in a bok choy base (no roots) and I think I'm only three weeks away from harvesting a few leaves.

I planted some bok choy seeds at the same time, and they still haven't sprouted. They should within the next 2 or 3 days, but this one is already well ahead of them.

Repeat harvest food like cos lettuce, baby spinach, silverbeet, rocket etc are all grate is a small garden because you don't waste space with waiting for seeds to germinate.




Not just Aquaponics - recycling  - 120 Things in 20 years

Electronics - Aquaponics - Demand feeder PVC mockup

I think I have a final design idea for my demand feeder. It's only a mockup, at the moment, ie: it's only the PVC parts without any electronics or bearings.

The more I learn about this electronics stuff, the more places within aquaponics I can see uses for it.

I'll do a proper one of my Build posts when I have everything in order, but this is where it's at right now.

The basic design is a 90mm pvc section to hold the electronics (seen at the back or top left).

This keeps the electronics away from the feed and any moisture in a grow house or that just might be splashed around by fish expressing joy at their new feeder.







The electronics section is coupled to a 90mm T-junction to integrate the hopper.

In this case I've used a soft drink bottle, but any sized hopper could be attached. Another option would be one of those office water cooler bottles. Clear so you can see how much feed remains.

Perhaps for ease of refill, the top of a bottle could be cut of to act as a funnel. This could be screwed into the cap allowing the user to simply upend a similar bottle full of food into the hopper funnel.


Finally, the feed is delivered via an PICAXE controlled electric motor, rotating a screw in a 55mm (I think) PVC inner pipe. This holds the front bearing (the rear bearing is the motor, and is housed within the electronics section.

I cut an outlet hole to actually deliver the feed to the fish. I set the hole at the bottom rather than just letting the feed flow out of an open end to avoid water dripping into the feed. This could turn it into a gluggy mess, and jam the system.



The final mockup looks like this.

It'll work.
























Not just Electronics - Aquaponics - Demand feeder PVC mockup -  120 Things in 20 years

Electronics - Stereo jacks and catalogue errors

I worked with my new chip, trying to get it working from around 8pm to around 5am.

Eventually someone online from ozelecforum.com found the problem. There was an error in the way the pins were labelled in the catalogue. Amazingly helpfull, but what was he doing up at 5am. He lives in the same city as me.

I'm guessing he was trying to figure out some other insanely frustrating electronics problem.

I suspect I've joined a class of obsessed electronics nutters.

Oh well.

So after burning my fingers in two places by touching the hot end of a soldering iron, I finally got my new chip working. After taking all the bits apart, going over the circuit a zillion times, and rebuilding it, I got the tipoff of the error, and stuck it together in 5 seconds.

This error wasn't in the PICAXE catalogue, it was just a data sheet for a plug that I bought to make my own little test circuit for my new 14 pin 14M2 chip. Not quite the standard plug.

The end result is that I got the thing working, and then went to bed.

What all this means is that I don't know anything more about it other than it seems to be really small on the outside, and really big on the inside.

I'll know more about it by tomorrow.

Perhaps.

Or I spend the day catching up on all the sleep I'm owed.

Electronics - Soldering

Soldering irons are hot.

I know because I just touched one.

This was going to be an excited description of my new electronics stuff I bought, but typing with one hand in a glass of water slows you down somewhat, so this might be a brief post.

See.

Aquaponics - Restricting the feed intake to a system

This post relates to my ongoing electronics project Electronics - PICAXE fish feeder

The feed able to be dropped into the system is limited by the population of bacteria. They are in turn limited in population size by the amount of available real estate on the grow media, and to some extent other surfaces and even free floating within the water.

It's the bacteria that process the fish exhalations and excretions. As fish poop and breath, they add to the ammonia load within the system. The bacteria convert the ammonia to first nitrites, then nitrates. It's the nitrates that most plants enjoy, and the nitrates are not toxic to fish until they are very high.

Ammonia and nitrites one the other hand are very toxic to fish.

So we need to be careful not to overstock our systems with fish, but more importantly, we need to not over feed our systems.

And it really is the system we are feeding, not just the fish.

Generally in aquaponics, we talk about maximum fish stocking levels within a system, but it might be just as useful to talk about maximum feeding levels for a given amount of grow media.

In a small system like mine, I long ago gave up on the idea of eating fish every week. My feeding regimen isn't really about maximising fish growth. I have a set maximum amount of feed that I can add to the system without seeing ammonia and nitrites. When I feed my fish I have a little jar with a level marked on it. I fill the jar to that level each day, and don't ever feed them more than that. I feed them less that that, if the don't want to eat it due to temperature, or whatever fishy reasons fish have for not eating, but they cant ever have more because because the system cant ever have more.

Actually the system can have a bit more, but this way when I find caterpillars and worms and things I can add them at will.

Generally speaking it's also a good idea to run your system below it's maximum feed capacity, so that if something goes wrong, you have some margin for error.

If, for instance, a fish were to die and I didn't notice it for a few days, it would create a huge ammonia spike. That ammonia might take a few days for the system to process, and in my system, I'd get away with it, but if I ran my system closer to it's maximum feed input, an event like a fish death could be catastrophic.

It's ok to run your system close to the edge, but you have to be there all the time, and check it all the time.

I prefer being relaxed.



Not just Aquaponics - Restricting the feed intake to a system - 120 things in 20 years

Electronics - PICAXE Fish feeder

I'm slowly learning this electronics caper.

I think it's week five now, and I've learnt quite a bit.

I can program a chip just well enough, and almost know enough electronics to make my new improved fish feeder.

It looks like this so far.



What we are seeing here is an incredibly lifelike cardboard fish, acting the part of the hungry test subject.

Currently my prototype allows the user to set how much feed will be delivered by adjusting the length of the pulse to the motor (simulated with the green light).

The user can also adjust the length of time between feeds.

A flashing light (not shown on the video) flashes out long flashes for 10's and short flashes for 1's to indicate the number of feeds so far today. ie 23 would be     long long   short short short (actually very easy to read)

A red light comes on indicating the fish can feed. This will be placed near the lever so as to condition them to the feeding routine. If they attempt to feed when the light is off, they wont get any food.

Eventually there will be a lever in the water that the fish hit when they want feed (tested and working fine - it takes them around 4 or 5 days to work it out)

A light will come on when they can feed, and will be off when they are being too greedy.

There will be a method of adjusting the times between feed, the total number of feeds, and the amount delivered each feed. (probably with a screwdriver so you cant do it by accident)

There will be a switch that reverses the motor, and delivers one days worth of feed via the back of the feeder so you can put a bucket under it and test any adjustments you have made. This test feed can then just be returned to the hopper.

It will have a hopper.

The feed will be delivered via a small geared down motor turning at around 36 rpm, and a screw of some kind.

It's an open source project, (software, hardware, and actual device) and will all be offered freely to make as you see fit. If I can work it, I'll even make a solder-less version that you can put together with a screw driver.

I'll make sure everything I make it out of is easy to find pretty much anywhere.

If all goes well.

not just Electronics - PICAXE Fish feeder - 120 things in 20 years

Electronics - Diodes

Diodes are less interesting than you might think.

But they are actually very useful.

Diodes are the things you would sick in an electronics circuit if you wanted power to only flow in one direction.

They act like a valve.

They tend to look like this.

If you have something like a wind powered generator, it would act as a motor if you connected it to a battery.

If you want to make power rather than use power, you need to stick a diode between your windmill and your battery so that power can only flow one way.

If you didn't have diode, the windmill would charge the battery if it was spinning fast enough, but then if the wind died down, the battery would power the windmill. Not such a bad thing for a novelty windmill sitting proudly in your front yard next your flamingos, but not so desirable if you happen to be a power company.

Perhaps even embarrassing if you happen to be a power company.

Sometimes they look like this and are called LED's or Light Emitting Diodes.

You would have seen them before in just about everything electronic. They are absurdly reliable little things, and put out lots of light without all the heat that normally comes with bright things. As a result they are very thrifty with their power use, so perfect for an indicator light or low energy keyring torch.

Any light that also puts out heat is a bit of a waste of energy if you don't also want the heat.



There are a couple of other diodes that I've heard of.

One is a Schottky diode, All diodes create a bit of a drop in voltage. I'l not sure how, probably they waste it as heat, but the Schottky diode is a bit special because it has less of a voltage drop. It costs a bit more, but is useful in things that are solar powered or need batteries to last a long time. Anywhere saving every bit of power counts.

Another special diode is a Zenner diode. As far as I can tell, the cool thing about this device, is that whilst it allows current to flow in only one direction, it breaks down, and allows current to flow backwards at a certain pre-designed voltage. This might allow you to put a T-junction into your circuit in such a way as to normally stop current flowing down the T, unless the current gets too high. If the current is too high at any point, the Zenner breaks down, and allows flow. If you were trying to charge a small rechargeable battery with a little windmill, you could use one as a charge regulator by sending some of the current to say a light bulb to be wasted, if the voltage got too high (too much wind speed), of if the battery was fully charged.

I think.

Do doubt there is a lot more to diodes than I know, and there's at least some chance this is all wrong.

If you are planning a Mars mission or anything important, I'd do a little more research, and not rely solely on this information.

And good luck with that Mars mission.




Not just Electronics - Diodes. 120 Things in 20 years

Popular Posts