Go Down

Topic: Using an external 5V source as AREF for Arduino Micro (Read 507 times) previous topic - next topic

wvmarle

So, for example, if the hall sensor output is 4.8V (typ. source output current 1.5mA according to spec), connected to an analog input pin on the arduino, while the arduino itself is not powered at all, will that blow the analog input?
Quote
That may happen - depending on the amount of current the output can deliver.

Quote
The SFH 9206`s each have a 4.7k resistor, in a basic common-emitter configuration.
OK, you got me to look up the data sheet and that confirms the feeling I had already.

You're doing it wrong. In several ways.

1) the IR diode can handle up to 50 mA, I can't find a "typical" value - 20 mA or so should be enough in most applications. You can have the USB supply deliver enough current for several of those. That 35 mA of yours is very generous. Still, the USB supply should be able to handle that 300 mA.
2) if you MUST power them from an external supply, you only use that for the emitter side (the diode). Keep the detector on the Arduino's supply.
3) it's a digital output: beam is made or broken. You shouldn't be bothering taking analog readings of it, or mess around with Aref, in the first place.
4) the SS495A is ratiometric, and is best powered from the Arduino and read through the default reference (Vcc). This way changes in voltage of the Arduino don't matter. This will give better stability than an external power supply, which of course is also not perfectly stable.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

deey

OK, you got me to look up the data sheet and that confirms the feeling I had already.

You're doing it wrong. In several ways.
Thanks again for your time, wvmarle. Your help is very much appreciated. :-)

Unfortunately, I was not involved in the development of this sensor circuit, and there is hardly any documentation, so I can only guess at the reasons for the design choices. But let me try:

Quote
1) the IR diode can handle up to 50 mA, I can't find a "typical" value - 20 mA or so should be enough in most applications. You can have the USB supply deliver enough current for several of those. That 35 mA of yours is very generous. Still, the USB supply should be able to handle that 300 mA.
The SFH 9206 is used here to measure the distance (order of magnitude 1 mm) to a reflective surface (in an enclosed space). This may not be the intended use for the "interrupter" (although "position reporting," from the spec sheet, can be interpreted several ways), but, nevertheless, it works remarkably well. My guess is that the relatively high current of 35mA is necessary to get sufficient signal strength on the detector side.

Quote
2) if you MUST power them from an external supply, you only use that for the emitter side (the diode). Keep the detector on the Arduino's supply.
Sounds good, but, wouldn't I still get issues due to different supply voltages? If the IR diode supply voltage changes, the light intensity changes, so the phototransistor output changes. But the supply voltage for the phototransistor would remain "fixed" at the Arduino/USB level.

Quote
3) it's a digital output: beam is made or broken. You shouldn't be bothering taking analog readings of it, or mess around with Aref, in the first place.
Please excuse my stubbornness, I'm just trying to understand: The detector in the SFH 9206 is an NPN phototransistor. Based on the name "interrupter" (for the IR-diode/phototransistor combination), I guess it would indeed typically be used in a "digital" sense, where the beam is either made or broken. But the actual output is analog, right? Could you tell me what precludes its use as an analog measurement device?

Quote
4) the SS495A is ratiometric, and is best powered from the Arduino and read through the default reference (Vcc). This way changes in voltage of the Arduino don't matter. This will give better stability than an external power supply, which of course is also not perfectly stable.
Would that not increase "noise" considerably? At least when arduino is powered from USB? Currently the external power supply for the sensors uses an ADP3338 high-accuracy, low-noise, voltage regulator, which provides a pretty clean signal.

Sorry for keeping on going with the questions. ;-)

wvmarle

Thanks again for your time, wvmarle. Your help is very much appreciated. :-)
Sounds good, but, wouldn't I still get issues due to different supply voltages? If the IR diode supply voltage changes, the light intensity changes, so the phototransistor output changes. But the supply voltage for the phototransistor would remain "fixed" at the Arduino/USB level.
Sure - but the two will react differently, and the detector side will probably react MUCH stronger - there's not that much brightness difference between 30 and 35 mA - which would require about 0.5V change, a change that sees a 10% change in the detector.

Quote
"digital" sense, where the beam is either made or broken. But the actual output is analog, right? Could you tell me what precludes its use as an analog measurement device?
The whole digital world is, in the end, implemented in an analog one. So sure the change in resistance of the phototransistor may be used to measure the actual brightness of the beam, even if it's not the intended use.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

deey

Thanks again, everyone.

I'll look into a redesign using only USB power.

Go Up