Jump to content

NLCbanner2024.jpg.2478be509670e60c2d6efd04834b8b47.jpg

Gina

Beyond the Event Horizon
  • Posts

    45,326
  • Joined

  • Last visited

  • Days Won

    120

Posts posted by Gina

  1. 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 Tutorial

    EDIT :- 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.

  2. 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.

  3. 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!

    • Like 1
  4. 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.

  5. 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.

  6. 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.

    • Like 1
  7. 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.

    • Like 1
  8. 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.

    • Like 2
  9. 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.

    • Like 1
  10. 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).

  11. 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.

  12. 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.

  13. 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.

    • Like 1
  14. 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.

    926058593_Screenshotfrom2020-06-2820-00-25.png.4260abc4bfa0f9070a3850c4033d44df.png1100698998_Screenshotfrom2020-06-2820-02-23.png.799e1613709d652ff8a6607b32d2e702.png

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.