The level shifter will not supply the 40mA of current the turbidity sensor needs for power. You would need a step-up converter which would get input directly from the battery if possible, and output 5V.
Another possibility would be to power the sensor directly from the battery. It wouldn't be 5V, but the sensor might have enough leeway to still work ok at, say, 3.8V or more from the battery. You would have to experiment.
Thanks, I wasn't aware how much power the level shifter could manage, that makes sense. From what I've read (incl. here) the accuracy of the sensor relies on a 5V input, so I'd need a step up.
It's not clear what data communications are going on with the sensor. Is it all one-way from the sensor to the processor? Are you using the sensor analog output or the digital? From the listing, it looks like the digital output is just high or low, and for that all you would need is a resistor divider or a diode, not a level shifter module.
I'd like to use the analogue mode, which comes through the A0 pin as pure voltage, which you can figure turbidity from. The digital mode is a yes/no option where you can change the threshold. This is less useful to me.
So re: the level shifter, I gather it uses 2 input voltages to determine what the shift is, so I need to input 3.3V on one side and 5V on the other? So a 5V input to both the level shifter and the sensor, from the step up?