1st project help. 4 voltages displayed on 2 oled screens

Rob

Aug 24, 2023, 15:54 GMT+2

#body:
I want to make a project, I want to meter voltage from 4 sources, on 2 small oled screens, each displaying 2 separate voltages of .001-.999 vdc I'd like a parts list, wiring diagram, and code. I know it's a lot, but any help is appreciated. Thank you.

Source1. (.001-.999 vdc)
Source2. (.000-.999 vdc)
Source3 (.000-.999 vdc)
Source4 (.000-.999 vdc)

                      Arduino nano

Oled Screen 1.
0.96 Inch OLED I2C IIC Display
displays s1 and s2 voltage

Oled Screen2.
Displays s3 and s4 voltage
0.96 Inch OLED I2C IIC Display

I have zero experience and can use as much help as I can get to make this.

what did you research?
how do you plan measuring the voltage?

I found that I can monitor and meterr the four sources through a0 a1 a2 and A3. I also heard I can use a built-in 1.1 volt as a reference. I also heard that I could change the Oled hex addresses in code?

do you have a link for your 0.96 Inch OLED I2C IIC Display?

Hosyond 5 Pcs 0.96 Inch OLED I2C IIC Display Module 12864 128x64 Pixel SSD1306 Mini Self-Luminous OLED Screen Board Compatible with Arduino Raspberry Pi (White) https://a.co/d/1j4T2cg

check the Adafruit_SSD1306 library, you'll see examples on how to display something

Thank you very much. I am probably going to go with the 1.3 inch screen instead

  1. Will I be able to display two different images using the same Arduino on two screens?
  2. Will I be able to use the 1.1 volt built-in to use as reference?

Where would I find coding for voltage metering?

If you try to use 2 OLED screen with an arduino Nano, you are likely to run out of memory. OLED displays consume a fair chunk and a nano does not have a lot. I would start with 1 screen.

yes, you need to set two different I2C addresses (assuming there is enough memory)
the 1.1V internal reference is a possibility, ensure you share GND with whatever you are measuring.

Try the Search Forum function available up to the right in this window.
Combining the type of controller and analog measuring will give many hits.

INTERNAL1V1 is a built-in 1.1V reference for Arduino Mega only so you'll have to use INTERNAL

I gave it a try in the simulator

and there is not enough memory

Thank you for doing that. Pretty cool.

  1. Which arduino would handle 2? And
  2. would i be able to display differnt information on both screens with one arduino?

the 128x64 display can probably accommodate 4 tiny lines
do you really need 2 displays ?

I should probably save this code?

Maybe not. I could do one,

with one then it could work

(my code does not set the font etc, so might need more work, I was just testing instantiating 2 screens - but you can look at the code for reading the analog pins)

  float voltage1 = (analogRead(A0) / 1023.0) * 1.1; // Convert to voltage using the 1.1V reference
  float voltage2 = (analogRead(A1) / 1023.0) * 1.1;
  float voltage3 = (analogRead(A2) / 1023.0) * 1.1;
  float voltage4 = (analogRead(A3) / 1023.0) * 1.1;

ideally you would read twice and throw one read away, maybe something like

  float voltage1 = analogRead(A0), (analogRead(A0) / 1023.0) * 1.1; // Convert to voltage using the 1.1V reference
  float voltage2 = analogRead(A1), (analogRead(A1) / 1023.0) * 1.1;
  float voltage3 = analogRead(A2), (analogRead(A2) / 1023.0) * 1.1;
  float voltage4 = analogRead(A3), (analogRead(A3) / 1023.0) * 1.1;

Ok ill focus on one 1.3 inch display then.

So I'd need a mega? Space is a concern. Can it be done w nano?

The constant INTERNAL1V1 is for the Mega only. If you are using a nano, you use the constant INTERNAL