-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intro Tutorial #230
Comments
I'm in the middle of upgrading a kickstarted terrarium/aquarium tank where the company went MIA for warranty to TerrariumPI + RPi3b. Before heading home for the holidays, I was able to get a temperature sensor (1Wire/I2C), an irrigation system, and misters (both GPIO-controlled) to simulate rainfall (bare minimum for being away for a week, as I have external lights) working all through custom hardware, and I'm documenting everything along the way. If I don't beat you to the initial version, I'm absolutely down to help flesh yours own. |
My software is build in a general way, so that you can choose from the sensors and swiches on: https://github.com/theyosh/TerrariumPI/wiki/Hardware The DHTXX sensors are not that stable. I have experienced a lot of faulty readings if you want to operate it 24/7. I suggest to use somekind of a I2C setup with for example: https://taaralabs.eu/1-wire-humidity-temperature-sensor/ with https://taaralabs.eu/category/1-wire/ (I have not used this, but it is known to work. Or look at: http://www.sheepwalkelectronics.co.uk/product_info.php?cPath=22&products_id=30 with http://www.sheepwalkelectronics.co.uk/product_info.php?cPath=23&products_id=55 Al the humidity sensors do have a temperature sensor. The GPIO relay is fine and will work. If you want to use this in a production system, it is wise to by every hardware at least twice or more so you can create a setup to test and have backup hardware when one is failing. If you are able to make a small tutorial, that is great. I do not find the time to write it all out. As English is not my native language it takes me more time then I have... |
Thanks @theyosh, I have purchased the DHT22 now but they were very cheap and I'll just use for purposes of learning. Once I get my head around things i'll buy the production hardware! @Benjin - would be awesome to collaborate on a tutorial. If your interested I'll set up a tutorial branch and perhaps we can work on that? @theyosh can you give me/us permission to push to a tutorial branch please? |
@stuartabrown how do you mean a tutorial branch? You will add that to my software? I was thinking of using something link https://medium.com/ Else I would either fork my repository and create your own and add there a tutorial branch. And as latest, I can imagine you want access to this wiki, to add the tutorial there. Else I am not sure what you mean. What is your preference? |
I think the will makes the most sense for a tutorial.
…On Fri, Dec 28, 2018, 8:25 AM TheYOSH ***@***.*** wrote:
@stuartabrown <https://github.com/stuartabrown> how do you mean a
tutorial branch? You will add that to my software? I was thinking of using
something link https://medium.com/
Else I would either fork my repository and create your own and add there a
tutorial branch.
And as latest, I can imagine you want access to this wiki, to add the
tutorial there.
Else I am not sure what you mean. What is your preference?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#230 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABiQY3oY0lO5fC7R6wV1VgNfuZrhLWHjks5u9hvkgaJpZM4Zd-T1>
.
|
@theyosh I've cloned the wiki locally - it's actually a different repo to your main main codebase |
@stuartabrown that is not possible: https://help.github.com/articles/adding-and-editing-wiki-pages-locally/#cloning-wikis-locally-to-your-computer
Only the master branch will/can be shown. Also, that means you have write rights to my repository. I am not a fan of that. So, I still think a website called https://medium.com is more suited for it. Or https://www.instructables.com/howto/reptile/ I do appreciate that you want to make a tutorial. But it should not end up that you need full write rights to my repo. Normal code you can create pull requests and those I can import. But for the wiki, it does not work that way. |
@theyosh no problem, happy with that. I don't understand why the Github permissions don't allow owners to have separate permissions for the wiki and the main code - seems odd. If you don't mind, before going the Medium route I'll create a fork of your repo and then try making a pull request to your |
good grief, OK so that approach doesn't work for wikis! They make collaborative documentation really tough! I'll go the Medium approach. Thanks for your patience! |
Not really into the details yet but the first couple of tutorial posts are up at https://medium.com/@jinky32. Waiting for some sensors to arrive before getting to the interesting stuff :) |
Cool. I like your vivarium. Way cool below the stairs! For the post on https://medium.com/@jinky32/setting-up-your-raspberrypi-and-installing-terrariumpi-97f2d2e8e6f I think it is handy to add something like:
The hostname 'raspberrypi' is the default and mostly it will register it self at your router with that name. I think adding the line above to your tutorial, is a nice closing of the installation, and you can also check if the installation did work well. Even without any sensors, it should give a working web interface. |
@theyosh thanks :). I've updated the post you mention and added a little bit extra too. The sensors you suggested above |
@stuartabrown Check this one out: https://tutorials-raspberrypi.com/raspberry-pi-temperature-sensor-1wire-ds18b20/ It shows how to wire it (you'll need a 4.7k ohm resistor) and how to confirm the pi can read it via the command line (no code necessary). |
@Benjin thanks, will take a look. The guys at TaaraLabs have suggested
for connecting the 1 Wire Shield https://taaralabs.eu/1-wire-shield-for-wemos-d1/ to the RPi3 |
Haven't tried using a shield yet. Lemme know how well it works.
…On Thu, Jan 10, 2019 at 5:22 AM stuartabrown ***@***.***> wrote:
@Benjin <https://github.com/Benjin> thanks, will take a look. The guys at
TaaraLabs have suggested
1-Wire board | Raspberry PI
GND | 1 (GND)
5V | 2 (5V)
3.3V | 1 (3.3V)
D1 | 5 (SLC)
D2 | 3 (SDA)
for connecting the 1 Wire Shield
https://taaralabs.eu/1-wire-shield-for-wemos-d1/ to the RPi3
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#230 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABiQY0IBrFNTKeC6qEetM97OT_dw_DoGks5vBz55gaJpZM4Zd-T1>
.
--
Good luck, be nice, and have fun,
Benjin Dubishar
benjin.dubishar@gmail.com
|
Ok, I have not used this before, but that shield will not fit directly on your pi. So that means a breadboard and some jumper cables to get it connected. I use my self: https://pinout.xyz/pinout/rpi2_1_wire_adapter But I do not know if that shield does work with your sensor. I do not know if they use the same wire schema for there connectors. |
@theyosh next step in my intro tutorial is up answering a couple of your questions ;) https://medium.com/@jinky32/terrariumpi-adding-a-sensor-8afef4909fbe. Next step is to figure out how to do something (turn a light on and off) based on the readings. cc @Benjin |
You should really try 1-wire: https://www.raspberrypi-spy.co.uk/2018/02/enable-1-wire-interface-raspberry-pi/ and https://www.raspberrypi-spy.co.uk/2013/03/raspberry-pi-1-wire-digital-thermometer-sensor/ The first url is enabling it for manual testing, my software does already that during installation. So you need only the second url for adding sensors. It is really, really easy. Only 1 resistor needed and you can hook up X amount of temperature sensors. Will also by auto detected with my software |
Thanks @theyosh I will look at those - I will certainly want to add multiple temperature sensors. I've been looking at #167 to see how to get a device (light for example) to turn on/off based on sensor readings. Am I correct in thinking that my relay https://www.modmypi.com/raspberry-pi/relays-and-home-automation-1032/relay-boards-1033/8-channel-12v-relay-module should be connected to my RPi and then set as a switch in TerrariumPi and configured to turn devices on/off? |
@stuartabrown yes. Those relay modules will work. The logic for switching based on sensors should be configured in the environment part at the heater or sprayer part |
thanks @theyosh . I hope you don't mind me asking all these questions, I appreciate they're all quite basic. |
Nope! Do you mind that I link to your medium posts on my wiki? ;) |
@theyosh haha no problem at all, small payback from me for all of your work! |
Hello @theyosh . So I have my relay connected to my RPi and when I run this https://raw.githubusercontent.com/Mattrachwal/gpio-8channel-relay-test/master/gpio-relay-test.py it toggles through the inputs correctly and turns off the light that it connected to channel 1 (pin 26 in the code). |
A few queations:
• Specifically which relay did you buy? It may be a default-high looking for a ground signal to the pin.
• Can you attach a photo of your wiring?
• Do you hear an audible click when you send the on/off signal from code.
• If you don't have one already, I highly recommend a multimeter? (okay, that wasn’t a question) Super useful in debugging relays.
Sent from my phone; please pardon typos and brevity
From: stuartabrown
Sent: Wednesday, January 16, 2019 1:06 PM
To: theyosh/TerrariumPI
Cc: Benjin Dubishar; Mention
Subject: Re: [theyosh/TerrariumPI] Intro Tutorial (#230)
Hello @theyosh . So I have my relay connected to my RPi and when I run this https://raw.githubusercontent.com/Mattrachwal/gpio-8channel-relay-test/master/gpio-relay-test.py it toggles through the inputs correctly and turns off the light that it connected to channel 1 (pin 26 in the code).
However when I add a switch and and set the GPIO address (I use 37 which I think is the physical address) without a timer the light doesn't turn on/off when I manually click it in GUI.
Any idea what I'm doing wrong here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
thanks @Benjin
|
Your GPIO address should be indeed around 40. So address of 37 should work. But it could be that there is a bug, that when you add it, it is not correctly registered. So add it, and just restart my software. If it then works, then we have found a software bug. If it still does not work after restart, then it is very strange and needs more investigation. Also I have made a stupid code bug, and you should chose for So add it, and restart and see what happens. Also you could try to debug a bit: https://github.com/theyosh/TerrariumPI/wiki/FAQ#how-to-debug-terrariumpi and see if there are messages when you toggle the switch |
There is no bug! Can you also add a pic from above (raspi and relais board), so we can see, where you have connected the wires. |
It looks like green is connected from pin39 (GND) to IN1. |
@theyosh @AndrejWeber many thanks for your help with this. @AndrejWeber you are right - I am connected to nc1 rather than no1, but my RPi connection is from pin37. It's not connected to the RPi atm so the below images won't show that but do show the nc/com connections. Unfortunately my wife has just come home (obviously that is a wonderful thing ;-) ) so I have no more time to play tonight but I will set up asap tomorrow after work. thanks again :) |
thanks @theyosh , I'll try the settings suggested in #237 (comment). I'm still not sure though what the BTW, new post is up for RPi camera tutorial. Thanks for your help with that. If you want any changes, let me know |
@theyosh OK great. I have the light daytime ramp up and then ramp down working correctly. The only issue is that once the dimmer has turned the light back down to 0% it then turns it on again. Is this due to an incorrect Once I've got this sorted I'll move on to controlling temps (disabling lights first so switch isn't used twice) |
OK so I can get temp control working reliably too :) If someone can help me understand the purpose of |
Do you have still the dimmer used twice in light environment? |
thanks @AndrejWeber. Settings are as per below logs
That all works fine, but then when the lights diminished to 0, they were then turned on again. I wonder if it is a wiring issue because as soon as I plug the light in that is connected to the PWM it comes on so that does seem to be it's default state. Here's how it is wired BTW what do you use |
OK I've been trying this again and I still can't get the light attached to the dimmer to stay off once it has dimmed to 0. Once it hits zero the light comes back on after approx 15 seconds. My assumption was that it should stay off from after the dimming ends (set in the lights environment, day, I've tried setting
but it makes no difference and was a totally random experiment anyway! Is the only way to keep the light off once it has dimmed to zero to use the dimmer in partnership with a relay as @AndrejWeber does in #178 ? |
Normally your dimmer should work without Relais. Because you can reach 0% light level. My dimmer can only reach 1%, so will never turn off completely. I wonder about your on and off duration in switch setting, |
@AndrejWeber many thanks for your help with this. So I have used your settings (with step as 15 rather than 1) and here is a video https://youtu.be/3epRDUmCEBY?t=404 showing the effect that I get once bulb has gone to 0. |
Is it a flickering, I’m not shure... |
@AndrejWeber do you mean the state of the lamp in the last part of the video? |
Yes, it looks not like normal “on” |
any idea what it might be? Something to do with TerrariumPi settings? The dimmer? the Bulb? |
Like it is written in the reviews of the dimmer, you should set a lower maxdim value. |
@AndrejWeber many thanks for that, gives me something to work on :) I don't have a multimeter with me at the moment but will have at the weekend. In case it is of use to you it looks like the default value has changed in changing that value from 905 to 890 results in the same behaviour but bulb doesn't flicker. Will keep experimenting. |
you are right! maxdim = 2.85 / 3.3 * 1000 maxdim = 2.9 / 3.3 * 1000 try to use 870 |
@AndrejWeber I love you! A value of 870 works perfectly! BTW it's cool that you are dimming your T5s. I have Arcadia D5 Dragon Lamp and am currently running them on an on/off timer; I didn't realise they could be dimmed. I have daylight LEDs that mimic sunrise / sunset (https://zoomonster.com/epages/Shop_Econlux.sf/de_DE/?ObjectPath=/Shops/Shop_Econlux/Products/00011500) so I will eventually get the T5 to ramp up / down to the same schedule |
they are perfect to be dimmed, but only with a dimmable ecg! |
So, because I expected it to work on 3.3Volts, I used a to high MAXDIM value? I will change it then a bit lower as mentioned here now. |
Phew - ok a few new guides at https://medium.com/@jinky32, including the PWM switch. As every feel free to request changes or additions. Thanks for all the help @theyosh and @AndrejWeber :) |
I just wanted to chime in and mention that it has been great to follow along with this open ticket / the medium articles! . |
Thanks @vacuumboots . I've been busy with some other stuff but back on it again now! @theyosh re the UV sensors and specifically your comment #90 (comment) about only supporting one because they have the same I2C address, would it be possible to use an I2C multiplexor e.g. https://learn.adafruit.com/adafruit-tca9548a-1-to-8-i2c-multiplexer-breakout/overview? |
I would rather follow: https://www.instructables.com/id/Raspberry-PI-Multiple-I2c-Devices/ That will add more I2C buses and there fore you can have more of the same sensor. Every bus 1 sensor. Also, using a multiplex board is harder to implement. Currently, multiple I2C buses is supported. |
@theyosh that looks great, no additional hardware involved! So if that goes in I just connect up the various devices and 'it just works' ? |
Euh, I have not tested it, but my code can handle multiple I2C buses on the Pi. So yes, in theory it should just work. |
@stuartabrown lost this a bit out of sight? And I do understand that it is a lot to write. So are you still planning to make updates? Or can we close this issue? |
@theyosh yes, there's been a few changes in personal circumstances so have had to pause on this. I still get quite a few questions etc on Facebook etc so I still help and point people to your project when I can. But yes, feel free to close this ticket. I hope to get back involved in the future :) |
Damm, I have a Facebook representative :P :) Thanks a lot for that. I do not have FB. And I still want to thank you for the first part of writing. It is still a nice part of work. Then I will close it now. And we will see what the future brings..... |
Hi,
First of all, awesome project! I installed on a RPi3 last night and all went smoothly.
I'm an experienced reptile keeper and reasonable in a few different programming languages but totally new to electronics.
As an intro to using TerrariumPi I would like to set up a heat and humidity sensor and use that to control a couple of different desk lights (ultimately of course these will be lights / humidifier in the vivarium, but I'll practice in a safe environment first!), however I'm unsure what hardware I need.
Going through the docs here I think I need:
Is that it or am I missing a few fundamental things? @theyosh if you're interested I'd be happy to try to write up a
total newbie's guide to TerrariumPI
documenting the process as I learn and add to the wiki once I get underway.The text was updated successfully, but these errors were encountered: