Photon A/D pin input resistance?

I’ve looked all over for this but can’t seem to find it: what is the input resistance of the A/D pins on the Photon?

Have you looked at the µC datasheet?
https://github.com/spark/electron/blob/master/datasheets/STM32F205x%20Datasheet.pdf

You are not looking at a ohmic resistance but an impedance due to the sample and hold caps.

What exactly are you needing this info for?

No I hadn't seen that. Unfortunately when I opened the link it only served up the first 24 pages and refused to go any further, and apparently the A/D stuff is on page 38.

I want the Photon to monitor its own battery supply voltage. Since I'm using a 12 V battery, I'll need a voltage divider and I need to pick suitable resistors. I suppose using a zener diode might be another possibility.

I hadn't considered the impedance aspect. Might there a better way to accomplish this?

@Michele, is the 12v battery powering a step-down regulator which in turns powers the Photon? The resistor divider approach is the best, making sure the voltage does not exceed 3.3v. Since you are measuring a DC voltage, you can also add a 0.1uF capacitor between the A/D input and GND to remove any ADC sampling effects. Chose resistors that keep the conducted current low but allowing the sampling capacitor (stated above) to charge quickly enough. A total resistance around 100K ohms is good.

3 Likes

Exactly. I'm using a 5 V regulator connected to Vin. Thanks for the number. I'll try 100K and see what that gives. When I get my new Photon. I smoked the old one over the weekend when I accidentally brushed its Vin jumper clip against the direct output of the solar panel (around 18 V at the time). Foo.

Hi @Michele

I might shoot for a lower value than 100k ohm. If I shoot for say 0.5mA current you get 24k ohm, so some close standard 1% resistor values might be 6.04k and 17.8k ohm. That way you would get 3.0403V out with 12V in.

in order to get the full document you should download the raw version - it's 2.5MB

@bko, what I meant was the TOTAL resistance of the divider should be around 100K ohms to keep the current down. :wink:

@Michele, what type of regulator are you using to get from 12V to 5V?

Ah yes, I did figure that. I'm planning to do a 75% top end / 25% to ground split or as close as I can get with standard values.

Just a plain 7805. Anything better than that? This is for a Sparkfun Weathershield using the Photon and one of their Bluesmirf Bluetooth modules. It's drawing a fairly hefty 110 ma. at 5 V.

Oh. OK, I'll try that. Thanks.

@Michele, a 7805 dropping 7 volts at whatever current draw will essentially blow off that excess power as heat. You could consider a buck regulator like this Pololu unit which can supply 5v @ 600ma:

If you need more juice for peripherals, etc. you could use this one which supplies 5V @ 1A:

:wink:

[quote=“peekay123, post:11, topic:24129”]
You could consider a buck regulator like this Pololu unit which can supply 5v @ 600ma:
[/quote]Thanks for the pointer. That sure looks like the ticket. They also have a version that outputs 3.3 V. Would that be better?

@Michele, if you don’t need 5V anywhere (sensors, etc), then you can inject the 3.3V directly to the 3.3v pin. :wink:

That’s a good point. In the interest of possible future expansion, I’ll go with the 5 V. This really does look like a much better way to go than the 7805.

1 Like

Well I got my Pololu regulator and it works great. Current draw on the Photon Weather Shield plus Bluetooth dropped from 110 ma. @ 12 V. to 32 ma. They shipped the same day I ordered it and even included two sets of headers with it - one straight and one 90 deg. Since the Photon conveniently has Vin and GND adjacent, I was able to mount the Pololu vertically right on the Weather Shield using the 90 deg. header. Thanks for that recommendation, Peekay!

1 Like