Arduino Pro mini - ...
 
Notifications
Clear all

Arduino Pro mini - LoRa node

14 Posts
5 Users
3 Likes
5,936 Views
Peter
(@phm)
Member
Joined: 5 years ago
Posts: 15
Topic starter  

Hello All,

Like to talk about by project a LoRa node based on a Arduino Pro Mini and an sx1276 LoRa module.

The LoRa node sends a payload to the TTN network, currently just calculated data, but will add one or more sensors soon. The node is powered by a set of 4 AAA rechargeable NiHM batteries and  also connected a small (10cmx12cm, 12V) solar panel to charge the batteries.

The Arduino software is based on the 'ttn-abp' example from Thomas Telkamp and Matthijs Kooijman. It posts a Lora wan message to the TTN network every 2 minutes. I added an integration on the TTN network that posts the data to my on ASP .Net Core api and website running on a VM at the Google cloud, but that is another topic for the future.

I added the LowPower.h library from rocketscream (github) to reduce the power usage. I also removed the power led from the Arduino Pro Mini, to reduce the power even more. Currently it uses 60uA during the sleep. 

The LoRa Node in action.
 

My wife just noticed the windowsill is filling up with Arduino's , Raspberry Pi  and solar panels. ? 

Peter


   
scottplude reacted
Quote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1081
 

That's an awesome project Peter, thanks for sharing it with us

I think that you could make your wife happy by using a moisture sensor and a small water pump when you start adding I/O devices to this. You could create a solar-powered plant waterer to take care of those plants. She'd welcome the Arduino and Raspberry Pi then!

?

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote
(@garnold)
Member
Joined: 5 years ago
Posts: 81
 

Great stuff! I really want to learn more about LoRa and will keep an eye on this thread. I'd like to learn how to create my own gateway at some point and use LoRa to communicate with clients around my property. I think there is a limit on how often you can send messages from a client to TTN correct? From my reading I thought that there are some standard protocols you need to follow if you wish to use other gateways, is this correct? 


   
ReplyQuote
Peter
(@phm)
Member
Joined: 5 years ago
Posts: 15
Topic starter  

Hello Bill good idea,

Most plants need more attention.  I already ordered some LDR sensors and I got a moisture sensor already, and also a DT11. So I can monitor light, temperature, humidity and moisture. 

Only getting a small pump or valve and the project can start,
An than I also got some sensors to monitor instead of the computed values.

 


   
ReplyQuote
Peter
(@phm)
Member
Joined: 5 years ago
Posts: 15
Topic starter  

Hello garold,

Also planning to build my own (single channel) gateway with a Rasberry Pi 3B and a sx1276 module.

With the dragino LP01 gateway has a problem getting the downlink working (like many others), this is probably related to the hardware setup of the dragino.  I got the version 1 of the Dragino LoRa development kit, they also have a version 2 of the development kit with a better (still single channel) gateway. 

Maybe in the future I will build a full LoRa wan compatible gateway, but the price of the components will be between €100 and €200. Especially the concentrator, IC880A-SPI, RAK831 both need an extra converter board to fit on a Raspberry Pi. RAK also has a new concentrator RAK2245 that fits directly on a Raspberry Pi (3B+) I think this would be my first choice.

 

This post was modified 5 years ago by Peter

   
ReplyQuote
Peter
(@phm)
Member
Joined: 5 years ago
Posts: 15
Topic starter  

Last week i added a DTH11 temperature and humidity sensor and a moist sensor to one of my LoRa nodes.

IMG 20190629 122621305

I had some trouble to get the DTH11 to work together with LoRa, but after trying some different pins for the DTH11 it works.

 


   
ReplyQuote
Peter
(@phm)
Member
Joined: 5 years ago
Posts: 15
Topic starter  

Yesteday also adjusted the backend and website to display the values.

Multiple values can now be added to one payload and send by LoRa.

Also added the values to be displayed on the graph at the website.

2019 06 28 Graph

Something strange happend this morning with the moist value. It looks like the plant wake up and drunk all the water, or maybe the sun? 

Time the check the sensor first, maybe a lose wire, bad connection?

IMG 20190629 125223936

It looks like a problem with the sensor. Some of the metal is completely gone on one side, time for a new sensor., or make one my self.

Will be continued...


   
ReplyQuote
Peter
(@phm)
Member
Joined: 5 years ago
Posts: 15
Topic starter  

Today created a moist sensor with 2 nails, a cap, 2 wires and some  hot glue.

IMG 20190629 154543389

Tested its resistance  with some soil. Completely dry 1M ohm, little wet 50K ohm, more water 10 K ohm and wet about 1 K ohm. Looks well, installed it and got a good signal again.

2019 06 28 Graph 3

I expect this will last more than one day.

 

This post was modified 5 years ago 2 times by Peter

   
garnold reacted
ReplyQuote
(@garnold)
Member
Joined: 5 years ago
Posts: 81
 

 Very cool! How do you have that attached to the microprocessor? Just an analog input?


   
ReplyQuote
Peter
(@phm)
Member
Joined: 5 years ago
Posts: 15
Topic starter  

Yes, connected the 

I created 2 sensors

At sensor 1 i used an 1k resistor and connected to analog input.
The other sensor is connected to the original moist sensor bord and the output is also connected to an analog input.

The analog value is now varies between 350 and 500, so good enough to sense is the plant needs water. It also looks like the value depends on temperature. 

This is the graph, scaled the value to 0-100% of the analog value.

0
This post was modified 5 years ago 2 times by Peter

   
ReplyQuote
Mandy
(@amanda)
Member
Joined: 5 years ago
Posts: 74
 

Hi Peter,

With your present set up the electrodes will corrode away over time and dissolve into the soil and that can be bad for the plant.

Can I suggest you invest in one of these:

Analog Capacitive Soil Moisture Sensor- Corrosion Resistant

This is just an example of one I found so I bet you can get something like it for $1 from China ? 

They don't corrode so last longer.

I hope that helps.

 

The 600 series had rubber skin. We spotted them easy, but these are new. They look human... sweat, bad breath, everything. Very hard to spot.


   
ReplyQuote
Peter
(@phm)
Member
Joined: 5 years ago
Posts: 15
Topic starter  

@amanda

Thanks for the advice.

Currently the sensor is only powered during the measurement, hopefully this will slowdown the corrosion and power consumption.

I already ordered 2 capacitive sensors for just over €2 at Aliexpress. Just have to wait. Probably will arrive during my holiday. After my holiday will test.

Will see how much power they consume during sleep, my goal is to power the LoRa node with a LiPo battery and a small solar panel. Must see how much power the capacitive sensor will use and if i can power down during sleep.

 


   
ReplyQuote
Peter
(@phm)
Member
Joined: 5 years ago
Posts: 15
Topic starter  

New package arrived from China.

The small water pump and the capacitive moist sensor.

IMG 20190717 191906042

I already connected the pump, controlled using a transistor. Nice flow, a few seconds on (powered by the the li-po battery)  is enough to water the plant.

Will try the new moist sensor soon.

Will be continued ...

 

 

 


   
garnold reacted
ReplyQuote
(@gert3d)
Member
Joined: 4 years ago
Posts: 1
 

Hi Peter,

could you share your code for the lora node? I like the simplicity: using an Arduino Pro Mini.


   
ReplyQuote