Feather M0 Express Master Sword I2C issue

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Mhand82
 
Posts: 7
Joined: Tue Jan 24, 2023 4:57 pm

Feather M0 Express Master Sword I2C issue

Post by Mhand82 »

Zelda master sword code.py on the feather M0 express and Prop-Maker feather wing error

code.py output:
Traceback (most recent call last):
File "code.py", line 61, in <module>
RuntimeError: No pull up found on SDA or SCL; check your wiring

I’ve been working on this for a few days. I had a M0 express and this working (till I had to mess it up due to the battery relocation soldering and had to replace the board. The Prop maker worked fine on my dark saber build.

On the replacement M0 Express, I keep getting the same error because of the I2C. I’ve search the forums, put it in Arduino IDE, redid the bootloader 12 times, looked at https://learn.adafruit.com/scanning-i2c ... cl-3102834 (Scan did not show them either). A blinking red light and "RuntimeError: No pull up found on SDA or SCL; check your wiring" Haunt my dreams.
Trying to say I’ve done all the things I know to do or read to do.

Soldering is fine on the Propmaker (images attached), avoiding soldering the M0 express because that’s how the last one got messed up.

Am I completely missing something or do I have a bad board?
IMG_1481 Large.jpeg
IMG_1481 Large.jpeg (293.34 KiB) Viewed 128 times
IMG_1480 Large.jpeg
IMG_1480 Large.jpeg (280.69 KiB) Viewed 128 times
IMG_1479 Large.jpeg
IMG_1479 Large.jpeg (297.48 KiB) Viewed 128 times

User avatar
danhalbert
 
Posts: 4654
Joined: Tue Aug 08, 2017 12:37 pm

Re: Feather M0 Express Master Sword I2C issue

Post by danhalbert »

If you don't solder, or use headers and pins to make it pluggable, you are not going to get reliable connections.

User avatar
Mhand82
 
Posts: 7
Joined: Tue Jan 24, 2023 4:57 pm

Re: Feather M0 Express Master Sword I2C issue

Post by Mhand82 »

headers and pins are soldered on the prop maker and nRF52840 works fine with it. But you’re right I’ll have to try soldering SDA and SCL pins tonight

User avatar
danhalbert
 
Posts: 4654
Joined: Tue Aug 08, 2017 12:37 pm

Re: Feather M0 Express Master Sword I2C issue

Post by danhalbert »

You'd also want to solder power and ground, and any other pins that the Feather uses to talk to the PropMaker.

if you don't solder, it can sort of work, but it will be unreliable. The "need pullups" message is either because the SCL and/or SDA pins are not touching, or the power pins aren't touching.

User avatar
Mhand82
 
Posts: 7
Joined: Tue Jan 24, 2023 4:57 pm

Re: Feather M0 Express Master Sword I2C issue

Post by Mhand82 »

@danhalbert you were right. Once I soldered it down no I2C issues.

Except now I have a power issue. The entire board is soldered in but it keeps reporting a power dip. I have to have that battery and usb plugged it to boot it. I can then disconnect one of the sources and it will work fine. Till I turn it off and back on again. I am using a 18650 3.7V 2800mah battery fully charged.

ALSO for anyone that is thinking of using the Feather M0 Express instead M4 Express due to supply issues. It will work, but I found that the sound files are a bit too much for the M0 Express to handle. So if you don't care about sound effects you should be fine.

User avatar
danhalbert
 
Posts: 4654
Joined: Tue Aug 08, 2017 12:37 pm

Re: Feather M0 Express Master Sword I2C issue

Post by danhalbert »

Does it run with just the battery? Do you have a multimeter so you can check voltages?

Voltage dip could be due to inadequate power from the USB port, the battery, or wiring.

The sword uses 83 NeoPixels, which is a lot. Did you adjust any of the BRIGHTNESS values in the program? Try reducing the MAX brightness to something less than 1.0, like 0.5 or 0.3 for now.

Also try reducing NUM_PIXELS = 83 to a lower number temporarily, to see if it still fails. That will also reduce the power draw.

Are you using one of our batteries or some third-party one?

Try also adding a `time.sleep(1)` at the top of the program to make sure the voltage is stabilized.

User avatar
Mhand82
 
Posts: 7
Joined: Tue Jan 24, 2023 4:57 pm

Re: Feather M0 Express Master Sword I2C issue

Post by Mhand82 »

NO It will not run with just the battery. Yes, 3.7.
It reports Power dipped with the usb plugged in on MU on a 2022 Mac Mini usb 3.
It reports with or without the addressable leds plugged in. no change to the code.py.
The Battery is 3rd party
I'll give that a shot in the next few days. Still new to Python.
Side Note:
is there any way to get the dark saber to boot faster? Again new to all this.

# SPDX-FileCopyrightText: 2021 Liz Clark for Adafruit Industries
#
# SPDX-License-Identifier: MIT

"""
Prop-Maker based Darksaber
Adapted from the Prop-Maker based Master Sword code
by Kattni Rembor & Limor Fried
Adafruit invests time and resources providing this open source code.
Please support Adafruit and open source hardware by purchasing
products from Adafruit!
Written by Liz Clark for Adafruit Industries
Copyright (c) 2021 Adafruit Industries
Licensed under the MIT license.
All text above must be included in any redistribution.
"""

import time
import random
import board
from digitalio import DigitalInOut, Direction
import neopixel
import adafruit_lis3dh
from adafruit_led_animation.animation.solid import Solid
from adafruit_led_animation.animation.pulse import Pulse
from adafruit_led_animation.animation.comet import Comet

from adafruit_bluefruit_connect.packet import Packet
from adafruit_bluefruit_connect.color_packet import ColorPacket

from adafruit_ble import BLERadio
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.nordic import UARTService

# BLE setup
ble = BLERadio()
uart_service = UARTService()
advertisement = ProvideServicesAdvertisement(uart_service)

# CUSTOMISE SENSITIVITY HERE: smaller numbers = more sensitive to motion
HIT_THRESHOLD = 250
SWING_THRESHOLD = 150

User avatar
danhalbert
 
Posts: 4654
Joined: Tue Aug 08, 2017 12:37 pm

Re: Feather M0 Express Master Sword I2C issue

Post by danhalbert »

That battery does not seem to have the right connectors, and may be the wrong polarity. Check the pictures of our batteries plugged into a Feather, e.g. https://cdn-learn.adafruit.com/assets/a ... 1658865959

There is no standard for the plug or the polarity of the leads for these kinds of batteries, so it's easy to buy something that might be wrong or even damage what it's plugged into.

Try to get it working with just USB, no battery connected. A regular USB jack will not supply enough power. Try a USB 5V supply (not a big Apple laptop charger) by itself.

I am surprised it says power dip with the NeoPixels not connected. That may indicate some damage, or perhaps some bad connections. Is anything on the PropMaker board getting hot?

User avatar
Mhand82
 
Posts: 7
Joined: Tue Jan 24, 2023 4:57 pm

Re: Feather M0 Express Master Sword I2C issue

Post by Mhand82 »

Checked the polarity: all good there.
Per your suggestion I tried my 5v battery pack, worked perfect.
Bought another 3.7 18650 22500 mah battery and hooked it up. Same thing still getting the voltage dip error, because I had to plug it into the computer to get it to boot, even WITHOUT WS2812B lights hooked up.
As far as files etc go I erased all the sound files and lights and code work fine if on the 5v battery pack or usb port/18650 battery combo and removing one of them doesn’t effect it until I reboot it. Then it’s 3 yellow light city till I give it some more juice and reboot.
I know I am building this with a Feather M0 Express board but would the voltage even without leds affect the code without the M4 express. Which I can’t find and suck at desoldering anyway😅. It makes sense the sound files (that are now erased on the M0) would be to heave for it but the Voltage requirement should be equivalent to the M4.
I’m about ready to say skip all this and going nRF52832/prop marker. BUT I had this combo working till I had to unsolder the first set of boards because bad solder on the battery reroute needed to make it all fit. And it could me a bad board but then I’d have to get another prop maker and this I’d getting expensive 😂.

User avatar
danhalbert
 
Posts: 4654
Joined: Tue Aug 08, 2017 12:37 pm

Re: Feather M0 Express Master Sword I2C issue

Post by danhalbert »

How are you charging that big battery? It's going to take a very long time to charge plugged into the Feather, because of its high capacity. The Feather battery charger supplies 100mA, and this is 22500 mAh battery, so to fully charge, it will need to be plugged into the Feather, and the Feather plugged into powered USB, for 2800/100, or 28 hours (!) hours to fully charge.

(You said 22500 mAh for the second battery, but I think that's a typo.)

So I think your battery voltage may just be low, because the battery is not very charged. Leave it connected to powered USB for a full day, and see how it works.

User avatar
Mhand82
 
Posts: 7
Joined: Tue Jan 24, 2023 4:57 pm

Re: Feather M0 Express Master Sword I2C issue

Post by Mhand82 »

Lol yeah typo “2600” I let the frost battery charge for 24 hours on the board. The new battery I put in the 18650 charger I use for my video gimbal and I checked with a multimeter.
Again I think it’s that I’m using a M0 not M4 but when it comes to power consumption that shouldn’t matter right?

User avatar
danhalbert
 
Posts: 4654
Joined: Tue Aug 08, 2017 12:37 pm

Re: Feather M0 Express Master Sword I2C issue

Post by danhalbert »

M0 vs M4 should not matter.

Could you take a clear picture of the battery and its connection to the Feather? I want to see the whole battery and its wires, the orientation of the plug, and the color of the wires. Also could you take a picture of your soldering (both sides)?

User avatar
Mhand82
 
Posts: 7
Joined: Tue Jan 24, 2023 4:57 pm

Re: Feather M0 Express Master Sword I2C issue

Post by Mhand82 »

The connector is a "2 Pin JST Connector LED Power Male to Female Connector SM Wire Cable" I had laying around from my led car install.
Another issue has been popped up, but I think I know what is happening just need some confirmation. I built the Master Sword (I ordered a Adafruit Feather nRF52840 Express for the master sword because I find M0 can't handle the sounds) and the Dark Saber both Ruiz Brothers projects. I ordered most the parts except the 18650 battery and Skinny Neopixels from Adafruit. Links to alternative Led strips hyperlinked below.
Batteries are 3.7v 18650 2600mah batteries with a full charge, but they don't seem to have enough power to push everything. Using just the 18650 batteries the sound is like a dial up hand shake circa 1998 and no LED's will light, if I remove the speaker the leds will come on except blue (it uses the most power, I know). If I plug in a 5v power bank it all works great. Same thing with the Master sword.
Both projects are using WS2812b Addressable LEDs from Alitove Skinny 5mm and WS2812 60 per meter. My guess that the Built-in WS2811 IC on the Alitove is the difference from Adafruit Neopixels. The Alitove wanting to draw more power then the 3.7v 18650. Yet I have seen projects using them and it worked.

User avatar
danhalbert
 
Posts: 4654
Joined: Tue Aug 08, 2017 12:37 pm

Re: Feather M0 Express Master Sword I2C issue

Post by danhalbert »

I am still interested in seeing photos, as mentioned.

It does sound as if the voltage might be sagging. If you disconnect one strip or the other, does it work?

Do you have a multimeter? Can you measure the voltage at each strip when it attempts to starting lighting the LED's? Also measure the voltage at the battery when that happens.

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

Return to “Adafruit CircuitPython”