[sdiy] Very cheap SPI pressure sensors.. anybody ??
Didrik Madheden
nitro2k01 at gmail.com
Fri Mar 19 19:16:28 CET 2021
Here's an idea. It's a bit janky, and requires some extra circuitry,
but it might work for you. The basic idea is to use a chain of 74hc595
serial to parallel shift registers to generate either a chip select or
clock signal. You feed in a single 0 into the shift register, which
you move forward one step at a time.
In the case of a chip select signal, this selects one chip at a time.
To select the next chip, clock the register chain one step to forward
the 0 bit one step.
In the case of a clock signal, it's a bit more complicated. But this
could be used to multiplex I2C. In this configuration, all the data
pins are commoned. (Or commoned in multiple groups if needed for
signal integrity.) You have a similar idea as in the example above in
that a 0 bit travels one step at a time. You could do this the slow
way and send out the full chain of bits just to flip one bit and clock
the local I2C bus. Or, you could do it the slightly quicker way and
use the output enable of the 74HC595's to clock the selected device.
It would work like this:
Most bits in the register are ones. For those bits, turning the output
enable on or off would do nothing because you're switching between
driving the clock signal high, or leaving the clock signal with a
pullup resistor which also keeps at logic high.
One or multiple bits are zeros. When output enable is off, that output
is high from the pullup that you add, or which exists on the module
you use. When you turn on the output enable, voilà! The clock signal
for that device goes low, and you have fed clocked one I2C bit. I
think you can fill in the rest. All the other devices will also see
the data line change, but they're in high impedance mode, and will not
react to data without a corresponding clock.
If you are able to design a board and have it ordered from JLCPCB
using their PCB assembly service, you could use SPL06-007. It costs,
currently, $0.6622/pc in 100 quantity. There's some extra cost for the
board and assembly service, but that should be relatively cheap in
comparison.
To give even more precise advice, it would also help to know more
about the details of the project. In particular the physical
arrangement of the sensors. If they need to branch off from a central
point using cables, if the cables need to be detachable etc. If you
want to discuss these things closer in private, feel free to contact
me off-list.
/Didrik
On Fri, 19 Mar 2021 at 16:14, Jean-Pierre Desrochers <jpdesroc at oricom.ca> wrote:
>
> I'm looking for very cheap SPI pressure sensors (around $1.00 a piece or less)
>
> For a future project. The pressure value doesn't matter but the size and cost do.
>
> I will need around 90 of these sensors.
>
>
>
> For example I found this:
>
> BMP180 GY-68 GY68 3.3V 5V BMP-180 Temperature Pressure Sensor Module Barometric IIC I2C Interface Sensor Module Replace BMP085 $0.90CAD
>
> https://www.aliexpress.com/item/32832330585.html?src=google&albch=shopping&acnt=708-803-3821&isdl=y&slnk=&plac=&mtctp=&albbt=Google_7_shopping&aff_platform=google&aff_short_key=UneMJZVf&&albagn=888888&isSmbAutoCall=false&needSmbHouyi=false&albcp=7386552844&albag=80241711349&trgt=743612850714&crea=en32832330585&netw=u&device=c&albpg=743612850714&albpd=en32832330585&gclid=CjwKCAjw9MuCBhBUEiwAbDZ-7mU2hTS0J2DLxvsPsj8F40L-zV8vtApw9ds_ks1c2Qjg7dLiKgsy3RoCq-EQAvD_BwE&gclsrc=aw.ds
>
> But because I need 90 devices and the BMP180 is I2C and has only one address value
> I would need somekind of multiplexer to address 90 devices (one at the time obviously).
>
> So.. SPI devices would fit better here.
>
>
>
> One other possibility would be to use this type:
>
> MPS20N0040D MPS20N0040D-D Sphygmomanometer Dip Air Pressure Sensor 0-40kPa DIP-6 For Arduino Raspb $0.74CAD
>
> https://www.aliexpress.com/item/4000354356373.html?src=google&albch=shopping&acnt=708-803-3821&isdl=y&slnk=&plac=&mtctp=&albbt=Google_7_shopping&aff_platform=google&aff_short_key=UneMJZVf&&albagn=888888&isSmbAutoCall=false&needSmbHouyi=false&albcp=9604672960&albag=100679328364&trgt=296904913880&crea=en4000354356373&netw=u&device=c&albpg=296904913880&albpd=en4000354356373&gclid=CjwKCAjw9MuCBhBUEiwAbDZ-7kff0q--0F6YUo73aVqE_HAtqkRyIslFbEMRTWz7QICR2szctlC7zxoCrMUQAvD_BwE&gclsrc=aw.ds
>
>
>
> But I’ll need some analog IC to manage the output..
>
> Again the part’s pressure specs value do not matter.. I will manage a way to use it.
>
> but the size and cost do.
>
>
>
> So far the best would be a SPI equivalent of the BMP180 IC..
>
> Let me know if someone googled something I did not spot !
>
>
>
> JP
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org
--
/Didrik
More information about the Synth-diy
mailing list