I found that riffle's operating voltage is 3.3v, while most of sensors compatible with Arduino is...
Public Lab is an open community which collaboratively develops accessible, open source, Do-It-Yourself technologies for investigating local environmental health and justice issues.
This is a testing site only. See the live Public Lab site here »
All topics »
If you cannot use the ReCaptcha to verify you are not a bot, use this alternative verification.
As an open source community, we believe in open licensing of content so that other members of the community can leverage your work legally -- with attribution, of course. By joining the Public Lab site, you agree to release the content you post here under a Creative Commons Attribution Sharealike license, and the hardware designs you post under the CERN Open Hardware License 1.1 (full text). This has the added benefit that others must share their improvements in turn with you.
sign up to join the Public Lab community
Forgot your password? Reset it here
by shanlter |
November 04, 2017 16:01 |
I found that riffle's operating voltage is 3.3v, while most of sensors compatible with Arduino is 5V.
How could riffle compatible with those sensors?
That's a good question. There is no 5V-out pin on the Riffle, but there is a "VBAT" pin on the 2x7 pin header. I assume that pin carries the voltage of the battery that powers the Riffle. The Riffle can be powered by batteries with 3.5 to 6 volts. If you use a 5V to 6V battery, the VBAT pin should supply about 5V. I don't know if this current is regulated.
Evidence suggests my answer is wrong. I powered a Riffle with a battery pack which supplied 4.5V, but the VBAT pin supplied only 2.3V. So maybe it's not so easy to power 5V sensors with a Riffle.
Further empirical evidence suggests that the VBAT pin delivers the voltage of the battery that is plugged into the "Lithium 3.7V" connector, but not the "General 3.5-6V" connector. So the VBAT pin does not supply 5 volts when a 5 volt battery is plugged into the proper connector. I assume that means that additional electronics are generally required to use sensors which require 5V.
However, there might be a simpler workaround for some sensors. I have used the Modern Device wind sensor Rev P with a 5V Arduino Nano. The wind sensor requires 8V which the Nano does not supply. So I powered the Nano with a 9V battery and powered the wind sensor from the "VIN" pin which is where the battery connects to the Nano. Everything else was wired normally. It has worked well on several flights (https://publiclab.org/tag/series:diy-wind-sensors).
I don't know whether the Riffle could tolerate the logic signals sent back from a sensor that is powered with 5V. It probably depends on the sensor, some of which might use 3.3V logic.
Although there are sensors that require more than 3.3V, most of the simple DIY sensors are designed to use 3.3V. For example, all of the sensors here can use 3.3V, and some can use either 3.3V or 5V.
It is a common design decision to use only 3.3V and allows better longevity on battery power. This is also a characteristic of the Arduino Pro Mini, several other Arduinos, and the Adafruit Feather boards.
Thanks very much! The link of your website is very helpful! I will try when I receive a riffle : )
Reply to this comment...
Log in to comment
Hallo! If the hardware is Riffle version 0.1.8, the relevant schematic is here -- and, so far as I can tell, VBAT should simply be the battery input voltage. But I'm also very hesitant to bet against diagnostic performed by the generally-very-thorough @cfastie, so I suspect I'm missing something.
In any case: getting a Riffle (which does indeed operate at 3.3V) to talk to 5V sensors will require two things vis-a-vis power: a) you'll need to find a way to provide 5V to power the sensor, and b) you'll need to find a way to talk to the sensor with compatible signal levels. If, e.g., the 5V sensor outputs an analog signal that ranges from 0..5V, the Riffle's analog inputs can only handle 0..3.3V, so you'll want to use a voltage-divider (easy way) or a 'level-shifter' (a special chip that lets different voltage levels speak to one another). Another examples: if e.g., the 5V sensor uses the i2C protocol, there's the possibility that the Riffle's digital 3.3V signal HIGH values (3.3V) aren't high enough to register as a 'HIGH' for the i2c sensor chip in question -- a case that might also be handled with a level-shifter, I think.
For a nice general discussion of getting 3.3V hardware to talk to 5V hardware, see this post by Hackaday.
Hi Dan, thanks very much! So basically, what I need is to connect (at least) DO and pH sensors to Riffle. My collaborator said that using a voltage - divider will affect the data inaccuracy. I haven't try yet, but I think I will when I get a riffle and get back home.
This is part of: