2018-04-18 at 12:55 AM #12240bernardoParticipant
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!
2018-04-18 at 5:11 PM #12242David LutzParticipant
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.
2018-04-18 at 9:56 PM #12247Shannon HicksModerator
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.
2018-04-19 at 6:51 AM #12248Shannon HicksModerator
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.
2020-12-16 at 10:30 AM #14930mattParticipant
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.
- You must be logged in to reply to this topic.