-
Posts
45,326 -
Joined
-
Last visited
-
Days Won
120
Content Type
Profiles
Forums
Gallery
Events
Blogs
Posts posted by Gina
-
-
I'm trying to find info on the IZOKEE NodeMCU Module ESP8266 ESP-12E but not having much joy. I shall want 9 digital inputs for the wind sensors.
I do have info on programming it with the Arduino IDE though.
Programming ESP8266 ESP-12E NodeMCU Using Arduino IDE - a TutorialEDIT :- I think some of the info I want is in this tutorial. Seems there are 10 digital GPIOs. Don't know about internal pull-up resistors.
-
I decided to order a pack of 10 plastic housed reed switches due to arrive tomorrow. This would give the easiest system to mount and the smallest also probably simplest to connect.
-
1
-
-
The ESP8266 only has one ADC so it has to be the ESP32 if I want to use the optical sensing. Otherwise if I want to use the ESP8266 I have on order it will have to be magnetic. That's reed switches or Hall devices. Reed switches are easier to mount and easier to connect and need no power supply, connecting directly to the ESP with pull-up resistors enabled on those pins. My only real query with reed switches is reliability and longevity being mechanical.
-
Hmmm... A problem with optical then! Can I make the inside of the casing dark enough??? At least reed switches and Hall devices don't respond to the earth's magnetic field.
-
1
-
-
Latest test result with 1K pull-up resistor to 2.3v gave 1.3v and 0.3v at the collector. This seems to be optimal but shielding the sensors from daylight will be essential unless I use another optical sensor as a reference but this is definitely dodgy!
-
1
-
-
New test result:- Collector still saturates to 0.16v with a curved white PLA reflector at around 3mm and goes up to 0.6v without it - more if shaded from the light coming in through the window. Think it wants a lower value pull-up resistor. I'll try 1K.
-
Just been checking the optical sensor again to see how well it works with a curved reflecting surface. Didn't get very far. I found the photo transistor responded to daylight and the collector saturated with 0.16v. Shading from daylight let the voltage rise a bit but not enough. The phototransistors are supposed to have filtering to exclude daylight. I'll try again with a smaller pull-up resistor.
Using two diode volt drops gives 2.3v (3 gave 3.6v) with 10mA. Half way would be well adequate voltage change for ADC input so if I get 0.5mA collector current from the reflective surface the PU resistor value becomes 1.2v @ 0.5mA = 2.4K. 2K2 will do - that'll give a volt.
-
5 minutes ago, jiberjaber said:
Yep - very flexible the IO on these controllers though be careful on which you use as some have alternative or special uses as well as standard IO (i.e. some are hardware interrupt capable or named pins for some drivers etc)
I think reed switches win out on simplicity - either just a common ground or power and then the switched output back to the controller. Are you going to mount the controller with the wind sensors or remote from it? That might factor in thinking around if to bring back multi-core switched outputs or do something more elaborate to simplify return wires (i.e. bring back over parasitic one-wire, power and data combined to 2 core cable)
The advantage of resistive direction sensing is a reduced number of cores combing back to the controller, I then just scale the input to 360deg with 1 line of code.
The ESP will be mounted in the same casing as the wind sensors so connections will be short. Yes, I shall have to check which pins to use.
-
1
-
-
Reed switches (or Hall devices) would make for a smaller unit but the optical system would be more accurate with the angles preset in the Gray code disc. Needs fewer connections to the ESP (4 rather than 8), decoding is simpler, no debouncing code required.
If I changed the orientation of the optical sensing I could make the surfaces vertical and avoid dust settling. I may also have an idea for reducing the size by not using a 3" (75mm) Gray code disc. There is no particular advantage in using a single Gray code disc - with 3D printing it's no problem making 3 cylindrical code parts.
-
1
-
-
It seems the ESP32 has programmable pull-up or pull-down internal resistors on most pins. This may remove the need for external resistors. I'm hoping this applies to the ADC inputs - I see it certainly applies to most digital inputs. This makes reed switches more practical as they would only need connecting to ESP and Gnd. 9 connections total. Another possibility might be Hall switches but more connections needed and they need power.
-
2
-
-
Hmmm... I admit I hadn't thought about muck.
-
1
-
-
8 reed switches or 4 opto sensors have the same number of connections but the opto system has fewer resistors and fewer connections to the ESP.
-
Makes more sense to use the ESP32 alone than add a separate unit IMO. Thank you anyway.
-
1
-
-
I'm referring to the wind vane with 8 reed switches not the anemometer. The latter is no problem and I'm using a Hall device.
The 8 reeds and magnet are arranged with an overlap - two reeds connect when the magnet is between them. This give a 16 direction readout by measuring the output voltage with an ADC.
-
1
-
-
OTOH I've been researching the resistor values and circuit for the reed switch system and it seems it needs very odd resistor values and quite complicated wiring. This may actually be more complicated than a Gray code disc, 4 optical sensors and ESP32 (or maybe ESP8266 with lots of pins).
-
The ESP32 would be a good option for the temperature, humidity, pressure, etc. but I am wondering if I'm over thinking the wind vane sensor. The simplest solution would seem to be reed switches with a resistor network. My original ones were glass and an inch long also the wind vane was smaller than my current one so I'm thinking the magnetic attraction to the reeds would be a lot less with the modern 14mm long plastic cased reed switches than the earlier glass ones.
-
Links to useful information and further reading (WIP) :-
-
Found information on the ADCs in the ESP32. LINK
-
Still working fine.
-
1
-
-
Second test :- Diode current reduced to 5mA by dropping the PSU voltage. Collector voltage with PLA absent was 2.3v and at 2-4mm gave 0.16v.
Since I don't want to leave the sensors open to the damp I shall have to test with a dark background. I think I have some FLO black velour for lining scopes, though black paper or matte black paint may do.
I'll do more testing tomorrow.
-
Didn't have a 12KΩ so used 10K. Voltage across the 3 diodes was 2.6v. Without plastic (white PLA) the collector was at 1.9v with plastic at 2-3mm voltage was 0.18v. That's a pretty good change.
-
Swapped the 2 10g silica gel packs for fresh ones. The beads weren't green but were quite a dark orange. Now refreshing in the microwave for a few minutes. That was a week with lots of wet weather so that's not bad.
-
1
-
-
Lovely.
-
For testing I can connect 4 diodes in series and connect to 12v from my bench PSU through a 680Ω resistor. Since the diodes drop around 1.1v, 3 of them will be 3.3v so I can connect from there to a transistor collector with a 12KΩ resistor and check collector voltage.
Weather Station Ideas
in DIY Astronomer
Posted
Found this - think I may have problems!
The ESP8266 as a microcontroller - Hardware