beescale & STM32F103C8T6

liask
Sat Mar 24, 2018 6:15 pm
Hi everyone
I am a new beekeeping ecologist and new to electronics and programming.
because there is a problem with the bears, the bee thieves, and my move to the mountain where I have my buns to collect ecological honey, I want to build a project to alert me every afternoon and upload the data to a server:
1. for the weight of the blister and the difference resulting from the previous jar.
2. temperature and humidity.
3. atmospheric pressure
4. temperature inside the cell.
5. if there is a violation within the space.

I have the following materials and I would like you to tell me if this is feasible.

1. Weighing Sensor AD Module Dual-channel 24-bit A/D Conversion HX711
2. Parallel Beam Load Cell Sensor 100kg/217lb Scale Weighing Sensor 0.02 Precision
3. A6 GPRS Pro Serial GPRS GSM Module Core DIY Developemnt Board
4. RTC DS1307 AT24C32 Real Time Clock Module
5. HC-SR501 Infrared PIR Motion Sensor Module
6, DHT22
7. DS18b20
8. BMP280
9. Board STM32F103C8T6.
thank you


ahull
Sat Mar 24, 2018 10:16 pm
Sounds like it is entirely possible. How are you intending to do the “alert me every afternoon and upload the data to a server:” part?
How are you intending powering everything?

dev
Sun Mar 25, 2018 4:09 am
What is your plan to upload data on server?
Do you have wifi connection? or going with GSM?
How far your bee-station is?

liask
Sun Mar 25, 2018 12:36 pm
[ahull – Sat Mar 24, 2018 10:16 pm] –
Sounds like it is entirely possible. How are you intending to do the “alert me every afternoon and upload the data to a server:” part?
How are you intending powering everything?

for alert me every afternoon
2 solutions exist one with an external timer
(DC 12V Digital LCD Power Programmable Timer Time Relay Switch Daily Weekly)

and the second with an internal clock
(RTC DS1307 AT24C32 Real Time Clock Module)

upload the data to a server
i believe with gsm & (sms & gprs)

Power :
solar power and battery 12v 100a
because I already have it for the electronic fence to work


liask
Sun Mar 25, 2018 12:40 pm
[dev – Sun Mar 25, 2018 4:09 am] –
What is your plan to upload data on server?
Do you have wifi connection? or going with GSM?
How far your bee-station is?

no connection wifi.
is very far about 50 kilometers and there is no visual contact.
only GSM (A6 GPRS Pro Serial GPRS GSM Modul).
with sms and gprs


RogerClark
Sun Mar 25, 2018 9:13 pm
You could see if there is a “Things Network” node somewhere near your hive .

https://www.thethingsnetwork.org

It uses the LoRa transmission system, and those modules work fine with the STM32.

If the distance was shorter, you may even be able to rig up a decent antenna and directly receive the data, e.g. less than 10km


liask
Mon Mar 26, 2018 8:32 pm
[RogerClark – Sun Mar 25, 2018 9:13 pm] –
You could see if there is a “Things Network” node somewhere near your hive .

https://www.thethingsnetwork.org

It uses the LoRa transmission system, and those modules work fine with the STM32.

If the distance was shorter, you may even be able to rig up a decent antenna and directly receive the data, e.g. less than 10km

Thak you

there is no node “Things Network” there
but it works the gsm

so I have no problem with data transmission
my problem is in the code

I had used it before an arduino uno
and work only as a scales

now other sensors have been added
and STM32F103C8T6

I do not know exactly what libraries
and if the same code from arduino uno
can run on STM32F103C8T6


RogerClark
Mon Mar 26, 2018 8:40 pm
OK.

GSM is expensive for me, so I always try to find a free alternative ..

I think some GSM modules communicate via serial, but as AVR only has 1 serial port for comms to PC the libraries use Software Serial.
But the STM32 has many Serial ports as well as USB Serial, so sometimes the libraries have to be modified to use Serial1 ( hardware Serial port 1)

I know some people already used a GSM module with the STM32 so you may be able to reuse their code, if you can find it…

Use google to search this site for referemc# to GSM. e.g.

Stm32duino GSM

In google search would probably find some results


asmallri
Mon Mar 26, 2018 11:37 pm
The STM32F103C8T6 is a 3.3 volt processor. The DS1307 is a +5V RTC device (operates from 4.5v to 5.5v) and mildly challenging to integrate it with the DS1307.

You should look instead for a DS3231 (operates from 2.3v to 5.5v). The DS3231 is code compatible with the DS1307, it is lower power consumption than the DS1307 and has an inbuilt temperature compensated crystal versus external crystal required with the DS1307. The DS3231 is superior to the DS1307 in every way and it cheap as chips from China :-)

Alternatively you could use the embedded RTC of the STM32 however, unlike other STM32F variants, the embedded RTC is very limited. If you only want to use the embedded RTC for time then it is probably fine. If you also want to do power management which uses the STM32’s embedded RTC, then the embedded RTC will lose time.


ahull
Tue Mar 27, 2018 12:14 am
If you have GSM, then the STM32 RTC can be kept syncronised every time the hive reports to the mothership, so I don’t think you need additional complexity of a second RTC. The STM32 RTC is generally good for a few seconds per day accuracy in my experience, even without syncing or calibration, which I suspect is plenty accurate for this application.

asmallri
Tue Mar 27, 2018 3:29 am
I found the embedded RTC to be fine provided you did not want to put the processor to sleep. I suspect putting it to sleep is likely to be required for this application. If you put the processor into a deep sleep with both periodic and external wake-up then the embedded RTC will lose several minutes per day. I have tested this across multiple Bluepill modules. Clearly an issue with the library, but I have tried several.

liask
Tue Mar 27, 2018 2:00 pm
[ahull – Tue Mar 27, 2018 12:14 am] –
If you have GSM, then the STM32 RTC can be kept syncronised every time the hive reports to the mothership, so I don’t think you need additional complexity of a second RTC. The STM32 RTC is generally good for a few seconds per day accuracy in my experience, even without syncing or calibration, which I suspect is plenty accurate for this application.

thank you very much for the clarifications !!
Of course I do not care about the exact time just happening once a day in the afternoon.
so the interior will be able to do it;


liask
Tue Mar 27, 2018 2:10 pm
[asmallri – Tue Mar 27, 2018 3:29 am] –
I found the embedded RTC to be fine provided you did not want to put the processor to sleep. I suspect putting it to sleep is likely to be required for this application. If you put the processor into a deep sleep with both periodic and external wake-up then the embedded RTC will lose several minutes per day. I have tested this across multiple Bluepill modules. Clearly an issue with the library, but I have tried several.

Thank you
I do not want the processor to sleep, I do not have a power problem because the battery is high capacity and charged by the sun every day. from the data point of view, I have no problem because I have some gigabyte from the mobile phone company and I am directing the sending of data to the thingspeak and every afternoon sending one sms.


zoomx
Tue Mar 27, 2018 2:47 pm
GSM usually modems communicate using AT commands on a serial link.

The difficult is that using only GSM you can’t go on internet until there is a service provider that can accomplish this like using analog modems. You need a number to call.
In alternative you can use SMS with a lot of limitations or call another GSM modem connected to a PC.
GPRS is better, you can connect to internet.

Maybe there is something new in GSM.


Vassilis
Tue Mar 27, 2018 3:34 pm
Maybe that project will help you (GPRS + DS18B20 + Thingspeak)
https://github.com/T00ManySecrets/thing … emperature

liask
Tue Mar 27, 2018 7:31 pm
[zoomx – Tue Mar 27, 2018 2:47 pm] –
GSM usually modems communicate using AT commands on a serial link.

The difficult is that using only GSM you can’t go on internet until there is a service provider that can accomplish this like using analog modems. You need a number to call.
In alternative you can use SMS with a lot of limitations or call another GSM modem connected to a PC.
GPRS is better, you can connect to internet.

Maybe there is something new in GSM.

thank you
GPRS for internet.
gsm for sms


liask
Tue Mar 27, 2018 7:32 pm
[Vassilis – Tue Mar 27, 2018 3:34 pm] –
Maybe that project will help you (GPRS + DS18B20 + Thingspeak)
https://github.com/T00ManySecrets/thing … emperature

thank you
ευχαριστώ συμπατριώτη!!


Vassilis
Fri Mar 30, 2018 10:49 am
:D ;)

Leave a Reply

Your email address will not be published. Required fields are marked *