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

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

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

  4. Found this

    Quote
    Capacitive sensors
     
    Capacitive 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.

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

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

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

    Quote

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

     

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

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

×
×
  • 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.