Notifications
Clear all

connecting power for Xiao and Raspberry PI 4 in same circuit

3 Posts
2 Users
0 Likes
644 Views
(@jfabernathy)
Member
Joined: 3 years ago
Posts: 141
Topic starter  

So I haven't blown anything up yet, but see a potential for it. I was following the Video example on connecting an Arduino MCU to a Raspberry PI via I2C. I could not get it working with the IDE connected to the Xiao.  The IDE could program the Xiao with the RPI off and then I disconnected the USB from the PC. So I used the RPI's breakout board 3.3V to power the Xiao and everything worked and I could use the Python program on the RPI to tell the Xiao to turn on the LED or turn it off.

It got me thinking. How should I connect power when using the USB port on the Xiao to connect to the USB on the PC so the IDE can run and no mess up the RPI power?

If your code won't compile, have another glass of bourbon. Eventual the problem will be solved.


   
Quote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1085
 

One possible issue at work here is that the 3.3-volt pin on the XIAO is both an input and an output:

  • When the XIAO is powered by either the USB-C port or an external 5-volt supply the 3.3-volt pin is an output.
  • You can also power the XIAO using the 3.3-volt pin, as long as the 5-volts or USB-C is not connected. In that case, the pin is an input.

 

So with the I2C connection, you would only want to connect SDA, SCL, and Ground while you worked with the USC-C connector, to avoid tying the two 3.3-volt power supplies together.  At least that's how I see it!

BTW, it really sounds like you're getting quite immersed with the XIAO, that's wonderful!  I'm thinking that perhaps you should be filming a video of your own pretty soon!

😎

Bill

 

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote
(@jfabernathy)
Member
Joined: 3 years ago
Posts: 141
Topic starter  

Thanks for the advice.

My current time waster, learning project is to have the Xiao turn the LED on or off like in your example in the video and have the raspberry pi tell the Xaio over I2C which, but instead of console input I have the RPI4 host a webpage that lets the user of the web page click LED on or off.

I'm using the web page part from this blog https://www.e-tinkers.com/2018/04/how-to-control-raspberry-pi-gpio-via-http-web-server/

And of course your code from the RPI talking to the Arduino.

Thanks again 

 

If your code won't compile, have another glass of bourbon. Eventual the problem will be solved.


   
ReplyQuote