Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Remote green house monitor (PIC and HC-12)

Status
Not open for further replies.

granddad

Well-Known Member
Most Helpful Member
I like to grow tomatoes....
tomsgd.jpg


In two greenhouses , one at the bottom of our small garden the other on an allotment down the road , I estimate 200 metres away, as the crow flies. Tomatoes in green houses need careful watering, feeding and temperature/ ventilation management etc. so since 2006 I have used a PIC based DIY watering controller , it started life as a simple timer, switching a valve , later a pump, but has advanced to a temperature and humidity monitor as well, I regularly get ideas about improving the project , the latest version has a controller and a monitor ( PIC24FV32KA304 ) with a 433 Mhz wireless connection using HC-12 modules (Ordered after I read some posts here on ETO) The hardware is built, but my programming skills are not that good ( but improving), so its taking me some time to code debug and test, I have yet to TX / RX a actual file of temperature humidity ( average hour), water and battery data (about 80 bytes), The plan was for the monitor to wake from sleep just before each hour and 'listen' for remote data ( a warning call). The remote controller would TX its days data around 00 hrs , unless it spotted problem during the day. HC-12 has multiple setting for baud, FU mode, channel and power levels, all change the range and timing performance. Eric Gibbs has offered to test a pair of HCs ( thanks ), I wondered if other members have any experience with these transceivers.

The monitor showing a early test file from EEprom.( hi lo now fixed....)
REM05.jpg
 
no idea re your question, but i am launching a similar garden project, with ph monitor aswell (and other trinkets) .... for when i have a garden soon...! i am using a zigbee rf module ... a little expensive but so far im impressed,
https://images.digi.com/offering-zigbee-modules.jpg
1)for starts at first i though all the pins would be more mickey mouse setting bits, but actually they are remote controllable out put headers.
2) they also have this nifty feature in them so even though they have a nice range, each module also acts as a range extender for other modules that are further out
3) 2-pins for tx/rx serial data, which directly passes data through, or simple(relatively speaking)"AT command" mode for setting pins or pairing

... mind you I havn't tried them in the field, but they have been great on the bench
 
Thanks doc , they are "a little" expensive , but the range is really good, there is a cheaper XRF Wireless Data Module , may get a couple to compare....
 
there is a cheaper XRF Wireless Data Module
Wouldn't bother..... I use these and the company just went under...

Looking for a replacement now.... Jon Wilder is doing a blog on the Synapse module..
 
hi G,
I would suggest that the Base [ House monitor] HC12 be powered 24/7, they use very little power in the RX mode.
So it could be listening 24/7 for any data coming from the Remote [Green house] transmitter.

You could still time select the Remote TX data transmit interval and/also any 'alarm' conditions as they arise. Timed TX intervals will also reduce Remote battery usage.

The HC12 is advertised as 1000mtr range, for that I would recommend a HC12 dipole antenna at the Remote TX end.

If the 200 mtrs distance from the Allotment remote is 'line of sight' you may be able to use the onboard 'coiled' HC12 aerial, its worth a try.
Keep the Baud rate at 9600 and use max power setting.
You may find other users on a particular frequency channel, bit of trial and error required.

For the TX data I would suggest that you transmit the message as a 'cvs' [ comma separated variable] string.
The Green house for example say, A,+12.3,57.2,11.8,crlf
Thats
ID= A
Tempr
Humm
Voltage
CRLF

The Allotment would be B,12.3,57.2,12.9,crlf
ID=B

By using cvs format you can paste the recorded data file into a Spread sheet program, for plotting/analysis.

I would set the TX interval to say 1 hour, in that way you could do an hourly in house monitor check.

E

My data string:
A,+26.2,21.9,4.955,09.74,010111,+00.0,12:45:36

I add the indoor tempr and time at the end of the recorded string, using the PC log
 
Hi Ian,
Are you referring to the manufacturer of the HC12 modules when you "company just went under..." ? I was planning to buy some more of them as they work so well.

Les.
 
Eric , thanks for your useful info, the data at the remote is in BCD , so hope to just TX that , similar to your format .
Keep the Baud rate at 9600 and use max power setting.
What FU is that and power at 8 I presume.
Cheers. G

The remote has a 4x16 LCD I2C back pack , with temp/humid sensor, and error , heart beat leds, also provides a watchdog for the main mcu.
REC24BP.jpg
 
hi G,
Your LCD is showing ASCII data, so are you doing BCD to ASCII conversion somewhere.?
E
 

Attachments

  • A03.gif
    A03.gif
    40 KB · Views: 322
  • A04.gif
    A04.gif
    35.2 KB · Views: 311
Hi Eric ,
I was coding in loads of HC options , may forget that and stick to FU3 etc...

The control board is a PIC24EP it has the watering program , and RTCC module , EEprom and MOSFET for 12v bilge pump. and the HC-12 , as most the data was in BCD so conversion done in main() ! and sent to the LCD as a (line, position," string" ) over the I2C.
G
REC24ep.jpg
 
Last edited:
hi G,
I have only ever transmitted BCD data when sending numeric characters, I used 'packed' BCD in order to send two digits per RS232 frame of 8 bits.
Its easy enough to convert BCD to ASCII within your PIC program.
E
 
Up-date. Files being transferred OK , just a hourly log (21 bytes packed BCD ) from controller ( REC) in GH that is down the garden ~ 35m away , monitor (REM) in house so several walls , doors etc in between just the small curly wire antenna . REC HC12 power at 3 , FU3 and REM just in RX , REC HC12 in sleep mode while inactive between reports , don't know if to respond ACK to remote. Monitor can be powered down so its clock is synced to hourly reports, REC saves everything in DS1338 or 24LC256.. not done end of day file yet.
Some monitor data not coded yet date, alerts, #files so still in September !,
hrLOG.jpg

Note... sadly Tomatoes finished in September :(
 
? How does temperature effect 433Mhz wireless ( radio) waves, the HC-12 missed a couple of messages last night , got down to 6c . perhaps I do need to ACK the message so remote can retry ...
 
Thanks Nigel I will try, another factor is possibly moisture build up on the GH glass... probably going to need an external antenna ...
 
Nigel, Display its a 4D systems uLCD-32PT 320x240 not sure if still in production , had SD slot, sound and touch ( not got that to work yet ) TTL serial, nice graphics controller built in, bought some time ago, in a moment of erroneously feeling rich:( ~ £50
 
Bit expensive, but it does look nice :D

Obviously the clever (and expensive) part is the processor that controls it all, and makes it easy to use - I've got a similar display, but it's just a bare display for a Raspberry PI, and I can't get it to work.
 
hi Granddad,
I expect you may already know about these soil moisture devices [Amazon] .?

E
 

Attachments

  • Hygro3.gif
    Hygro3.gif
    17.3 KB · Views: 298
  • HygroSensor1.gif
    HygroSensor1.gif
    79 KB · Views: 324
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top