Adafruit QT Py ESP32-S2 and MCP4725

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
CodeHax23
 
Posts: 5
Joined: Wed Jun 07, 2023 1:02 pm

Adafruit QT Py ESP32-S2 and MCP4725

Post by CodeHax23 »

Hey, Im using the Adafruit QT Py ESP32-S2 and MCP4725 but Im having problems getting the output voltage to change, Im using the default triangle wave sketch but i keep getting a constant 1.6V output. I have the two modules attached using the STEMMA QT connectors. I have attached a picture of the code and wire setup.
Note: I added the VL53L4CX cause i want to take the value from the VL53L4CX and output a voltage using theMCP4725.

Thank you for your help.
Attachments
Circuit Image
Circuit Image
Screenshot 2023-06-07 122236.png (666.37 KiB) Viewed 187 times
Triangle default Code
Triangle default Code
Screenshot 2023-06-07 120530.png (82.54 KiB) Viewed 187 times

User avatar
dastels
 
Posts: 15829
Joined: Tue Oct 20, 2015 3:22 pm

Re: Adafruit QT Py ESP32-S2 and MCP4725

Post by dastels »

How are you measuring the output voltage?

Dave

User avatar
CodeHax23
 
Posts: 5
Joined: Wed Jun 07, 2023 1:02 pm

Re: Adafruit QT Py ESP32-S2 and MCP4725

Post by CodeHax23 »

Im using a multimeter and a oscilloscope.

User avatar
dastels
 
Posts: 15829
Joined: Tue Oct 20, 2015 3:22 pm

Re: Adafruit QT Py ESP32-S2 and MCP4725

Post by dastels »

The multimeter isn't of much use here IMO, it'll average the signal. What do you see on the 'scope? A flat lime?

Dave

User avatar
CodeHax23
 
Posts: 5
Joined: Wed Jun 07, 2023 1:02 pm

Re: Adafruit QT Py ESP32-S2 and MCP4725

Post by CodeHax23 »

Yeah, I see a flat line of ~1.6V. Ive tried changing the values a bit where instead of 0-5V its 0-3V but i still get the same result.
I used an I2C checker program and i can see that I have two modules 0x62 (DAC) and 0x29 (TOF).

User avatar
dastels
 
Posts: 15829
Joined: Tue Oct 20, 2015 3:22 pm

Re: Adafruit QT Py ESP32-S2 and MCP4725

Post by dastels »

Any different if you add a delay in your loops to lower the frequency of the waveform?

Dave

User avatar
CodeHax23
 
Posts: 5
Joined: Wed Jun 07, 2023 1:02 pm

Re: Adafruit QT Py ESP32-S2 and MCP4725

Post by CodeHax23 »

It still does the same thing where it stays around ~1.6V straight line even with the delays.

User avatar
dastels
 
Posts: 15829
Joined: Tue Oct 20, 2015 3:22 pm

Re: Adafruit QT Py ESP32-S2 and MCP4725

Post by dastels »

You're using the STEMMA-QT connector? Try using Wire1 instead of the default Wire since it's the secondary I2C bus. See https://learn.adafruit.com/adafruit-qt- ... or-3107922.

Dave

User avatar
CodeHax23
 
Posts: 5
Joined: Wed Jun 07, 2023 1:02 pm

Re: Adafruit QT Py ESP32-S2 and MCP4725

Post by CodeHax23 »

Yes im using the STEMMA-QT connecton. after looking into the code for the triangle there was no reference of the wire command. so I looked into the Adafruit_MCP4725.h file and changed the &wire to &wire1 (see picure)
Attachments
Screenshot 2023-06-08 152055.png
Screenshot 2023-06-08 152055.png (63.6 KiB) Viewed 51 times

User avatar
dastels
 
Posts: 15829
Joined: Tue Oct 20, 2015 3:22 pm

Re: Adafruit QT Py ESP32-S2 and MCP4725

Post by dastels »

You're better off passing it as the second argument to the begin method, rather than changing the library. If you update, your change will be lost.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”