I'm planning to create kwh meter. It will read led blinks (1000 imp/kwh) with opt101 sensor. Opt101 seems to give 0-5 V depending of the amount of the light. Which pin in Arduino is the best to connect opt101? A0 says max input is 3,3 V.
So you have a sensor powered by 3.3V and you think it will output 5V? How?
Also, WHAT Arduino do you have?
Hi,
Welcome to the forum.
Please read the post at the start of any forum , entitled "How to use this Forum".
OR
https://forum.arduino.cc/index.php?topic=712198.0
If you look at the OPT101 data, you will find it will operate from 3V3 supply and produce an output up to Vsupply - 1.3V.
So 3.3 - 1.3 = 2volts.
Check your controller to see what its input characteristics are and if 2Volts will register as a HIGH?
Tom...
pmj99:
A0 says max input is 3,3 V.
Where does it say that?
Arduino Uno. Which pin would you use?
Paul__B:
Where does it say that?
I think all the new NANO-IOT, NANO-33, etc boards are 3v3 and not 5v tolerant ??
pmj99:
Arduino Uno. Which pin would you use?
WELCOME ! Welcome to the forum.
One of the things that you can do to help us a lot, is to post links to data sheets, or the exact thing you bought, and also let us know the exact board you have.
There is the 'official' UNO then the 'other' official one.
Clones, knock-offs, the ESP8266 based D1 board and others that have the same shape but are not perfect copies.
We all have some of each, so we don't care which one you have, but we DO need to know as things from board to board are different.
The 'old' UNO, official, clones and knock-offs used the 328x chip the new ones may have and STM32, an ESP8266 or ESP-32 or the new ARM-Cortex chip......
So, we are not asking to be difficult, but because there really are a lot of different flavors.
As a note, when you search for sensors, add 'arduino'
example : Opt101 arduino
you will often find most of your questions have been answered
and when you follow one of those, please post a link when you have a question why it does not work.
So I don't get banned if I would say that the board is actually Wemos D1R2? I have googled for Opt101 and Arduino but things are not clear to me yet. Some uses interrupts and some uses something else. Maybe I proceed with A0.
TomGeorge:
If you look at the OPT101 data, you will find it will operate from 3V3 supply and produce an output up to Vsupply - 1.3V.
So 3.3 - 1.3 = 2volts
Actually supply can be 2.7 to 36 V.
I'm guessing OP is powering the sensor off 5V (for using an Uno), and that somehow they measure the output on the A0 pin and based on the reading conclude that they can get 3.3V out of the sensor when it's placed in a way to catch most of the light of that LED they're trying to monitor.
If there's indeed that 1.3V drop, a 5V supply would result in a maximum output of 3.7V. Not knowing how OP got to that 3.3V (they forgot to post things like their code, schematics and photos of the actual setup) I'd say close enough to make sense for a light source that does not saturate the sensor.
This sensor is meant for detecting IR; if the LED in question is actually a visible one (probably) this is a pretty poor choice of sensor for the purpose.
OK and then it turns out to be a WeMOS... Well, not going to change the numbers. The rest remains the same.
pmj99:
So I don't get banned if I would say that the board is actually Wemos D1R2?I have googled for Opt101 and Arduino but things are not clear to me yet. Some uses interrupts and some uses something else. Maybe I proceed with A0.
NO PROBLEM ! we know the EXP8266 and many of us use them. most of the Arduino code can run on them.
the D1R2 has a 3.3v limit... or.. a 1.000 volt limit, depending on the maker.
99.999% have a pair of resistors that create a voltage divider. 220k to 100k
Do you know how to make a voltage divider ?
I would consider using the Mega328's analog comparator:
Except that he is not using a Mega328.
would think a 12bit ADC would come in handy, if you needed greater resolution then the Wemos D1R2's
analog pins (A0)
https://learn.sparkfun.com/tutorials/qwiic-12-bit-adc-hookup-guide/all
Which MCU is on a UNO?
Quite a different one to a "WeMOS D1 R2" which is a board mounting an ESP8266 module on the form factor of a UNO.
Frankly not a very useful board at all, since it lacks the number of I/O pins of even the UNO.
The idea behind it is that you can use Arduino Uno shields... that's why a.o. you see D5-D8 repeating as SPI pins, and the same for the SDA/SCL pins.
I made the mistake of buying one when I just started out with Arduinos and microcontrollers. Not long after I accidentally blew it up by miswiring some external components and feeding 12V straight into one of the I/O pins. Never got another one. It's really the worst of both worlds - the limited I/O of the ESP and the awkward form factor of the Uno - plus the confusion where you're made to think it's one thing but really it's something totally different.
wvmarle:
The idea behind it is that you can use Arduino Uno shields...
Except of course, that most of them are useless for the reason mentioned.
Paul__B:
Except of course, that most of them are useless for the reason mentioned.
Exactly.
That's why it's a board that's to be avoided. It's just a major mistake from the development and/or marketing department of WeMOS.Honestly I'm surprised to see it come up, as I thought WeMOS stopped producing them years ago as they came to this exact conclusion. It's gotta be some old stock that's still being dumped on unsuspecting newcomers.
In fact, it apparently does not even exist on the WeMOS site!
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.