element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum VL53L5CX-SATEL with Raspberry Pi Pico interface wiring --
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 6 replies
  • Answers 1 answer
  • Subscribers 662 subscribers
  • Views 3629 views
  • Users 0 members are here
  • sensors
  • raspberry pi pico
  • tof
Related

VL53L5CX-SATEL with Raspberry Pi Pico interface wiring --

robogary
robogary over 2 years ago

I'm following instructions on:
www.digikey.com/en/maker/projects/vl53l5cx-time-of-flight-tof-breakout-and-micropython/d2627a91c5d54dd49af0001b1d220d1c

Got updated uf2 release from the pimoroni GitHub repository, V1.19.6 installed on Pico from a Windows10 laptop.
Followed instructions to load VL53L5CX_firmware.bin file onto the Pico root using Thonny instructions (using a Raspberry Pi), that worked OK.

When sample code is run, the Thonny shell is blank, never makes it to any print statement. Running an i2c-scan program, the VL53 starts replying to address 0x8, and keeps responding to each i2c addresses 0x9-0x42 , where I finally stop the i2c detect program. That program does correctly detect a SSD1306 and an MPU 6050 when they are connected o that i2c bus.

I wired SCL , SDA, GND, +3V to the VL53L5CX. Are there connections missing ? The article doesnt show needed sensor wiring for these examples.

Thank you to Digikey Tech Forum whom disallows me to post questions to the forum "You are not permitted to view the requested resource."

I'm struggling to find workable libraries, install packages, and example code for the ToF sensor VL53L5CX. 

Any suggestions ? 

  • Sign in to reply
  • Cancel
  • Gough Lui
    0 Gough Lui over 2 years ago

    Is it one of these boards?

    /members-area/personalblogs/b/gough-lui-s-blog/posts/the-secret-santa-makes-a-delivery

    I have never tried it on a Pico, but perhaps you need to check the other pins (PWREN, I2CRST LPn) are tied to an appropriate logic level (high, I think) otherwise it may not be operating correctly.

    EDIT: Also check your AVDD and IOVDD are connected together, likely to 3V3, otherwise the communications may be unstable.

    - Gough

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robogary
    0 robogary over 2 years ago in reply to Gough Lui

    Thank you Gough Lui , that is the board as seen in your blog , and thank you for the sound advice ! . After your feedback, I studied the datasheet again (and again and again)   https://www.st.com/resource/en/datasheet/vl53l5cx.pdf   and corrected the circuit with i2c_rst pulled to ground, Lpn pulled up, INT pulled up.

    Now the demo program errors with a Thonny back end problem, complaining about python3 thonny plugin bare metal backend, some package updating seems to be the next step.  

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robogary
    0 robogary over 2 years ago in reply to robogary

    Just as another datapoint, after adding pull up and pull downs, ran the i2c-scanner program in the pico. Still  the VL53 starts replying to address 0x8, and keeps responding to each i2c addresses 0x9-0x42 , where I finally stop the i2c detect program. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Gough Lui
    0 Gough Lui over 2 years ago in reply to robogary

    Unfortunately, I'm away from my board at this time (at work), otherwise I would give it a try of my own ... but that somehow doesn't sound right to me. Usually it will reply only to one address.

    I wonder if you have an I2C pull-up issue (try running a known working sensor in parallel - it might  provide the pull-up), or whether that is just the behaviour of the chip and I don't know it ... I toggled the I2C_RST line before starting my sketch as I found sometimes it might not start up nicely ... perhaps that might help?

    Will let you know if I discover something though ...

    - Gough

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robogary
    0 robogary over 2 years ago in reply to Gough Lui

    Thank you - sorry you are at work a half day ahead of me, I'will go to bed for the night soon  :-)   actually a MPU6050 & SSD1306 are wired on the i2c bus with the VL54L5CX. 

     I also referenced this advice, which confused me.  The "unit" diagram shows AVDD connected to 5V and PWREN connected to an AO with no description , no i2c pullups mentioned, The "breakaway: wiring uses only 3.3V and i2C pullups, no PWR EN. I did first wire AVDD with 5V, and maybe even swapped it with IOVDD, but no harm seems done. 

    //www.st.com/resource/en/application_note/an5717-how-to-setup-and-run-the-vl53l5cxsatelusing-an-stm32-nucleo64-board-stmicroelectronics.pdf

    In trying again,  this time adding a 22k pull up on PWR-EN, the VL53L5CX demo program actually started to output distance values. Sometimes the values seem correct, other times not, but this needs further investigation.

    There are some gotchas to share in case anyone reads this question later for reference:

    1) Each time the VL53L5CX demo program is run, it gets a micropython Thonny back end error. After 3 seconds the error clears. then 9 seconds later the python i2c setup command executes OK. Im not sure what causes this big delay, if fetching the other python file loaded, or whatever. The demo program will not restart if stopped, a power off reboot of Pico is required.

    2)   If another program is needed to run with the Pico, it needs to be stopped, then power off rebooted to load a different program and execute it.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Gough Lui
    0 Gough Lui over 2 years ago in reply to robogary

    If you're getting replies on several addresses ... well, it sounds like the SDA is being held low by the board. That's not a good thing, it's likely because it;s not getting power.

    The simplest connection I managed that seems to work with the Pico is IOVDD=AVDD=PWREN @ 3V3, GND, SDA and SCL.

    With that, my i2scan is showing

    22:52:06.452 -> Scanning...
    22:52:06.452 -> I2C device found at address 0x29  !
    22:52:06.486 -> done

    Unfortunately, I couldn't seem to get this working reliably on I2C0 controller, only I2C1 controller with Wire1 (I wonder if it's just my Pico board), allocating SDA to 26 and SCL to 27.

    The breakaway has no PWREN as it has no LDO - that is on the header-pin section. Not that you'd really need the LDO as you'd be using 3V3 anyway.

    In Arduino, I am using the Sparkfun library and example, changing the myImager.begin() function to match - i.e. myImager.begin(0x29,Wire1)

    image

    I can definitely see it working in Arduino with the Pico - but I don't use the Python, so can't really help you there ...

    - Gough

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube