-
Posts
45,326 -
Joined
-
Last visited
-
Days Won
120
Content Type
Profiles
Forums
Gallery
Events
Blogs
Posts posted by Gina
-
-
Been looking at the datasheet for the TCRT5000L reflective optical sensor. With 20mm through the diode it gives 1mA of collector current in the transistor which is more than enough. Mind you, it does depend on the reflectivity of the surface and that's where experimenting is required. I'm thinking of going for 10ma diode current giving around 0.5ma collector current. The volt drop in the diode shows 1.1v so with 4 in series that's 4.4v. If I run off 12v that leaves 7.6v for a series resistor = 750 ohms. 680 is the nearest preferred value. For the detector transistor, I think I'll work on 0.25mA as a start. If I run it from 3.3v, 12K should let it saturate at 0.4v VCE. I have yet to look at the ESP32 datasheet to see what analogue voltage it takes but mostly this uses 3.3v so I assume that's the maximum.
-
Here a screenshot of the Gray code disk model.
-
1
-
-
Sensors have arrived so now I'll set up a test rig. I think optical is favourite as only 4 sensors needed. OTOH the emitter diodes need a fair amount of current. I would prefer Hall devices but ATM I can't see how to use fewer than 8 of them. Optical is more accurate though.
-
1
-
-
The ESP32 has arrived and it isn't all that big - just over 1" wide and 2" long (28mm x 50mm). Now I'm waiting for the optical and Hall sensors.
-
I agree about the capacitance - it was just a thought but I can see it wouldn't work.
I haven't found debounce needed with Hall devices but I can see a problem if I used Hall switches with the wind vane as that can "wobble" due to wind turbulence. The Hall devices have a Schmitt trigger circuit built in so don't suffer bounce with a fairly steady increase or decrease in magnetic flux. I have examined the output on an oscilloscope and there was no "bounce" - just a clean, square pulse shape.
I used reed switches in previous wind vanes but did find the the magnet was attracted to the reeds and would "cog" as it moved in a light breeze and although the magnet was spaced to give an overlap representing 16 directions, statistical analysis showed a distinct preference for the 8 main compass points. I did a lot of statistical analysis on my weather stations years ago.
With the wind vane data, it is first necessary to decode the Gray code to binary. Then the sampled data can either be added into a Rose Chart or converted to an average direction using Consensus Averaging.
-
I've ordered the IZOKEE NodeMCU Module ESP8266 ESP-12E from Amazon. Due to arrive tomorrow.
-
Found this
QuoteCapacitive sensorsCapacitive sensors are capable of detecting plastic, wood, and other raw materials including metal. An inductive sensor can detect only metal. A common application is the detection of liquids, plastics, and grains. Capacitive liquid detection is used for level and presence detection.If these pins measure capacitance as seems the case, I think I could make a Gray code plate as a variable capacitor in conjunction with small metal plates as the sensors.
-
Looking at the GPIO pins I see 10 Capacitive sensing GPIOs. Must investigate. Wonder if these could be used with the wind vane.
-
As for sensors, the anemometer has a single Hall effect switch with 3 miniature magnets on the rotor. I estimated this as giving 1pps per mpg of wind speed.
The wind vane will probably use 4 reflective optical sensors with Gray code disc giving 16 directions and 4 bits of data. This needs analogue inputs as the phototransistor current varies. OTOH I will be trying 8 Hall switches with one magnet on the rotor with overlapping operation like the cheap wind vanes use reed switches. This would then use 8 digital inputs. Both systems have their pros and cons.
If anyone has any comments on these ideas I would be glad to see them.
-
BTW, does the orientation of the ESPs matter or are the aerials omnidirectional.
-
Thanks everyone - good news. I like the smaller size for mounting atop the wind sensors mast. Think I'll order one - should arrive tomorrow.
The ESP32 is due to arrive around 1pm by DPD, the Hall devices and optical sensors by Amazon currently saying between 3pm and 6pm.
-
Reading the instructions, how to use on the Amazon site it mention Win32 and Win64 so may need windows and I have Linux only so I'm doubtful of this version.
QuoteHow to use?
1. Download the Arduino IDE, the latest version.
2. Install the IDE
3. Set up your Arduino IDE as: Go to File->Preferences and copy the URL below to get the ESP board manager extensions: http://arduino.esp8266.com/stable/package_esp8266com_index.json. Placing the http:// before the URL lets the Arduino IDE use it...otherwise it gives you a protocol error.
4. Go to Tools > Board > Board Manager> Type "esp8266" and download the Community esp8266 and install.
5. Set up your chip as:
Tools -> Board -> NodeMCU 1.0 (ESP-12E Module)
Tools -> Flash Size -> 4M (3M SPIFFS)
Tools -> CPU Frequency -> 80 Mhz
Tools -> Upload Speed -> 921600
Tools -> Port -> (whatever it is)
6. Download and run the 32 bit flasher exe at Github (Search for nodemcu/nodemcu-flasher/tree/master/ at Github)
github.com/nodemcu/nodemcu-flasher/tree/master/Win32/Release
Or download and run the 64 bit flasher exe at:
github.com/nodemcu/nodemcu-flasher/tree/master/Win64/Release
7. In Arduino IDE, look for the old fashioned Blink program. Load, compile and upload.
8. Go to FILE> EXAMPLES> ESP8266> BLINK, it will start blinking. -
This is an ESP8266 with lots of pins but smaller than the ESP32.
-
Haven't decided on the sensors yet - I have some experimenting to do.
-
The ESP32 seems like overkill but the ESP8266 is not enough so overkill it is! OTOH I'll look at ESP8266 versions with more pins and see if one would serve for the wind sensors.
-
That would be well adequate
-
Yes, that's certainly a point.
-
-
That would seem to be the ideal solution. A genuine Arduino Nano costs around £30 - 4 times the cost of the ESP32. I've found the cheap Chinese Nano clones to be unreliable - I have a large pile of dud ones. No problem with genuine ones except the cost! The ESP32 is a bigger than the Nano but not too big.
I shall probably order another ESP32 for the other weather station location viz. the observatory. One in the wind sensor casing will cover wind measurements and can also read light level. The observatory will have temperature and humidity (maybe pressure) in the Stevenson Screen and temperature and humidity in the scope room. Not yet sure where to put the rain gauge but one possibility is on the wind sensors mast. It used to be on a framework on the grass a couple of yards north of the observatory but that wasn't very convenient.
My plan is to just take simple readings with the ESPs and collate all the data on my main PC indoors. I shall need to see how I program that. Maybe Python. I may request to "borrow" other members ideas and code. I had lots of displays written in Python and using GnuPlot for graphs, rose and pie charts etc. some years ago but that's long since lost!
-
ESP32 ordered.
-
Successfully cancelled the delivery of the ESP8266s and will order an ESP32. Looks a much better bet - everything in one board.
-
£7.49 on Amazon. I'll order one I think... Just a bit more than 2 of the others.
-
1
-
-
The ESP8266s are already on their way to me!
-
4 minutes ago, tekkydave said:
The ESP32 seems endowed enough for a weather station:
- 18 Analog-to-Digital Converter (ADC) channels
- 10 Capacitive sensing GPIOs
- 3 UART interfaces
- 3 SPI interfaces
- 2 I2C interfaces
- 16 PWM output channels
- 2 Digital-to-Analog Converters (DAC)
- 2 I2S interfaces
WOW!!! That looks good. I'll see how much they cost. I though of using an Arduino and WiFi add-on since I'm very familiar with coding Arduinos.
Weather Station Ideas
in DIY Astronomer
Posted
Maybe you haven't tried feeding 12v into it 😀