Go to advanced search

by Gerymake
Mon Aug 26, 2019 7:52 pm
Forum: Camera board
Topic: PI camera for plant analysis
Replies: 0
Views: 118

PI camera for plant analysis

Hi, I have the official Raspberry Pi No-IR camera with the blue filter installed. I was hoping to carry out a simple plant analysis task but I have run into countless issues. After doing some research, Infragram appears to be the best site to process the "raw" images but the results are far from wha...
by Gerymake
Mon Aug 26, 2019 12:37 pm
Forum: Automation, sensing and robotics
Topic: Garden automation inquiries
Replies: 9
Views: 387

Re: Garden automation inquiries

IOTON wrote:
Mon Aug 26, 2019 9:44 am
Place the soil sensor as near as possible to your pi. I don't know which i2c frequency you use, but for 400khz max length of i2c cable is around 2 meters(because of cable capacitance).
I have managed to use a three-meter long cable for the I2C interface.
by Gerymake
Sun Aug 25, 2019 9:47 pm
Forum: Automation, sensing and robotics
Topic: Garden automation inquiries
Replies: 9
Views: 387

Re: Garden automation inquiries

Thanks for such useful tips! I am starting to understand everything better now. Should this circuit (https://cdn.instructables.com/FIY/QHCX/IMNOK3OX/FIYQHCXIMNOK3OX.LARGE.jpg?auto=webp&width=1024&height=1024&fit=bounds) work properly? I would replace the AA batteries with a power supply (12V 3A)? Th...
by Gerymake
Sun Aug 25, 2019 11:22 am
Forum: Automation, sensing and robotics
Topic: Garden automation inquiries
Replies: 9
Views: 387

Re: Garden automation inquiries

I have been trying to understand how an N-type mosfet works, as far as I know, the 1st and 3rd pin in the device should not be carrying the 3 Amps of the electrovavle. I am using thin wires to the Pi so I would like to determine whether or not they will be able to handle the load. I attach pictures...
by Gerymake
Sun Aug 25, 2019 1:36 am
Forum: Automation, sensing and robotics
Topic: Garden automation inquiries
Replies: 9
Views: 387

Garden automation inquiries

A few months ago I put forward the idea of setting up an automated garden (fresh vegetables). I have managed to get all the components working (programming and electronics) although I have encountered several issues I would like to clarify with your help. 1st: The following diagram shows how I am wi...
by Gerymake
Wed Jun 19, 2019 9:13 pm
Forum: Python
Topic: When is custom error handling necessary
Replies: 3
Views: 317

Re: When is custom error handling necessary

Are the errors recoverable or does it always result in a program restart needed? Does making a "custom error" tell you anything you don't already know? Who's going to see the error? You? A sysadmin? An end-user? Yes, they are. When I get an exception the program can keep working, it just omits cert...
by Gerymake
Wed Jun 19, 2019 1:07 pm
Forum: Python
Topic: When is custom error handling necessary
Replies: 3
Views: 317

When is custom error handling necessary

I am using several sensors for a garden automation project. I have been handling errores the "straightforward way". Imagining hypothetical situations and then creating an exception for the error the program raises, is this the a decent approach? I am extremely confused abou custom errors. I have gon...
by Gerymake
Tue Jun 18, 2019 10:02 am
Forum: Python
Topic: Importing python code from a sub-folder
Replies: 6
Views: 363

Re: Importing python code from a sub-folder

Looks like a good idea but it may be too complex, I am not very used to coding. Therefore, I am going to opt for the previous approach.

Thanks for the help,
by Gerymake
Sun Jun 16, 2019 8:09 am
Forum: Python
Topic: Importing python code from a sub-folder
Replies: 6
Views: 363

Re: Importing python code from a sub-folder

I managed to do that. What I mean is that when I am running the read_sensors.py code I can't import the write_to_db.py which is in another directory. I am not sure whether it is clear or not. main.py \-- read_sensors \-- read_sensors.py (1st: I am running this code but I CAN'T from write_to_db impor...
by Gerymake
Sat Jun 15, 2019 3:43 pm
Forum: Python
Topic: Importing python code from a sub-folder
Replies: 6
Views: 363

Importing python code from a sub-folder

I have a main.py file in which I have imported all the files in another folder (read_sensors). In such folder, there is a script (read_sensors.py). When I have read a sensor, I ought to insert it into an MYSQL database. To do so, I guess it is better practice to create another folder in the original...
by Gerymake
Sat Jun 15, 2019 3:33 pm
Forum: Python
Topic: Reading LDR with MCP3008
Replies: 6
Views: 367

Re: Reading LDR with MCP3008

As it has already been mentioned, the problem was the frequency, it had to be limited. Anyway, I am a newbie at electronics and I do not fully understand what frequency are we limiting? I am familiar with this concept but I cannot relate to this case.

Thanks,
by Gerymake
Fri Jun 07, 2019 3:11 pm
Forum: Python
Topic: Reading LDR with MCP3008
Replies: 6
Views: 367

Reading LDR with MCP3008

Hello guys, I am trying to read a photoresistor via an ADC (MCP3008) in a Raspberry Pi Zero WH. I have followed this wiring diagram. http://www.pibits.net/wp-content/uploads/2016/09/pi-and-mcp3008-and-ldr_bb.png When it comes to the code, I came across two different snippets: 1.- With the gpizero li...
by Gerymake
Thu Jun 06, 2019 8:10 pm
Forum: Python
Topic: Exception or if statement
Replies: 3
Views: 275

Re: Exception or if statement

The generally accepted good advice in software engineering circles is: 1) Use exceptions for exceptional circumstances. Things that should never normally happen. 2) Do not use Exceptions for general program control flow. The DHT11 is notorious for being very difficult to read reliably, repeatedly. ...
by Gerymake
Wed Jun 05, 2019 9:25 pm
Forum: Python
Topic: Exception or if statement
Replies: 3
Views: 275

Exception or if statement

Hello everyone, I'm setting up an automated garden but I'm wondering whether this is the best approach to get readings from a DHT11 temperature sensor and check its content. Since the DHT-Adafruit library won't raise an error if it can't connect with the sensor I ought to check whether the reading i...
by Gerymake
Fri May 24, 2019 5:24 pm
Forum: Beginners
Topic: Connecting to several PI in the same network
Replies: 6
Views: 397

Connecting to several PI in the same network

Hello, I guess this must have been answered but I'm not sure how to find it. I have several Pi in the same network which ought to connect to a DB (installed in one of those Pi). I tried using the private IP address from (hostname -I) but it may change when disconnected or rebooted. Therefore, how ca...
by Gerymake
Mon May 20, 2019 9:23 pm
Forum: Camera board
Topic: Blue filter camera module
Replies: 5
Views: 430

Re: Blue filter camera module

Thanks for the info! I will definitely read through the article more thoroughly.
by Gerymake
Mon May 20, 2019 9:21 pm
Forum: Python
Topic: Storing multiple variables
Replies: 4
Views: 296

Re: Storing multiple variables

Makes sense, thanks for the help! :D
by Gerymake
Sat May 18, 2019 7:02 am
Forum: Python
Topic: Storing multiple variables
Replies: 4
Views: 296

Re: Storing multiple variables

Depends what you want to do when the sensor fails. If it takes an hour to recover then the temperature etc will be out. You could have three entries for each reading: Time Reading value Type of reading (eg sensor type) It makes collating a bit of a chore but you can always just store the time so ea...
by Gerymake
Fri May 17, 2019 9:52 pm
Forum: Python
Topic: Storing multiple variables
Replies: 4
Views: 296

Storing multiple variables

Hello, I can't seem to find a decent approach to my problem. I'm setting up an automade garden which is made up of several sensors collecting different types of data (soil moisture, light conditions, temperature...). I'd like to store all these variables in a MYSQL table under a same DATETIME, i.e.,...
by Gerymake
Fri May 17, 2019 4:31 pm
Forum: Camera board
Topic: Blue filter camera module
Replies: 5
Views: 430

Re: Blue filter camera module

I forgot to mention that. Yes, I intend to use it for plant analysis.
by Gerymake
Fri May 17, 2019 2:53 pm
Forum: Camera board
Topic: Blue filter camera module
Replies: 5
Views: 430

Blue filter camera module

Hello guys,

I have a throughly simple question, which I couldn't find an answer to. How should I place the blue filter which comes with the Pi camera over the lens? I ought to find a reliable approach sine I'll install it outdoors for a long periode of time.

Thanks,
by Gerymake
Tue May 14, 2019 2:33 pm
Forum: Automation, sensing and robotics
Topic: Soldering jumper wires to solenoid valve
Replies: 8
Views: 559

Re: Soldering jumper wires to solenoid valve

Put a decent electrolytic capacitor between the +12VDC power rail and ground, close to the FET (observe polarity) say 50VDC/1000uF. The solenoid will have a huge inrush current which could collapse the power rail enough to spike out the RPI. Testing with a globe is fine, but remember the solenoid i...
by Gerymake
Thu May 09, 2019 7:57 pm
Forum: Automation, sensing and robotics
Topic: Soldering jumper wires to solenoid valve
Replies: 8
Views: 559

Re: Soldering jumper wires to solenoid valve

Let me see if I understood properly. I should test the circuit with a 12V bulb. Afterwards, when I move the circuit to a perfboard, I could install the solenoid valve normally. Yes, exactly. you can test the valve directly with a suitable 12v dc supply, and use a low power 12v bulb in the breadboar...
by Gerymake
Thu May 09, 2019 12:41 pm
Forum: Automation, sensing and robotics
Topic: Soldering jumper wires to solenoid valve
Replies: 8
Views: 559

Re: Soldering jumper wires to solenoid valve

Having used a similar valve I think those wires would get hot if carrying a full load for longer than 10 seconds or so?.. My whoe valve starts getting Hot after 2-3 minutes running (via an opto isolator and relay) perhaps substitute a 12v bulb for breadboard testing if testing 'opening the valve' f...
by Gerymake
Wed May 08, 2019 8:35 pm
Forum: Automation, sensing and robotics
Topic: Soldering jumper wires to solenoid valve
Replies: 8
Views: 559

Re: Soldering jumper wires to solenoid valve

It would be on for very short periods of time. A few times a day maybe, it is just for a garden automation project. Anyway, what would be the better approach to this? This is the wiring diagram, I am using the breadboard for prototyping, when I have checked everything, I will move it onto a perfboard.

Go to advanced search