Author Topic: ESP32 SPI Clock  (Read 1431 times)

0 Members and 1 Guest are viewing this topic.

Offline twincommanderTopic starter

  • Newbie
  • Posts: 3
  • Country: us
ESP32 SPI Clock
« on: December 01, 2023, 05:21:14 am »
Hello, I'm trying to get 2x ESP32's to communicate over SPI Master Slave..  I wanted to verify the master is sending out data and I was surprised to see the clock and data at such low voltage levels.  I only see ~336mV.  I can only assume this is normal?  Looking for confirmation?   
1941561-0

Also if anyone has experience with siglent decode... I tried to get SPI decode to work but I'm not having any success.   Siglent support was suggesting I was having trigger issues but it's very stable.  BTW: Support is very slow and sometimes non-responsive.
1941549-1
I set the bit (8 bits), protocol, signal MOSI etc...   no joy.

Thank you
« Last Edit: December 01, 2023, 05:24:24 am by twincommander »
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 744
  • Country: us
Re: ESP32 SPI Clock
« Reply #1 on: December 01, 2023, 06:14:53 am »
Got to see your schematic.  That ringing means you have a problem somewhere.
 

Offline eleguy

  • Regular Contributor
  • *
  • Posts: 55
  • Country: fi
Re: ESP32 SPI Clock
« Reply #2 on: December 01, 2023, 06:39:48 am »
I only see ~336mV.  I can only assume this is normal? 

Nope. Normal it is not. How could the system determine if the state is 0 or 1 at this low levels? I would maybe start from the basics and first check if the probe attenuation (1x/10x) is correct.
 

Offline Chalcogenide

  • Regular Contributor
  • *
  • Posts: 156
  • Country: it
Re: ESP32 SPI Clock
« Reply #3 on: December 01, 2023, 07:08:48 am »
First things first: are you sure you are not using a 10x probe? The screenshots indicate that the scope is setup for a 1x probe.
 

Offline twincommanderTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: ESP32 SPI Clock
« Reply #4 on: December 01, 2023, 06:28:05 pm »
So awesome to have access to this forum..  Thank you! eleguy and Chalcogenide for spotting the voltage problem right away..  That was a newbie mistake! probe on 10x and set to scope 1x
1942071-0

JustMeHere, still have that ringing/bounce on the clock and data.   Not sure if that is typical for ESP32..  super simple circuit
1942059-1

1942065-2
« Last Edit: December 01, 2023, 06:30:46 pm by twincommander »
 

Offline eleguy

  • Regular Contributor
  • *
  • Posts: 55
  • Country: fi
Re: ESP32 SPI Clock
« Reply #5 on: December 01, 2023, 07:24:33 pm »
JustMeHere, still have that ringing/bounce on the clock and data.   Not sure if that is typical for ESP32..  super simple circuit

We could start a long jargon in a signal and power integrity. From the picture one can easily spot that your breadboard setup together with long "air connection wires" is not "optimum". Ringing (wave reflects back and forth) happens due the rapid impedance mismatches. Anyhow, again in short... Good luck is that the ESP cannot create super fast rise time pulses so you could now first just try to shorten those cables as short you can which makes transmission line shorter. At the same time add as short GND - GND cable between boards as possible. This way we get way shorter path for so far "unplanned" return currents. In addition you can add some series resistance (signal lines only) in order to have slightly better matching that will result dampened ringing. This all might sound complicated but don't worry we all have been there.
« Last Edit: December 01, 2023, 07:50:11 pm by eleguy »
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1109
  • Country: lt
Re: ESP32 SPI Clock
« Reply #6 on: December 01, 2023, 09:13:52 pm »
still have that ringing/bounce on the clock and data.   Not sure if that is typical for ESP32..  super simple circuit

As far as I can see, you haven't connected grounds of your two ESP. Your attached image of virtual breadboard also does not show GND connection. Whoever made that image probably assumed that both ESP will be powered from breadboard power rail and GND will join that way, which is still not optimal, but fair enough. In your setup grounds probably join only through the shared point of whatever is on the other end of your USB cables. So the ground path is extremely long, that's why it's ringing like hell.

Short answer: join GND and GND of both modules with a short wire.
 
The following users thanked this post: tooki

Offline twincommanderTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: ESP32 SPI Clock
« Reply #7 on: December 02, 2023, 02:15:32 am »
Thanks eleguy and Manul, I will work on grounding the @#$%@#$ out of the circuit and try shorter leads.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 11546
  • Country: ch
Re: ESP32 SPI Clock
« Reply #8 on: December 03, 2023, 04:50:23 pm »
Thanks eleguy and Manul, I will work on grounding the @#$%@#$ out of the circuit and try shorter leads.
You don’t need to go overboard, just add a ground wire from the first ESP32 to the second one, of the same length or shorter than your data lines. That alone should get you a huge improvement.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf