escort ordu kıbrıs escort escort izmit escort bodrum escort rize escort konya escort kırklareli escort van halkalı escort escort erzurum escort sivas escort samsun escort tokat altinrehbereskisehir.com konyachad.com sakaryaehliyet.com tiktaktrabzon.com escortlarkibris.net canakkalesondaj.com kayseriyelek.com buderuskonya.com DIY humidity sensor - UK Cigar Forums

Announcement

Collapse
No announcement yet.

DIY humidity sensor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • moteyi
    replied
    The only thing I gleaned from all of that was from the screen shot where it said - type "help" ! I think I could handle that.

    Sent from my SM-G900F using Tapatalk

    Leave a comment:


  • ha_banos
    replied
    OK I think I've sussed the connection stuff - its worse than the software! I'll need to do some soldering!!

    The test was a success! I had to hold the sensor against the pins with my hand to get a connection with the pins, but this is just a test. But I can get some readings from the sensor using some code. That's the key thing!!

    IMG_20180218_185907.jpg

    And with one hand - power back up and run the initial tests...

    This command reports the hardware address of the sensor if its found - 40 in this case. So the connection is good.
    Screenshot from 2018-02-18 18-56-40.png

    So now we can run some python commands to get some humidity and temp values - the values seem a bit out but ill try to figure out why...
    (This is what the Python3 shell looks like)
    Screenshot from 2018-02-18 18-57-46.jpg

    For those with the eagle eyes - I breathed at the sensor to see what it reads. The reading went up to 97% humidity and dropped back to the base level 23% after a few moments.

    And in order to get to this point had to do some more setup on the Pi Zero... so here goes again:

    1. Enable I2C and GPIO functions
    - Run the configuration utility https://www.raspberrypi.org/document...aspi-config.md
    - I enabled the I2C and remote GPIO (may not need the latter, not sure) both done from the Interfacing Options menu item.
    - Restart the PI Zero after doing this.

    2. Install some Python3 drivers and the GPIO drivers
    - WTF is Python?!? See https://wiki.python.org/moin/FrontPage
    - Run the following commands to do so:
    sudo apt-get install pigpio python-pigpio python3-pigpio python3-pip python-smbus i2c-tools
    pip3 install htu21df

    Now you can test to check the sensor is connected:
    sudo i2cdetect -y 1

    And get some readings:
    python3 -m htu21.htu21
    Last edited by ha_banos; 19-02-2018, 07:46 AM.

    Leave a comment:


  • ha_banos
    replied
    For those still with me - I'll now have to figure out how to connect the humidity sensor to the PI thingy

    Leave a comment:


  • gojira
    replied
    I didn't understand one word of what you just posted.

    Leave a comment:


  • ha_banos
    replied
    Little more work on the little PIZeroW...

    Note the login details by default are username is "pi", password is "raspberry"
    Do change the password! (https://www.raspberrypi.org/document...usage/users.md)

    1 - Enable the remote SSH daemon
    This is a service that allows you connect from one computer to another. So I can connect and control it over my network so I dont need a keyboard and HDMI connected any longer!
    Do this by following https://www.raspberrypi.org/document...te-access/ssh/


    2 - Setup the WiFi connection
    Instructions are here https://www.raspberrypi.org/document...ireless-cli.md
    Which basically distils down to running this command after logging in from the command line
    wpa_passphrase "your WiFi SSID here" "passphrase goes here" | grep -v "#psk=" | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf > /dev/null


    Boom! I can now tidy up quite a bit I can go from the wired setup on the left to the completely wireless setup on the right - powered by my USB battery packs.


    From a learning perspective there's a good few concepts going on here if your a newbie.
    - The command line
    - SSH - security
    - Wifi configuration - including DHCP and reserving IP addresses

    Leave a comment:


  • ha_banos
    replied
    Found this! Ultra low power. Runs on AA battery potentially for a year!


    This could be Uber cool.

    I know a dude with a 3d printer too so could get a case made up 🤩

    But let's get this finished first as a test run!....

    Leave a comment:


  • SHAMZ84
    replied
    Looking good banos

    Leave a comment:


  • SHAMZ84
    replied
    Originally posted by Budgie Smuggler View Post
    I like the look of this. Do you think this would be a good intro to coding for a kid?
    Yea...the rpi was originally created for school to help kids in to coding.

    The things you can do with a pi is amazing...from multimedia system to wireless cameras storage units, consoles, the list just goes on.

    Leave a comment:


  • ha_banos
    replied
    Ok what did I get?

    1. Pi zero official case. With cutouts to get to the pins.

    2. HTU21D-F humidity sensor.

    3. Raspberry PI Zero W with the GPIO connector already soldered (arrowed in the picture.) W for built in WiFi.

    4. Micro usb cable for power only.

    5. Micro usb host cable. Come with mobile phones sometimes so you can attach normal usb things like drives or keyboard. Because there's only one USB port I use a wireless dongle which means I can use a wireless keyboard and mouse.

    6. A mini HDMI to HDMI adaptor. Or cable will do.

    7. Micro SD card. 4gb or more.

    Need all this to get set up I think. Once up and running. The hdmi and USB keyboard won't be needed.

    The fiddly hardware will be working out how to connect the sensor to the pins on the zero. There's cables for this. And I'll need to solder the legs to the sensor board ... Gulp .. hardware...

    I bought from Pimoroni. There are starter kits too, see






    Didn't mention that I downloaded and installed Raspbian operating system into the SD card. But you can also buy a card with the NOOBS system pre-installed see the getting started guide here
    Last edited by ha_banos; 14-02-2018, 07:32 AM.

    Leave a comment:


  • Budgie Smuggler
    replied
    Thanks [emoji106]

    Leave a comment:


  • ha_banos
    replied
    Yes! I'll post up the links to the resources etc. There are loads of examples. Coding clubs. The Raspberry PI and Zero are cheap as chips. Nice case. Boom.

    Leave a comment:


  • Budgie Smuggler
    replied
    I like the look of this. Do you think this would be a good intro to coding for a kid?

    Leave a comment:


  • ha_banos
    replied
    Cool. We're in. Nice. First problem is set up the network connection. There isn't one yet. The PI Zero W has wireless built in so just have to configure it. Fortunately that's simple and there are clear instructions.

    That's why the ping to Google doesn't work in the image. Also why there's no IP address in either of the network adaptors listed in the config.

    Also the hdmi adaptor doesn't fit properly if I use the nice case :/

    Anyway. Getting it on the network means I can go headless. .. no monitor need. Can code everything remotely over SSH.

    Note: this is the equivalent of [MENTION=13462005]moteyi[/MENTION] setting up his cutting and templates! Just not as visually exciting...



    Last edited by ha_banos; 13-02-2018, 07:00 PM.

    Leave a comment:


  • ha_banos
    replied
    Stage one done. Got the o/s on the micro SD card. Keyboard working. Can't log in...

    Leave a comment:


  • Shaun
    replied
    I built a aquarium light controller using arduino stuff, its always fun to build something like this. In fact I now want to built a humidity logger for my cabinet.

    Leave a comment:

Working...
X