rulururu

post OrchidPi

June 18th, 2014

Filed under: Tech — RHH @ 10:51 pm

So here is another project that I’m working on.  This is just going to be a short post because a few people have asked for more information and code (what there is).

What it is:

Two zone temperature/humidity monitor with custom case for my wife’s orchid tank. Orchids have unique environmental requirements. Next feature is to write the values to a database so that I can produce a chart of historical values.  Another desired feature is to control a humidifier as needed to maintain adequate humidity.

 

What it looks like installed:

Installed

What it looks like up close:

upClose

Here is the gnarly wiring diagram:

 

ugly

For this part keep in mind that I am not a programmer by training or any other way.  I used several internet sites to come to this.  Some of those sites provided a significant amount of code.  I will try to cite them at some point.  You will need the LCD library from Adafruit.  I will get that link on here later.  Here is the code:

#!/usr/bin/python

from Adafruit_CharLCD import Adafruit_CharLCD
from subprocess import *
from time import sleep, strftime
from datetime import datetime
import subprocess
import re
import sys
import time
#import MySQLdb as mdb # later feature
#import time
#import datetime

lcd = Adafruit_CharLCD()

lcd.begin(16,1)

while 1:
    output1 = subprocess.check_output(["./Adafruit_DHT", "2302", "4"]);
    matches = re.search("Temp =\s+([0-9.]+)", output1)
    if (not matches):
          time.sleep(10)
          continue
    ctemp = float(matches.group(1))
    ftemp = ctemp * 9/5.0 + 32

    # search for humidity printout
    matches = re.search("Hum =\s+([0-9.]+)", output1)
    if (not matches):
          time.sleep(10)
          continue
    humidity = float(matches.group(1))
    #adjust value for accuracy
    humidity = humidity - 9

    output2 = subprocess.check_output(["./Adafruit_DHT", "2302", "18"]);
    matches = re.search("Temp =\s+([0-9.]+)", output2)
    if (not matches):
          time.sleep(10)
          continue
    ctemp2 = float(matches.group(1))
    ftemp2 = ctemp2 * 9/5.0 + 32

    # search for humidity printout
    matches = re.search("Hum =\s+([0-9.]+)", output2)
    if (not matches):
          time.sleep(10)
          continue
    humidity2 = float(matches.group(1))
    #adjust value for accuracy
    humidity2 = humidity2 - 15

    lcd.clear()
    #lcd.message(datetime.now().strftime('%b %d %H:%M:%S\n'))
    lcd.message('1 ' + 'T %s' % ( ftemp ) + ' H %s' % ( humidity ) + '\n' )
    lcd.message('2 ' + 'T %s' % ( ftemp2 ) + ' H %s' % ( humidity2 ) )


 

Note: If I have used some of your code and you would like to be linked or given credit, please just let me know.  I will leave comments on for a short time.  I get so much spam!

post Raspberry Pi and Parallax Ping)))

January 5th, 2014

Filed under: Tech — RHH @ 3:15 am

I have had a desire to be alerted when the salt level in my water softener gets low. I have put this off and put this off. My original plan was some convoluted mechanism of springs and weighing the barrel. The main reason for that was the concern that the salt would corrode any electronics that were inside the barrel. Later I thought of a sealed magnet with a reed switch or hall affect sensor on the outside. Then I read a post somewhere that basically said that the salt shouldn’t be an issue. I like that! I went with the Parallax Ping))) sensor since I had a couple around. Originally, I had planned for this to be an Arduino project. But I become very pro-Raspberry Pi since then. It has less I/O than an Arduino, but most (all) of my projects require very few I/O pins. The other day I decided that this needed to be completed. I found an article that very simply and easily got the distance value from the Parallax Ping))). That forum post is here.  User feiry absolutely nailed it!  As feiry did, I used pin 11 on the Pi for SIG, pin 2 on the Pi for 5v and pin 6 on the Pi for GND.

PiPing

You will have to forgive that image.  I’m new to Fritzing.

The next important bit is the code that will get the distance for you.  As I said this is the code that was posted by feiry back in October.

import time
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BOARD)
GPIO.setup(11, GPIO.OUT)

#cleanup output
GPIO.output(11, 0)

time.sleep(0.000002)

#send signal
GPIO.output(11, 1)

time.sleep(0.000005)

GPIO.output(11, 0)

GPIO.setup(11, GPIO.IN)

while GPIO.input(11)==0:
   starttime=time.time()

while GPIO.input(11)==1:
   endtime=time.time()
   
duration=endtime-starttime
distance=duration*34000/2
print distance

I wrote a shell script (I need to learn more python) that calls that python code, then takes the value distance, populates a variable with it and inserts it into a mysql database.  Then I have a script on my database server that will check various values from the database and do things based on those values.  Mostly it will email me when a value requires attention.

There you have it.  A Raspberry Pi based water softener salt level notification tool.

Special thanks to feiry and richlish@gmail.com
Forum thread: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=37&t=7688
Fritzing part for Parallax Ping)): http://code.google.com/p/fritzing/issues/detail?id=875#c508

post We’re still here!

November 8th, 2011

Filed under: Tech — RHH @ 11:34 pm

I just wanted to post a quick note that we’re still here and now available on Google+. https://plus.google.com/u/0/b/110280939564300760231/

See you there!

post PowerMeter and Hohm

July 3rd, 2011

Filed under: Tech — RHH @ 1:05 am

Recently Google announced that they are retiring Google PowerMeter.  PowerMeter was a service that gave homeowners the ability to see how much electricity they were using.  It was hoped that this information would help homeowners save energy by knowing when they were using the most energy.  I personally was researching the hardware to build a device to track my energy use and upload that data to Google PowerMeter.  Now I and many others will have to find a new way to do this.  It seems that there weren’t enough users to justify maintaining the service.  It’s my opinion that the utilities killed it.  There were very few utilities that actually participated with the service to provide energy usage information to their customers.

Within a week of the Google announcement, Microsoft also announced the end of their competing service, Microsoft Hohm.  Hohm intended to provide similar information to that of PowerMeter.  Hohm did have a few other features, but they were not that impressive in my opinion.  However, the ability to monitor your energy usage is huge regardless of which solutions you went with.  Unfortunately, you can’t choose either of the them now.

What are we going to do?  How can we get this information?  Honestly the utilities that use smart meters should be providing this to their customers automatically.  My utility doesn’t.  They have installed a smart meter on my house…. then nothing.  I’m pretty disappointed in the whole thing.  Apparently some utilities do offer this information and I think that is fantastic.  They all should.

post CherryPal!

December 27th, 2008

Filed under: Tech — RHH @ 10:48 pm

All those that said it was vaporware have been proven wrong.  Sure it was late.  When was the last time that you saw any technology product delivered on time?  They all slip.  Most of the time they slip their schedules so early that the customers don’t even know.  Regardless, they have shipped and many people have them in their hands.  I am one of those people.  I haven’t had much time to use it, but I’ll give my first impression now, with more detail later.

I opened the box and was impressed with the construction and the size.  There was a card in the box that told me not to change the username just yet.  I’m not a fan of that security model.  I plugged it in and it came right up. The mouse did freeze up on me fairly quickly.  It turns out the wireless mouse I was using was causing problems.  As I undestand it, the CherryPal using so little power that it has some trouble with USB devices that need power.  I connected an old wired USB mouse that I had and all systems were go.  I did poke around a bit, but ran out of time.  The main thing I noticed was that the speed was very usable.  I had heard that there were some speed issues.  Personnaly, I thought it did pretty well.  I understand that this computer is not a horsepower machine.  More to come…

Note: Just to be clear I did receive a CherryPal PC for free.  Although it appears that was wasn’t vaporware, has become vaporware, or at least vapor-company….

post Not “new” but still good

August 18th, 2008

Filed under: Tech — RHH @ 8:18 am

T. Boone Pickens isn’t the only one putting some cash into wind power.  It appears that there is a plan to build a wind farm off the coast of Delaware.  Like the title says, this isn’t really new.  It’s been in the news for a few months.  I just wanted to bring it up as another example of how people are taking this kind of thing seriously.

CNN article

post Pickens for President!

July 24th, 2008

Filed under: Hippieness of the day,Tech — RHH @ 11:59 pm

Maybe not president, but how about Secretary of Energy?  I need to read up on it more.  However, from what I have read and heard the Pickens Plan sounds pretty darn good.  Take a look:PickensPlan
I understand that distribution is a problem. Transmitting electricity over long distances is not very efficient. You actually lose power in the process. Some winds farms will shut the turbines down during times of reduced demand. That’s not good! There are ways to “store” electricity. Of course you can use batteries. My favorite is underground air tanks. When the demand is low, use the extra power to run compressors that force air into underground tanks or caverns. When demand is high release the stored air and drive a turbine with it. Viola! Stored electricity.

There are plenty of sources of power available. Many of them are immature, but it we work on them, we can make them happen.

  • Wind power is pretty mature – I’m not sure about the efficiency
  • Photovoltaic (typical solar) – Not very efficient yet, but getting better
  • Solar Thermal – concentrates sunlight on something to make it hot, use that energy. My favorites are the parabolic trough types that heat oil or molten sodium.
  • More later…. need sleep….

    post CherryPal Coming soon!

    July 21st, 2008

    Filed under: Tech — RHH @ 8:33 am

    cherrypalThe CherryPal C100 Desktop is available for order.  They expect to start shipping at the end of July.  This little system is very promising.  The specs are below as listed on their website.  It looks very straight forward.  It has a monitor connectotion, 2 USB ports one 10/100 ethernet port and an audio out.  I would liked to have seen 4 total USB ports.  Once you connect your keyboard and mouse you’re out of connections.  Of course you could use a hub but that’s an extra device to take up deskspace.  Using a 400MHz Freescale chip and 256MB of RAM, I’ll be interested to see what kind of performance we can get from this.  At $249 it’s a little more expensive than I had hoped.  However, if it really runs at 2 watts as claimed, it would eventually pay for itself in energy savings.  I expect to start seeing reviews of this unit soon after Aug 1.  Good Luck!

     

     Specifications

    Freescale’s MPC5121e mobileGT processor, 800 MIPS (400 MHz) of processing
    256 MB of DDR2 DRAM
    4GB NAND Flash-based solid state drive
    WiFi 802.11b/g Wi-Fi
    Two USB 2.0 ports
    One 10/100 Ethernet with RJ-45 jack
    One VGA DB-15 display out jack
    Headphone level stereo audio out 3.5mm jack
    9vDC 2.5mm 10 watt AC-DC adapter power supply
    Weighs 10 ounces
    1.3” high, 5.8” x 4.2” wide

     

    cherrypal ports

    post 4 watt chip!

    July 10th, 2008

    Filed under: Tech — RHH @ 8:14 am

    Intel D945GCLF

    Intel has released a motherboard that has me pretty excited. Not as much as I was when I first heard about it, but still excited. Initially I mistook the report as saying the board only used 4 watts of power. That would be amazing! I have a couple of systems that run over 100 watts. It turns out that the chip (processor) uses 4 watts. The chipset that drives the rest of the board uses another 22 watts. That still leaves the board running at under 30 watts which is still good. I’m considering this board for my next build. Unless something better comes along of course.

    Link

    post Green Tech

    July 6th, 2008

    Filed under: Tech — RHH @ 7:52 pm

    Lately, I’ve been looking for an energy efficient PC. I have upgraded to an 80 Plus power supply in my desktop, but it still uses more power than I think is necessary. Now I think a small solid-state system is the way to go. Zonbu came out with one a while ago. I don’t recall the specs, but I’ll track them down and post an update. When they first came out they were selling for $199 (I think), but required a subscription service of ~$20 a month. Not interested! It looks like they are offering the PC without the service now, which is a plus. But they’ve increased the price to $299. Not interested! They do offer the OS as a download. I like that. Unfortunately the hardware is still an issue.

    Recently there has been some talk about cherrypal. It’s a similar type of system and looks promising. The last time I checked they were expecting an Aug. 4 release. Hopefully, they’ll be offered at a better price and with no subscription requirement.

    Personally, I think if they can sell them for ~$150 they will be available to an entire new demographic. They price would be in reach for many, many more people. There are also those of us who would like several of these low power, silent PCs. I would like to have one in just about every room. That’s not going to happen if the price isn’t right.

    -RHH

    ruldrurd


    Powered by WordPress, Web Design by Laurentiu Piron
    Entries (RSS) and Comments (RSS)