pimoroni / enviro-phat

Python libraries and examples for the Pimoroni Enviro pHAT
https://shop.pimoroni.com/products/enviro-phat
MIT License
110 stars 51 forks source link

OLD vs NEW enviro pHAT #35

Closed dglaude closed 4 years ago

dglaude commented 5 years ago

The README.md say: "An ADS1015 analog sensor with four 3.3v tolerant channels for your external sensors"

Pinout.xyz say: "ADS1015 4-channel 5v tolerant 12-bit ADC (0x49 on the i2c bus) (3.3v 12-bit ADC at address 0x48 in first production run of the board)"

Maybe more information about this would be needed. (I don't own a enviro-phat, I was just looking for ADS1015 source code)

dglaude commented 5 years ago

The code confirm that two version exist: enviro-phat/library/envirophat/ads1015.py

Gadgetoid commented 5 years ago

Yes two versions exist- albeit the first one was a very limited run, it's still in the wild. Since the calculation to convert from ADC reading to voltage varies between the version powered at 3.3v and the version powered at 5v they use different i2c addresses to disambiguate them.

Looks like the shop also claims 3.3v, right undernearth a large photo of the board labelled "5v." - https://shop.pimoroni.com/products/enviro-phat

The ADC channels are, indeed, 5v tolerant and the ADS1015 is powered from the Pi's 5v supply. Even the earlier 3.3v version of the ADC generally tolerated 5v, although it was out of spec (since the device was powered at 3.3v).

Will get this cleaned up! Thanks

Gadgetoid commented 5 years ago

@sandyjmacdonald could you look into the shop description please?