I’ve connected a Grove TDS sensor and a Grove turbidity sensor to WIO Terminal battery chassis at A2 and A4. Using the example code I’m getting readings which change when immersing the sensor in water, so the connection is ok.
The example code (for a Seeeduino) is using 5V but what should I use when using WIO Terminal, 5.0 or 3.3? Basically same question apply for other analog sensors as well.
float turb_voltage = turbidityValue * (5.0 / 1024.0); // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
Hello, the Wio Terminal has a 5V or 3.3V power supply port on the back, so you are free to choose. If you are using 5V, then this code only needs to be modified for the Pin port you are connecting to. If you are using 3.3V, you will also need to change the voltage value in the formula from 5.0V to 3.3V.
Ok, while I misread your comment, the Grove-equipped sensors I’m using are however as input voltage supporting both 3.3V and 5V, and their output voltage “shouldn’t” (dangerous assumption I know) exceed their input voltage…?
@Citric Found this picture which tells that the WIO Terminal is using 3V3 as is the Battery Chassis, I’m not sure if/where I’ve seen mentioned about support for also 5V, perhaps it was related to the 40-pin port which indeed supports both voltages.
Yes, but you have to make sure that the output of any such module doe not exceed the 3.3V if it is connected to any analog or digital input. If the module is supplied with 3.3V you can reasonably assume this. If the supply is 5V you really have to check.