Experimentation! Project Logs

Vegetable Garden

A few months ago I decided it would be quite fun to keep my own little vegetable garden in my spare time, and just grow a whole assortment of things that could be eaten. This idea quickly spiraled out of control into the monstrosity it is now… A pic micro-controlled, serially data-logged, moisture and temperature monitored automated growing area. xD

I started off wanting a simple automated irrigation system, since I often forget to water it! and when I do remember, I forget to go out and turn the water off which results in floods πŸ™ … I had a scout around the irrigation sites on the net and found that my best option for this garden was simple Microjets of which I could run 10-12 on residential pressure, I would also need some irrigation tubing, a few fittings and the most important part; an electronically controlled solenoid water valve allowing me to turn the water on and off electronically…

Off I went the the local irrigation wholesaler and acquired the needed materials including the valve for ~R300 total. The valve needs 24VAC to open, thus I would need a 24v AC transformer that I grabbed from work.

The valve, with a nice garden hose adapter.. πŸ˜€

The circuit: I decided the easiest way to switch the 24VAC would be with a relay as I have a couple in the misc parts box, I also decided I’d use a PIC micro-controller to open and close the relay and allow me to set timing values. I opted for a PIC16f88 mostly because I have some lying around but also because they are easy to use with their internal oscillators and multiple I/O pins. I also had some 7-segment LED displays that I have really wanted to play with for a while now so that was to be my interface, along with some tact switches.

Schematic of the controller in its present state.. (This is the first schematic I’ve made in Eagle so its not great…)

The transformer is a 12-0-12v transformer, so I took the center tap and one of the 12v wires and put it through a full-bridge rectifier that I salvaged out of the power supply of some other misc electronics that was broken (I collect peoples old electronics/computers to either try repair or reuse for parts πŸ™‚ ) I also used a big smoothing cap (25v 4700uf) over-kill but not a bad thing πŸ˜› then I put this through an lm7805 and another smaller smoothing cap to provide the PIC and other components with regulated 5V. The common & normally open pins of the relay are connected between one side of the valve and one of the 12v outputs of the transformer, the other side of the valve is connected to the other side of the transformer. The PIC closes the relay through a small NPN transistor that connects the relay to ground, the other side of the relays coil is connected to the ~12VDC available from the rectifier..

The code: originally the plan was simple; display the time in minutes between 0&9 on the 7-seg display, have an up and down tact switch to increase/decrease the time and an ‘activate’ tact switch to open the valve and activate the timer, then close the valve after the elapsed time. I set this all up initially on a bread-board and started programming the PIC which was tricky but alot of fun as I had to learn how to use the PIC’s internal timers to time relatively accurately.. I found the PIC data-sheet and This post invaluable to getting the timer working just right.

I managed to get everything working after a bit of troubleshooting, but I felt it was a bit underwhelming to use an entire PIC 16f88 to just read some switches control one output and some led’s and count down a few minutes, considering it has many other features like ADC’s, more timers, USART module etc… I also decided this would be a great opportunity to expand my knowlage of PIC’s..

I started by using the ADC to read the value of a MCP9701A temperature sensor that I had lying around (from back in the day when you could actually get FREE samples from Microchip… πŸ™ ) I also made a soil moisture sensor thanks toΒ πŸ˜€ but what to do with this awesome new data we can read?

Send It to a PC of course! πŸ˜€ 8) since I recently learnt serial communication between a PC and a PIC I decided to create an nice monitoring system for the garden that sends data to the PC which is then logged into a SQL database and can be graphed etc. I also added functionality to set the time on the timer and activate/deactivate the pump. Eventually I’d like this to be controlled from a web-page but until I get around to implementing that I can still log in using remote desktop over the internet and water my garden! πŸ˜€ something I actually managed to do recently while I was in another city checking out a university I’m interested in attending, using my windows mobile phone πŸ˜€ was quite a cool feeling πŸ˜€

Just a very basic GUI for testing purposes, works thou! thats the important part πŸ™‚

I still need to do alot of coding to get it ‘right’ but for the most part it works πŸ˜€

After I managed to get everything working on the bread-board I used some perf board to assemble a prototype, It does the job but eventually I’ll make a proper PCB for it once I have all the code/features worked out how I like.. I used a chip socket so I can remove it for programming but on a proper PCB I’ll be able to implement ICSP properly..

Small project box I found to house it, will eventually stick it on the wall with a nice perspex cover..

I need to do some more work on the actual garden now, and make a better moisture sensor because the one I made was a bit.. erratic… and I need to do alot of work on the code, as well as hopefully get it controllable from a webpage, and possibly even use things like the moisture sensor data to water automatically at certain levels. I could even implement a watering schedule controlled by the PC and configurable over the internet! something that commercial irrigation controllers costing many thousands of rands dont offer… πŸ˜€

Anyways let me know what you think in the comments below! I’ll upload a video of it in action and the source code in another post soon once I’v cleaned it up a bit πŸ˜€ oh I’d also like to mention again, which is an awesome site and provided alot of inspiration for this project and my garden in general… why spend hours on farmville when you could spend those hours in a real garden of your own? so much more rewarding πŸ˜‰



gfx Overclocking

I have the new Fallout. It is amazing. Finally I have a new game that I enjoy and that my graphics card(MSI NGTX275 Lightning) cant run on ULTRA on my HD 1920×1080 screen without a tiny bit of lag, Which means I now have an excuse to overclock this card! πŸ˜€ More than its factory overclock anyway! πŸ˜› For starters I’m running (a now -old-) Intel Q6600 under (Swiftech πŸ˜€ ) water-cooling @ 3.6ghz (stock is 2.4ghz) and 6gb of DDR2 RAM also overclocked(thou I forget how much xD) So it’s just my card that has been stock up till now!

To begin the stock cooling on this card is really good, much better than the reference design.. BUT it still idles in windows ~56’C (to be fair it is directly above my triple 120mm radiator for my CPU πŸ˜› ) but I thought it would be best to take her apart, investigate and at the very least replace the T.I.M with something better like arctic silver ceramic..

On taking her apart I found that the heat-sink surface had horribly deep milling groves in it! NOT very good for efficient contact at all! This meant only one thing! I need to lap this baby! πŸ˜€ Break out the sandpaper and 3 hours of your life kids! πŸ˜›

A quick scratch in the sandpaper box yielded some good grit sizes, namely; 220, 400, 800, 1000 & 1200 more than enough to get an awesome surface (but not quite mirror mind you) you also need a FLAT surface like a tile or mirror, I found a big piece of glass lying around. And a little bit of water with a drop of dish soap in it which I find makes life easier…

WOOT! there is a proper copper block under here! not a cheap aluminum one πŸ˜€

Start with the 220 grit and get through the top layer of crap until a flat uniform surface is achieved, then move up a grit size until the -scratches- from the previous size are removed (AND not before!). Also I find the best “technique” to use it to move the heat-sink in straight strokes for 10-20 strokes while applying moderate pressure and then rotate the heat-sink 90′ and repeat. This ensures the surface is lapped evenly…

400 grit… things coming along…

getting near to mirror…

Ahh finally after 3 hours of lapping we’re at the 1200 grit stage and things are looking good! Not quite mirror finish but as smooth as it needs to get for our application. Using a higher grit from here e.g. 2000 – 2500 will result in a mirror finish but wont yield any more performance increase so just for looks really.. I wont bother πŸ˜›

even still thou! It’s pretty damn shiny πŸ˜›

Meanwhile back at the ranch… I gave the fan mounts a quick spray for some extra flair considering this is now the modified, upgraded model xD also cleaned everything else up a bit πŸ™‚

Fan’s back on… I actually put them on the wrong sides and had to change it later. xD -selfnoobpwn.

Top cover back on… pic says it all…

Cleaned up the mating surfaces nicely with my arctic surface prep and then applied some nice arctic silver ceramic and reinstalled πŸ™‚

I must say, while lapping is alot of work it looks gooooood and feels guuud too πŸ˜€

Got her back together without the infamous remaining screw! πŸ˜€ πŸ˜€

So what about the performance! Back in windows after some testing temps seem to idle around 45’C now!! A HUGE improvement of around 11’C!!! Hopefully this hard-work will pay off in some added overclocking headroom since more clock-speed needs more voltage which results in more heat! And the point this card start shutting down is 80’C to protect itself… BUT that’s it for now kids! check back soon for some proper overclocking action πŸ˜€


Project Logs

Car PC Install.

Well the story of my Car PC starts off a few months or even years ago when I still had my Ford Fiesta. Being me I wanted to upgrade my standard head unit to something a little more functional(running around with a stack of CD’s that have ~20 tracks each is fun for a while, but when you have a music collection in excess off 100Gb you want a bit more capacity πŸ˜› ). Now I could have installed an MP3 capable front loader or hacked an AUX in connection for my iPod, but no; If I’m going to do it, then I’m going to OVER do it πŸ˜€ cause’ that’s just how I roll… xD

Thus I decided my car had to have a full PC with a touchscreen in the dash to control it πŸ˜€ :D. For starters I decided it wasn’t worth ripping my 2005 Fiesta’s proprietary dash apart to fit a such a fancy piece of equipment, and I wasn’t planning on keeping that car for too long anyway so I decided to wait for my next car that would last me a little longer first :). Eventually though, on an equally happy/sad day the Fiesta’s time was over,I had a lot of fun in that little car, especially because it was my first car, but times change. I now drive a Subaru Impreza 2.0R (MY06) the ‘hawk eye’ shape, I really need to dedicate a post to how amazing this car is.. words cannot describe.. so I’m just going to leave you with this for now:

The Subaru!

Teh Scooby!

YES, I know, She’s beautiful πŸ˜›

Right enough of that, onto the sound-system! For starters the Scooby has a standard Double-Din dash with a front loader that plays standard audio CD’s and a tray. Nothing exciting. It also come equipt with 4 speakers two big ones in the front doors and 2 lil’ins in the back doors, they certainly aren’t amazing thou with little to speak of in terms of top or bottom end, obviously Subaru spend alot more money on the engine and chassis then the speakers! just what I need, perfect excuse to mod.

Now the plan is quite simple, get double din touchscreen and stick in the dash, hook it up to a PC under the passenger seat and connect that to an Amplifier under the drivers seat which is connected back to the speakers to drive them, and then lastly a sub-woofer in the boot with another amp to drive that. However as per usual this is easier said than done…

Lets start with the Touchscreen, I purchased on eBay a Lilliput EBY701-NP/C/T 7″ Touch Screen all-ready modified into a double din frame from eBay seller theonlykid1. Great seller and I would highly recommend to anyone.. This modified screen was quite alot more expensive than just a standard screen, but I thought it would be worth it to save myself some time and hassle of building my own frame, and the risk of modifying my brand new screen and voiding the warranty(the eBay seller offers a warranty with their modded screen.) and I had the piece of mind that the screen would fit in a double din fitting, however…

Lilliput in the dash

It fitted but I had to mount if behind the silver bezel of the dash, apparently this is the slightly non standard part of the Scooby. If I were to do it again (which I may some day) I would save myself some cash, order the standard screen and have a frame lazer cut to fit from brushed aluminum. That way I could get it to fit flush and look all-most stock, It would be very sexy I’m sure πŸ˜€ but as it is it looks decent and works well so moving on…

Next we have to think about the PC. I decided to go with a mini-atx desktop motherboard since they are cheap and reasonably powerful and because I had one lying around πŸ˜› I teamed it up with a 2.6Ghz wolfdale C2D processor, 2 gigs of DDR2-800 RAM, and a 320Gb Seagate barracuda drive, basically just stuff I had spare in my parts room. Plenty power and nice and upgradeable too πŸ™‚ the only other thing to worry about is the PSU. Of coarse a standard PC PSU runs on 110-240V AC and putting an inverter in my car didn’t sound like the best solution… after much reading on the forums(which I highly recommend as the place for most car PC beginners to start their research) I decided that the M4-ATX was the right solution for me. It has a wide input voltage range from 6-30VDC (perfect for car PC application with varying supply voltage) and enough juice to run my PC spec, not to mention other awesome features such as starting or shutting-down(or in my case hibernating) the PC automatically when the ignition is turned On/Off and waiting a user selectable amount of time for the PC to turn off before cutting the power, allowing for clean shutdowns and battery protection in the case of the PC freezing. It also survives engine cranks and monitors the battery voltage and turns the PC off before it gets too low to start the engine if your using it when the car isn’t running (I haven’t tested this feature yet thou! :P) all in all a very good package and again I would highly recommend it! πŸ˜€ So it was off to eBay again to purchase that…

I decided the PC was to be housed in a custom Perspex case that I built. This started with some cardboard mockups:

After some time I came to the conclusion that this would just about fit under the seat and still leave enough room for the passengers in the back’s feet πŸ™‚ next I took some measurements and jumped onto Google Sketchup and created a nice little enclosure out of perspex for the PC to fit into πŸ˜€

With the measurements now in hand I headed off to the perspex shop and had the pieces cut to size (set me back around R200 for the perspex). I also stopped at the hardware store and got some angle aluminum and to the Action Bolt to get some really nice (BUT expensive!) stainless steel hex machine screws. Fabrication time!

It seems so easy now when it takes just a few moments to just upload some pics and throw them one here… however this build took about 3 or 4 FULL days. there was LOTS of measuring/checking/drilling/checking/cutting/checking/taping/checking. etc. etc. I think you get the idea πŸ˜› To mount the motherboard I drilled and taped some holes in the bottom piece and put some little brass risers in that the motherboard screws to. I’m not going to go into much detail here, I think the pics are pretty self explanatory… πŸ™‚ On to TESTING! :

Testing went very well! I installed Windows 7 Ultimate along with the Centrafuse front end. I just used a standard PC PSU and did the ‘dodgey jippo the green wire to black wire trick’ to start it up and then used the high current 12V line to feed the M4-ATX. I found that with the screen and PC connected I was drawing about 3-5 Amps, obviously this will increase to about 10-20 with the sound connected so I will run my supply cable in the car with capacity to supply 20A and fuse it at about 25 or 30.

Seeing it all running after so much planning and research and not to mention the money I have poured in was thrilling and not just a little bit re-leaving either! πŸ˜€

I also hooked one of my amps up with 2 speakers I had lying around! I sat for 2o min and just played with my little touchscreen! super exciting! couldn’t wait to put it in the car!!! πŸ˜€

The next day I awoke anxious to install my new system! πŸ˜› The first step was deciding what to do with power. I had access to some really nice 10 Gauge copper cable in red insulation which would meet my power requirements! After much searching on teh interwebz I found out there should be a grommet just above the drivers foot-well, I had a look and she was there! πŸ˜€ definitely made life easier, I was worried I would possibly have to drill through the firewall!… I decided to run two cables, one to the positive terminal of the battery and one to the negative for ground(I only had red cable so the ground cable has black insulation tape around it at regular intervals. I routed the cable through the engine bay and through the grommet into the back of the dash:

Nice and neat and hidden πŸ™‚ I later sealed the grommet with silicon.

Removed the dash on the Scooby; super easy to do, unscrew gear knob, unclip the bottom, take 4 screws out, dash comes apart πŸ˜› routed the power through the dash and then down the side of the center console all hidden away out of sight πŸ˜€ distribution block sits under the armrest box between the driver and passenger seats and power runs to the underneath of each seat for the PC and the Amp.

I love Scoobys! nothing overly complicated, everything just clips and screws together easily and logically! taking her apart is a piece of cake.

Unfortunately I didn’t get any pics of the PC install (I’ll take some when I pull it out next) but it was pretty straight forward, just connecting the cabling. I also ran the signal/USB cable for the screen down the middle of the center console while it was off and I taped into the IGN wire of the head-unit wiring harness to turn the screen on when the car is on, I also split this wire off and ran it down the center console to the M4-ATX to provide a start-up signal since the main power is always connected to the battery, and it also runs across to underneath the other seat to enable the Amp for the speakers with the car is started. The tricky bit was running four sets of speaker wire from the amplifier back up the center console to the dash. I found a Subaru head-unit wiring diagram on which I used to connect all the speakers to the amp (I was too lazy to run new cables to each speaker, the stock ones will do just fine for the moment :P) as you can see below:

Each speaker has its own dedicated cable so I can go to a 4ch amp if I decide to(read: get enough money to) xD

Next up was the amp install. Nothing fancy just and old 300W Targa amp that I had lying around, more than enough to run the stock speakers! On the amplifier and PC I stuck strips of Velcro underneath so they stick to the carpet and don’t slide around under ah.. high G forces. πŸ˜› πŸ˜€ but are still easily removable. I also decided no to put the cables under the carpet since they are hidden enough where they are and still make a clean enough looking install.

Notice the cables going to the right: Power, IGN, and audio to be routed to the sub in the boot πŸ˜€

For the sub install I’m running another Targa 300W amp and a 12″ sub in a sealed enclosure (again, I’ll get pics next time I’m in there) I happened to run low on the power cable so I just ran a 12V to the boot and got a ground off of one of the frame bolts under the back seat:

Remember to scrape the paint off around the Lug to make a good contact.

And that’s about it for this relatively simple Car PC install πŸ˜€ πŸ˜€ It was certainly a happy happy moment when I turned the car on and everything sprang to life and no Magic Blue Smoke was released even though I was standing ready to collect it all up! xD It took a bit of tweaking with the amplifiers gain controls and Centrafuse’s graphics equalizer to get the sound right but its sounding pretty decent to me ATM! πŸ˜€ and with stock speakers too! The main amp is only turned up around 50% so I defiantly have capacity to put more powerful speakers in too! Time for a little vid:

Well I hope you enjoyed this build! It took me about a full week 8-5 to get this thing built and installed + countless hours researching and ordering, but I certainly had alot of fun and learnt alot in the process! πŸ™‚ I defiantly have some mod’s and improvements that I’m planning on doing such as a redesigned PC case and USB ports in the center console but that can wait for another post… In the mean time I’m going to enjoying my entertainment system while driving my entertainment device πŸ˜€ πŸ˜‰ If you have any questions or whatever, well, that’s what the comments are for below! πŸ˜€ πŸ˜‰

Journey safe!