PowerPCB 1.09

Whatever I try, I always get this...

Scanning(Wire)...
Unknown error at address 0x36MCR:1 MSR:2000b01, MIER:0 MDER:0 MCFGR0:0 MDMR:0 MCCR0:1928373b
Unknown error at address 0x37MCR:1 MSR:2000801, MIER:0 MDER:0 MCFGR0:0 MDMR:0 MCCR0:1928373b
Device found at address 0x45 (PCA9685, SHT3X)
Device found at address 0x68 (DS1307,DS3231,MPU6050,MPU9050,MPU9250,ITG3200,ITG3701,LSM9DS0,L3G4200D)
Unknown error at address 0x76MCR:1 MSR:2000b01, MIER:0 MDER:0 MCFGR0:0 MDMR:0 MCCR0:1928373b
Unknown error at address 0x77MCR:1 MSR:2000801, MIER:0 MDER:0 MCFGR0:0 MDMR:0 MCCR0:1928373b
done

Scanning(Wire1)...
Device found at address 0x40 (PCA9685,Si7021)
done

Scanning(Wire2)...
Console result if you remove all the INA226 or IMU on Bus 0 and put them again one by one ?
Can you try to remove all the INA226 on Bus 0 and IMU
Unknow error need to disappear
Then you can try to connect them one by one to see if error is here again
 
Can you try to remove all the INA226 on Bus 0 and IMU
Unknow error need to disappear
Then you can try to connect them one by one to see if error is here again


Now I get a message like this. This is good now?
I replaced one of the INAs with a new one.


I2C Scanner

Scanning(Wire)...
Device found at address 0x40 (PCA9685,Si7021)
Device found at address 0x45 (PCA9685, SHT3X)
Device found at address 0x68 (DS1307,DS3231,MPU6050,MPU9050,MPU9250,ITG3200,ITG3701,LSM9DS0,L3G4200D)
done

Scanning(Wire1)...
Device found at address 0x50 (EEPROM,FRAM)
done

Scanning(Wire2)...
No I2C devices found
 
Now I get a message like this. This is good now?
I replaced one of the INAs with a new one.


I2C Scanner

Scanning(Wire)...
Device found at address 0x40 (PCA9685,Si7021)
Device found at address 0x45 (PCA9685, SHT3X)
Device found at address 0x68 (DS1307,DS3231,MPU6050,MPU9050,MPU9250,ITG3200,ITG3701,LSM9DS0,L3G4200D)
done

Scanning(Wire1)...
Device found at address 0x50 (EEPROM,FRAM)
done

Scanning(Wire2)...
No I2C devices found
No it's not OK.
PowerPCB maybe have a shortcut somewhere :
Remove all INA226 ,disconnect from Main PCB and Check the SDA0,SCL0 and SDA1/SCL1 line continuity with ohmmeter to see a shortcut with GND or 3.3V or cut line.
 
No it's not OK.
PowerPCB maybe have a shortcut somewhere :
Remove all INA226 ,disconnect from Main PCB and Check the SDA0,SCL0 and SDA1/SCL1 line continuity with ohmmeter to see a shortcut with GND or 3.3V or cut line.
I looked at what you said and I don't see anything abnormal.
I look at the forum to see if I can find something that can help, but I'm at a complete loss
 
You can try to connect only one INA 226 on the power PCB at a time on I2C0 line (sda0 scl0 charge battery for example) and check the adress using I2C scanner.
Now connect the same INA226 to I2C1 line (mow motor for example) chaeck again I2C scanner

0x40,0x41,0x44 are the 3 adress possible acoording the shunt between GND A0 or A1 at back of INA226.
It's strange because 0x45 is also possible if you have shunt A0 A1 and GND ??
 
You can try to connect only one INA 226 on the power PCB at a time on I2C0 line (sda0 scl0 charge battery for example) and check the adress using I2C scanner.
Now connect the same INA226 to I2C1 line (mow motor for example) chaeck again I2C scanner

0x40,0x41,0x44 are the 3 adress possible acoording the shunt between GND A0 or A1 at back of INA226.
It's strange because 0x45 is also possible if you have shunt A0 A1 and GND ??

I did what you said and got these results.


unnamed (14).jpg
 
Your INA addresses seem a bit skewed, especially the first and last one, they should both have the same address if nothing is connected.

This are the Adresses that i used on the PowerPCB with one I2C Bus, if i make the comments right in the Code:
Code:
//####### INA ADRESS #########
#define INABATADRESS 0x40     //No soldering
#define INAMOWADRESS 0x45     //A0+A1+VCC
#define INALEFTADRESS 0x44    //VCC+A1
#define INARIGHTADRESS 0x41   //VCC+A0
 
I attached the picture. I think INA might be bad.
I tried all the places and I always got the same values.
Although if you look more closely, you can see the error!
The first INA is the one that I use. the second and third pictures I took from the net

Névtelen.png
 

Attachments

  • unnamed (1).jpg
    unnamed (1).jpg
    865.4 KB · Views: 6
Here the adress according A0 and A1 shunt:
ina226_address_issue.PNG
As you can see adress 0x45 is here when you connect A0 and A1 to VCC.
So the 2 module with 0x45 are not OK or you have a shortcut on the pad of the ina226 ship itself.
Also 0x50 is not possible ???

You can try to cut the trace on the ina226 ship and direct connect them to VCC or GND according the adress you want , but it's so small that no warranty..

here the location of A0 and A1 on the ina226 ship
ina226 datasheet.png

Are you sure about the 3.3V and GND are present on POWER PCB

The 2 resistors that you show are pulldown to GND,
Check if the A0 pad on bad of PCB is connected to A0 of the chip (continuity with ohmeter)
Same for A1, maybe vias are bad.
 
Last edited:
Here the adress according A0 and A1 shunt:
View attachment 1495
As you can see adress 0x45 is here when you connect A0 and A1 to VCC.
So the 2 module with 0x45 are not OK or you have a shortcut on the pad of the ina226 ship itself.
Also 0x50 is not possible ???

You can try to cut the trace on the ina226 ship and direct connect them to VCC or GND according the adress you want , but it's so small that no warranty..

here the location of A0 and A1 on the ina226 ship
View attachment 1496


in the previous post there is a picture of 3 INAs and when I go home I will correct the 103 resistance because it is installed incorrectly at the factory
 
I attached the picture. I think INA might be bad.
I tried all the places and I always got the same values.
Although if you look more closely, you can see the error!
The first INA is the one that I use. the second and third pictures I took from the net

View attachment 1494
I think yours are wrong assembled. Are you able to turn the two resistors? You bought it from Ali?
 
I think yours are wrong assembled. Are you able to turn the two resistors? You bought it from Ali?

Yes, I know it's poorly put together. I noticed it in the morning when I wrote the post. When I'm home, I'll turn it over and write what the situation is.
I hope this error did not destroy INA. Yes, I bought it from Ali...
 
Well, I adjusted the resistances and got these values.

That looks good

View attachment 1504
Thank's China manufacturer. I never think it's possible to do this kind of error.:ROFLMAO::ROFLMAO:
Remember you need R010 resistor on INA226 to measure more than 2A.


If you have not connect the IMU it's OK.
IMU is at 0x68 on I2C0

You can now upload teensy firmware and check the startup process.
 
Am I right that this error message refers to the boundary wire?
INA is now working fine. but two out of six were ruined...

SETUP
++++++++++++++ Start Robot Setup at 433.00 ++++++++++++
Initialise date time library
RTC has set the system time
------------------- Initializing SD card... ---------------------
SD Card failed, or not present
Version : 1.492-Teensyber
Pfod connection initialisation at : 19200
Load ErrorData Address Start= 500.00 Stop= 522.00
************************************
NO EEPROM USER DATA
PLEASE CHECK AND SAVE YOUR SETTINGS
FACTORY SETTING ARE USED INSTEAD
************************************
Save Stats Adress Start = 800.00 Stop = 826.00
ERROR / ERR
Load Stats Adress Start = 800.00 Stop = 826.00
IMU: found calib data
Load Calibration
Calibration address Start = 600
Calibration address Stop = 650
-------- IMU CALIBRATION --------
ACCEL GYRO MPU6050 OFFSET ax: -1790 ay: -930 az: 1750 gx: -236 gy: -10 gz: 8
COMPASS OFFSET X.Y.Z AND SCALE X.Y.Z
comOfs=0.00,0.00,0.00
comScale=2.00,2.00,2.00
.
--------------------------------- GYRO ACCEL INITIALISATION ---------------
MPU6050 connection successful
52
Initializing DMP...
Enabling DMP... Packet size 28
Wait 3 secondes to stabilize the Drift
AccelGyro Yaw: -0.00--------------------------------- IMU READY ------------------------------
------- Initialize Perimeter Setting -------
Begin setup adc0 on pin:23
End setup adc0
Try to Start adc0 Timer Interrupt
adc0 Timer Interrupt Started
START
Mower 1.492-Teensyber
Config: MI632
press...
d for menu
v to change console output (sensor counters, values, perimeter etc.)
off
Starting Ina226 current sensor
Checking ina226 current sensor connection
Ina226 Begin OK
Ina226 Configure OK
Ina226 Calibration OK
Watchdog configuration start
Watchdog configuration Finish
Setup finish
resetErrorCounters
Save ErrorData Address Start= 500.00 Stop= 522.00
Save Stats Adress Start = 800.00 Stop = 826.00
WAIT / OFF
resetErrorCounters
Save ErrorData Address Start= 500.00 Stop= 522.00
Warning Serial read duration > 200 ms : 203.00
Warning Serial read duration > 200 ms : 204.00
Warning Serial read duration > 200 ms : 204.00
 
Ok so the warning message is normal.
WIFI is always slower than BT and i have setup the firmware using BT.
So 2 possible solution:
1----
change the robot.cpp part line 6310
replace
if ( ReadDuration > 200) {
by
if ( ReadDuration > 500) {


2---
try to increase serial speed to 115200 bps
It's into mower.h
replace
#define BLUETOOTH_BAUDRATE 19200 // baudrate used for communication with Bluetooth module
by
#define BLUETOOTH_BAUDRATE 115200 // baudrate used for communication with Bluetooth module

And adjust the ESP32 WIFI firmware according this new speed.

I also see that you have not set a platform into mower.h ,so the firmware you upload is for Viking MI632 platform.
 
Just for testing, I quickly uploaded a FW to see what I get for testing. Now that I've set up a little what I need, I get a lot of errors. Anyway, I am going to rebuild a Bosch Indego 800 machine. What is important is that there will be 2 perimeters and all engines will be driven by the BTS7960 Driver. It will also include 3 ultrasound sensors.
is it feasible to have a 240x320 SPI display on the teensy?


C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\INA226.cpp:383:11: warning: extra tokens at end of #endif directive [-Wendif-labels]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\INA226.cpp:413:11: warning: extra tokens at end of #endif directive [-Wendif-labels]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\INA226.cpp: In member function 'bool INA226::calibrate(float, float)':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\INA226.cpp: In member function 'bool INA226::calibrate_I2C1(float, float)':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp: In member function 'void RpiRemote::receive_request()':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1011:7: warning: variable 'message_trigger' set but not used [-Wunused-but-set-variable]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp: In member function 'void RpiRemote::readWrite_setting()':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1289:14: warning: array subscript 9 is above array bounds of 'float [9]' [-Warray-bounds]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1243:9: note: while referencing 'val'
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1312:52: warning: array subscript 9 is above array bounds of 'float [9]' [-Warray-bounds]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1243:9: note: while referencing 'val'
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1370:38: warning: array subscript 9 is above array bounds of 'float [9]' [-Warray-bounds]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1243:9: note: while referencing 'val'
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1442:39: warning: array subscript 9 is above array bounds of 'float [9]' [-Warray-bounds]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1243:9: note: while referencing 'val'
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1454:35: warning: array subscript 9 is above array bounds of 'float [9]' [-Warray-bounds]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1243:9: note: while referencing 'val'
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1466:35: warning: array subscript 9 is above array bounds of 'float [9]' [-Warray-bounds]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1243:9: note: while referencing 'val'
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1478:38: warning: array subscript 9 is above array bounds of 'float [9]' [-Warray-bounds]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1243:9: note: while referencing 'val'
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1516:3: warning: 'readOrWrite' may be used uninitialized in this function [-Wmaybe-uninitialized]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp: In member function 'void RpiRemote::read_pfo()':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1548:14: warning: array subscript 2 is above array bounds of 'float [2]' [-Warray-bounds]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1527:9: note: while referencing 'val'
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1564:31: warning: array subscript 2 is above array bounds of 'float [2]' [-Warray-bounds]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\RpiRemote.cpp:1527:9: note: while referencing 'val'
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\Screen.cpp: In member function 'void Screen::refreshStationScreen()':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\Screen.cpp:92:25: warning: comparison with string literal results in unspecified behavior [-Waddress]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\flashmem.cpp: In function 'int eereadwriteString(boolean, int&, String&)':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\flashmem.cpp:26:1: warning: no return statement in function returning non-void [-Wreturn-type]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\flashmem.cpp: In member function 'byte* FlashClass::readAddress(uint32_t)':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\flashmem.cpp: In member function 'boolean FlashClass::write(uint32_t, byte*, uint32_t)':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\flashmem.cpp:97:19: warning: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'long unsigned int'} [-Wsign-compare]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\imu.cpp: In member function 'void IMUClass::deleteCompassCalib()':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\imu.cpp:569:7: warning: unused variable 'addr' [-Wunused-variable]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\imu.cpp: In member function 'void IMUClass::deleteAccelGyroCalib()':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\imu.cpp:576:7: warning: unused variable 'addr' [-Wunused-variable]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\imu.cpp: In function 'float Complementary2(float, float, int, float)':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\imu.cpp:194:9: warning: 'y1' is used uninitialized [-Wuninitialized]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\perimeter.cpp:59:38: warning: cannot declare member function 'static void PerimeterClass::adc1_isr()' to have static linkage [-fpermissive]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\perimeter.cpp:77:38: warning: cannot declare member function 'static void PerimeterClass::adc0_isr()' to have static linkage [-fpermissive]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\pfod.cpp: In member function 'void RemoteControl::processCommandMenu(String)':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\pfod.cpp:1721:35: warning: comparison with string literal results in unspecified behavior [-Waddress]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp:77:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp:77:37: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp:77:44: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp:77:88: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp:77:97: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp: In member function 'char* Robot::statusNameList(byte)':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp: In member function 'virtual void Robot::loadSaveRobotStats(boolean)':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp:397:32: warning: '%02d' directive writing between 2 and 3 bytes into a region of size between 0 and 7 [-Wformat-overflow=]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp:397:32: note: directive argument in the range [0, 255]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp:397:10: note: 'sprintf' output between 15 and 23 bytes into a destination of size 15
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp: In member function 'virtual void Robot::setup()':
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp:3029:34: warning: '%02d' directive writing between 2 and 3 bytes into a region of size between 0 and 7 [-Wformat-overflow=]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp:3029:34: note: directive argument in the range [0, 255]
C:\Users\Bartha Dániel\Desktop\Teensy-main\Teensy-main\teensymower\robot.cpp:3029:12: note: 'sprintf' output between 15 and 23 bytes into a destination of size 15
Memory Usage on Teensy 4.1:
FLASH: code:277124, data:50732, headers:9036 free for files:7789572
RAM1: variables:57024, code:273992, padding:20920 free for local variables:172352
RAM2: variables:12416 free for malloc/new:511872
 
Back
Top