RCWL-0516 Microwave...
 
Notifications
Clear all

RCWL-0516 Microwave Proximity Sensor - With Arduino

8 Posts
3 Users
0 Likes
681 Views
(@andy-nash)
Member
Joined: 4 years ago
Posts: 15
Topic starter  

hello, after watching the 2019 drone bot workshop video " RCWL-0516 Microwave Proximity Sensor - With Arduino" I'm wondering if I can program this arduino to record the exact date and time of actions activation of the RCWL0516 ?

What would be required ?

Thank you all AN

This topic was modified 3 years ago by Andy Nash

   
Quote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

You can but the Arduino needs to know what the current date and time are. I don't know if it can maintain the date? You'd have to read the datasheet for your device.

Alternatively, the Arduino could receive the date/time from an NTP (network time protocol) server, or you could use an external real time clock module.

There are probably plenty of good resources found via google:

https://www.circuitbasics.com/using-an-arduino-ethernet-shield-for-timekeeping/


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 
Posted by: @andy-nash

hello, after watching the 2019 drone bot workshop video " RCWL-0516 Microwave Proximity Sensor - With Arduino" I'm wondering if I can program this arduino to record the exact date and time of actions activation of the RCWL0516 ?

What would be required ?

Yes, you can.

 

If you want to have accurate time with little drift then you should look into Real Time Clock (RTC) modules unless you are using something like the ESP32 where it is built in or using the internet/NTP. Also, where do you plan on storing the log and how are you planning to view it? You can get an SD card module to store it on. There are other options if you plan on connecting it to the internet. You could store a few in memory and display it on a screen if you want.


   
ReplyQuote
(@andy-nash)
Member
Joined: 4 years ago
Posts: 15
Topic starter  

@yurkshirelad I'm looking at the link you gave me. Very helpful.


   
ReplyQuote
(@andy-nash)
Member
Joined: 4 years ago
Posts: 15
Topic starter  
Posted by: @madmisha

 

Yes, you can.

 

If you want to have accurate time with little drift then you should look into Real Time Clock (RTC) modules unless you are using something like the ESP32 where it is built in or using the internet/NTP. Also, where do you plan on storing the log and how are you planning to view it? You can get an SD card module to store it on. There are other options if you plan on connecting it to the internet. You could store a few in memory and display it on a screen if you want.

I'm not sure about all the details of this build. I've only watched the listed video and I got the ideal to tweak this idea to fit my needs. So I'm looking for suggestions and ideas.

Does a ESP32 also have a RTC, and can it be used with the RCWL-0516 ?

Storing the log and viewing ? I was thinking I could use an SD card but are there other ideas available ?

If I connect to an Ethernet, are you saying I'd view it on a website of some sort ?

Does the Arduino come with on board ram ? Viewing with a monitor would sounds like  a good idea.


   
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
 

I didn't know the ESP32 had an RTC. Interesting.

The RTC operates separately from the RCWL-0516, and they don't need each other. The RCWL tells you when there is motion nearby and the RTC is used to determine the current date/time or to serve as a timer.

You could save data to the SD card or you have other options (for example):

  • Send a message to an MQTT message broker
  • POST the data to an HTTP server

It depends what you want to do with the data.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 
Posted by: @andy-nash

Does a ESP32 also have a RTC, and can it be used with the RCWL-0516 ?

Yes and yes. There are different ways to set it up and using an external oscillator could be more accurate. But if is connected to the internet then I would just update it once a day unless you see creep too far off.

Posted by: @andy-nash

Storing the log and viewing ? I was thinking I could use an SD card but are there other ideas available ?

If I connect to an Ethernet, are you saying I'd view it on a website of some sort ?

ESP32 can connect to your wifi network. Accessing it locally is easy, it would be a little more to set it up to be used over the internet but easily doable. You would not need to use an SD card unless you need to log a large number at the same time, so if you just want to have a few logged and erase the first, then no SD. But an SD card would be more stable and would not loose it's data after resets.

 

Posted by: @yurkshirelad

You could save data to the SD card or you have other options (for example):

  • Send a message to an MQTT message broker
  • POST the data to an HTTP server

It depends what you want to do with the data.

Exactly that! There is a few more options though.

  • Make the ESP32 an internet facing device(I would not recommend this unless you really know networking protocol and can set it up safely)
  • Use Google Drive or some other file sharing to host your log/upload to. There are a few APIs that can help

   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 
Posted by: @yurkshirelad

I didn't know the ESP32 had an RTC. Interesting.

I guess I should elaborate a little here. RTC is not actually Real Time Clock but the standard that Espressif uses should be within +/-1%. That's good enough to work with and update every day. If you are really looking for accuracy, go for a purpose build RTC. If you want small and not add some extra parts to a project, just get EPOCH once in a while.


   
ReplyQuote