How do I wire a Logic Shift Converter Bidirectional 5v to 3.3v with the following pins LV, GND, LV1, LV2, LV3, LV4 and HV,GND, HV1, HV2,HV3, HV4. I have it wired this way 3.3V going to LV and GND to GND and 5V going to HV and GND to GND, the problem is the signal, im putting a 5v signal from a pressure sensor, that needs to be taken to 3.3v so my arduino NANO RP2040 can read it, but its not doing so, its not reading even the signal. I would like to know what i may be doing wrong...
How have you wired the sensor and the Nano ?
The sensor data pin should go to an HV pin, such as HV1 and the Nano pin should go to the matching LV pin, ie LV1
I hope that it goes without saying that the senso GND pin should go to GND
The sensor signal is going to HV1 and coming out as LV1 to the Analog of the Arduino
No! Post an annotated schematic showing how you propose to wire it and include links to technical information on the hardware items.
Then the answer is that you don't do it. These bi-directional converters are meant for digital signals and won't work with analog.
All you need is a voltage divider: 2x resistors such as 10K & 22K.
So that will attenuate the signal to 3.3V in order to be read by the Analog Port, wont it?
If the output of the sensor is 5V, it will attenuate it to 5 * 22 / (22 + 10) = 3.44V, so a little over 3.3V. So actually if you need to read anything over 4.8V from the sensor, some slightly different resistors might be best. For example 22K and 11K (made from 10K + 1K).
So I did the voltage divider and I am getting 3.3V on the Arduino, the problem I see now is that the ADC Values change much and they are not very stable. Do i have to do to fix that fluctuation in the analog signal?
Try a 0.1uF cap from the analog pin to ground.
Later, if it is still too unstable, you can smooth the values in your sketch by averaging 50 or 100 readings.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.