Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

HCSR04 & Sw5

Home Forums Mayfly Data Logger HCSR04 & Sw5

Viewing 4 reply threads
  • Author
    Posts
    • #12240
      bernardo
      Participant

      Has anyone used HC-SR04 with mayfly? How does Sw5 output 5 volts? Any links to buy grove connectors? I’m new to this board. Thanks in advance for any help!

    • #12242
      David Lutz
      Participant

      The Grove connectors are currently a bit of a pain to procure. They are available on SeeedStudio and Amazon but my sense is that everything is back ordered. I’ve had to have them shipped from Hong Kong over the past few months.

    • #12247
      Shannon Hicks
      Participant

      Grove connectors, cables, and sensors are actually quite easy to get. Usually when you buy a Grove sensor, it comes with a free 20-cm cable. Or you can get 5-packs of the cables for around $3. https://www.robotshop.com/en/grove-4-pin-buckled-20cm-cable.html

      You can get 10 Grove connectors for $1: https://www.robotshop.com/en/seeedstudio-grove-4-pin-connector.html

      Here’s a Grove version of HC-SR04 ultrasonic sensor: https://solarbotics.com/product/29062/
      Also available here: https://www.epictinker.com/Grove-Ultrasonic-Ranger-p/sen10737p.htm
      And from Jameco: https://www.jameco.com/z/101020010-Seeed-Studios-Grove-Ultrasonic-Ranger-Distance-Sensor_2237845.html

      Solarbotics.com and Epictinker.com both have a bunch of Grove sensors and cables.

      RobotShop has over 100 Grove-related products: https://www.robotshop.com/en/catalogsearch/result/?q=grove&order=relevance&dir=desc

      Robotmesh has even more: https://www.robotmesh.com/catalogsearch/result/?cat=0&q=grove

      Mouser sells a variety of Grove/Seeed products: https://www.mouser.com/new/seeedstudio/seeed-studio-grove-sensor/
      So does Digikey.

    • #12248
      Shannon Hicks
      Participant

      As for the switched 5-volt supply on the Mayfly, it’s a boost converter that I put on the Mayfly years ago because we use a lot of sensors that require 5-volt excitation, but then they return a 0-2.5v analog signal, which is safe for the Mayfly to read with either the onboad 10-bit ADC, or the auxiliary 16-bit ADC. The 5v boost isn’t needed for working with the Grove rangefinder I linked above. I have successfully used them with the Mayfly before, and they are fine being powered by the 3.3v supply of the Mayfly, which is preferred since the signal levels between the Mayfly and any peripheral sensor should be the same. If you power an external device with 5v, then you should use additional level-shifting circuitry to protect the Mayfly from potential damage.

      The VCC pin of the Grove ports on the Mayfly are powered by the SW_3v3 line by default. Swapping the jumper headers next to the jacks will change them to 5v, but only do that if you are prepared to deal with the potential voltage mismatch. To control the SW_5 and SW_3v3 pins of the Mayfly, simply write pin D22 high whenever you want to power anything connected to the Grove terminals.

    • #14930
      matt
      Participant

      I am trying to use the HC – SR04 with the board and have some similar questions. To clarify, are you saying that sensor can actually run fine at 3.3V? I hooked it up to the Sw5 pin and found code that says to power that at 5V write D22 high. Echo and Trig are hooked up to digital pins directly. Are you saying the return voltage from the echo pin will be too high?  In addition, I added a DHT 22 temp/humidity sensor. I also directly connected a digital pin and 5v for power. So far nothing has blown up.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.