Taking a count on reed switch and putting it to a Database

Well i'm new to these things and I have no idea about how I'm gonna do this. What I need to do is,

  • Taking the number of rotations by a Reed switch and counting it by an Arduino.
  • Sending the count to a database far far away from this unit.( There are many units like this).
  • Power should be taken from Solar energy.

(I wish to use a GSM module and send a msg to all units and then those should reply the count)

I just need steps to create this. Thanks guys.

You already have the steps you need to do this.
You have listed them.

Just execute. In other words, do it!

oh :stuck_out_tongue_closed_eyes: thanks for pointing that out.
But how to send that data to a Database and how to use solar energy in this :-\
I am a beginner for this. An extreme beginner.
Thx for helping.

More info please! How far is "far far away"? What kind of database? Where is the database and is it on an internet connected server? Where is the nearest internet/WiFi connection to the sensors? What is your budget, overall and per sensor? Have you considered LoRa?

If you have a 3G/4G mobile network connection (is GSM even still used?) maybe a data connection over that network to connect to your database server?

PaulRB:
More info please! How far is "far far away"? What kind of database? Where is the database and is it on an internet connected server? Where is the nearest internet/WiFi connection to the sensors? What is your budget, overall and per sensor? Have you considered LoRa?

Distance is less than 500km.
PHP database with mysql.
Database would be internet connected.
The counter I am making is an independent unit so it must send data itself.
(I wish to send the count using gsm messages but what is the best opinion.)
I have no idea about the budget but expecting to do this with a low budget.

to start you could use an ESP8266 and post the count to your local LAN.

you can post your data to google SHEETS

we often recommend you start by getting the sensor data into the micro.
then turning on an LED as the first steps to get used to the basics.

in your case, these links might help show some of what can be done.

Where is the nearest internet/WiFi connection to the sensors? Have you considered LoRa?

PaulRB:
Where is the nearest internet/WiFi connection to the sensors? Have you considered LoRa?

Nearest connection should be on the unit. I don't know what module to use for it.
I'll checkout LoRa.

bunny9:
Nearest connection should be on the unit.

You mean there is WiFi internet connection available in each place you want to place a sensor? If so, I would recommend Wemos Mini. The difficulty with the Wemos, and with all esp8266-based boards, is that achieving low power consumption is not easy, and that will be required for solar/battery sensors.

How large a battery (in mAh) and solar panel (in W) will each sensor have? How many hours of sunlight is the panel likely to get in winter? How often will the sensors need to update the database? If the Wemos needs to monitor the reed switch at all times, the lowest power consumption I have managed to achieve with them is around 20mA. They have a very low power deep sleep mode, but cannot monitor inputs on this mode.

The anemometer and rain sensors in my weather station use reed switches. To achieve low power, I had to use a second, low power processor chip to monitor the reed switches while the Wemos was in deep sleep.

The advantage of LoRa is that sensors can be very low power and the signal has a very long range (up to 10Km with line-of-sight). But you need to have a gateway receiver and there are not many of those around except in certain cities, so you would probably need to buy or make one.

I have done this fairly easy with both D1 mini and MKR1400. The thread is a bit old.