Using Micro Python for hydroponics

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
nave
Posts: 2
Joined: Wed Nov 26, 2014 2:40 am

Using Micro Python for hydroponics

Post by nave » Wed Nov 26, 2014 3:01 am

I know that it is a early in the development of Micro Python but I was wondering if it is possible to use it for hydroponics. I am looking to use it with sensors, more specifically the sensors would be electrical conductivity, ph, air temperature, water temperature, relative humidity and C02. I would also want it to send out these readings over the internet when requested or send out a warning when sensors detects going outside a certain set of parameters. Thanks for your time

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Using Micro Python for hydroponics

Post by dhylands » Wed Nov 26, 2014 7:27 am

You have to look at each sensor and find out how you talk to it.

Some use analog, some use i2c, some use spi, some use ratiometric pulses, some user serial, and some use some bizarre custom protocol.

Micropython can talk to all of those sensors. There may not be convenient drivers already written to talk to these sensors, but the low level protocols should all be there.

nave
Posts: 2
Joined: Wed Nov 26, 2014 2:40 am

Re: Using Micro Python for hydroponics

Post by nave » Thu Nov 27, 2014 12:46 am

How hard would be to write drivers? Also could the drivers be written in Python or would it required C++ coding?

The only sensor I am really worried about is the atlas EC sensor http://www.atlas-scientific.com/product ... 1_kit.html?

From what I found in the conductivity circuit PDF is that it uses:

- UART asynchronous serial connectivity (RX/TX voltage swing 0-VCC)
- I2C (default I2C address 0x64)

http://www.atlas-scientific.com/_files/ ... asheet.pdf?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Using Micro Python for hydroponics

Post by dhylands » Thu Nov 27, 2014 5:12 am

It looks like you can use either UART mode or I2C mode with that sensor. It defaults to UART mode, so that would seem to be the logical choice.

Writing a driver is basically just writing the code which sends the appropriate commands to the sensor and collecting the data. You can definitely write it in Python.

Post Reply