Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP D1 Mini #17

Open
Johnep101 opened this issue Feb 23, 2021 · 14 comments
Open

ESP D1 Mini #17

Johnep101 opened this issue Feb 23, 2021 · 14 comments

Comments

@Johnep101
Copy link

Hi Invandy,
John again.
Sorry to bother you but Ive moved over to a D1 Mini esp32 module, code was running great on my ESP Node MCU dev 12 module. I now have some of the ESP32 modules and would like to run it on them.
I can see code coming in if I use the "Oscilloscope" mode and occasionally I do get valid data. I wonder if it is anything to do with the faster clock speed of the ESP module?
I am using this start up code:-
........
Oregon_NR oregon(27, 27, // output receiver 27 (GPIO27)
255, true, // The LED on D2 is pulled up to + power (true). If the LED is not needed, then the pin number- 255
50, true); // Buffer for receiving a parcel from 50 nibls, package assembly for v2 is included
........
with data connected to GPIO27.
this is a typical data output =
BEFORE OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OO II OO II OI OO IO IO II OO IO II OO IO IO II OO IO II OO IO IO IO IO II OO II OI OO IO IO II OO IO IO IO II OO II OI OO IO IO IO IO IO II OI OO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO II OO IO IO II II II II II II II II II II II II II II II II II II II II II II II II II II II II II II II II II II II II II II II II OO
AFTER OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OI OO II OO II OI OO IO IO II OO IO II OO IO IO II OO IO II OO IO IO IO IO II OO II OI OO IO IO II OO IO IO IO II OO II OI OO IO IO IO IO IO II OI OO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO IO II OO IO IO II OO II OO II OO II OO II OO II OO II OO II OO II OO II OO II OO II OO II OO II OO II OO II OO II OO II OO II OO II OI OO
type 6532 ( which I think is the WGR800 wind speed).

any help or pointers would be gratefully received.

many thanks

John

@invandy
Copy link
Owner

invandy commented Feb 23, 2021

Hi, John. With such quality oscilloscope data you have to get a correct packet. So I have no any idea. If you show the complete dump maybe it might clarify something.

@Johnep101
Copy link
Author

Hello, and thank you for your reply.
I have received a few packets of valid data, so I reckon it might be down to some interference, possibly from the ESP WiFi section.
I hope to run some tests tomorrow where I will turn off the WiFi and see if that helps.
I will let you know.
Thanks again.
John.

@Johnep101
Copy link
Author

Hello again, as promised an update of today's activity.
I read your big article on the decoding process and found it very helpful, a great piece of work.
As of yesterday I occasionally got a valid data packet from the anemometer but very rarely from the rain gauge. Based on that I figured maybe my receiver needed more gain, so I found this article https://www.instructables.com/433-MHz-Coil-loaded-antenna/ on improving the sensitivity by using antennas. I built two, connected one to the ground pin and one to the antenna pin and bingo, absolutely nothing!!! After some Head scratching I then downloaded a "raw data" sniffer and although I live in a low population density area my screen was full of data coming from all sorts of sensors. So it seems that the anemometer data gets through because it sends data more often.
I took off the antenna, wired the rain gauge directly into a spare interrupt pin and I will live with the occasional update from the anemometer.
I use the data to calculate the evapotranspiration rate for my irrigation system (again using NodeMCU and Blynk) so I can happily work with this system.
Thanks again for a great piece of work and your help.
John.

@invandy
Copy link
Owner

invandy commented Feb 26, 2021

As I know ESP8266 microcontroller is quitely noisy in wide frequency range. I suppose that ESP32 has the similar problem. So you may try to improve receiving by moving receiver away from esp as far as possible and organizing for it a pure independent supply.
As for antenna, it seems to me that straight piece of wire have to receive better than coiled one. As I remeber such antenna has a larger effective area (absorbtion area), But I'm not sure :)

@Johnep101
Copy link
Author

Hi again, yes I did move the receiver about 15cm away with no effect and I also provided an extra stable supply. The antenna is called a "loaded dipole" and gives very good results for a shorter length. Doing more investigation it does seem like there is just too much traffic in the band, I'm getting More than 40 valid messages per second plus more that are corrupt and these just clash with the random weather station data.
But many thanks for your help, I can get what I need for now.

@donwade
Copy link

donwade commented Feb 26, 2021 via email

@donwade
Copy link

donwade commented Feb 26, 2021 via email

@Johnep101
Copy link
Author

Johnep101 commented Feb 26, 2021 via email

@Johnep101
Copy link
Author

Hi just a final comment on this topic.
The Oregon scientific is not made for disassembly! So I couldn't get access to the raw data line. I made a small box to put the receiver in and fixed this to the side of the anemometer near the transmitter antenna. All works fine and I get regular updates from the anemometer which I use in my Blynk weather app. Thank again!

@kroon040
Copy link

Hi John,

I Also want to tun it on an esp32 . Do you have it running with MQTT?

regards Richard

@donwade
Copy link

donwade commented Dec 14, 2021 via email

@Johnep101
Copy link
Author

Johnep101 commented Dec 15, 2021 via email

@donwade
Copy link

donwade commented Feb 3, 2022

I finally got my code up and running. It uses a esp32 with a ttgo 433/oled radio board
It doesn't use the pure hw OOK functionality the radio provides (OS is weird OOK) but I configure the hardware for direct rf bit read with h/w squelch etc.
I originally did use a dumb 433 device but I moved to the ttgo 433 board for improved sensitivity and noise rejection.
I did steal (sorry re-used) Invandy's crc/csum routines (wow, great work there. I'd never figure that out)

  1. logs to sd card (optional)
  2. connects to wifi for ntp time so logs are nice. (optional)
  3. limits b/w to 250Khz so I don't get creamed by our neighborhood ham radio operator :)
  4. uses packed structures because people say you shouldn't use it, but lordie, no shift/mask/shift compare routines in my code. Ordered packing for esp32, I don't care about other architectures.
  5. each OS sensor sits in its own file. I only did 4 of many.
  6. I wanted to see if a ino Arduino project can use ISRs/tasks/semaphores/message queues etc, so I got away from "loop()"
  7. Putty log included.

https://github.com/donwade/RadioLib
IMG_1454

@Johnep101
Copy link
Author

Wow nice job👍 Well done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants