Notifications
Clear all

Nano RP2040 multiple sensor data separation

41 Posts
5 Users
3 Likes
1,694 Views
Ron
 Ron
(@zander)
Illustrious Member
Joined: 3 years ago
Posts: 5567
 

@snb That could be, let me connect my NANO 33 IOT and see what it gives.

Ok, I get 60 and 6A also, on 60 it's a SI1145 and 6A is unknown.

If you had the MUX plugged in to GPIO12 and GPIO13 with G and +5V then igt should repot 70 or 77. Make sure you have the NANO on 3V and the MUX on 5V.

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
Ron
 Ron
(@zander)
Illustrious Member
Joined: 3 years ago
Posts: 5567
 

@snb According to what I see in the pictures, in pic 3 you have the MUX connected to the NANO 3.3V pin, that should be on the 5V pin, about 4 from the other end.

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
 snb
(@snb)
Eminent Member
Joined: 1 year ago
Posts: 18
Topic starter  

@zander I want to work with data using ML and cloud computing. To avoid additional hardware interfaces, I chose this as it gets easy to export data on the cloud. In addition, I get motion sensors inbuilt which will be helpful if I need to extend it for any other bio-signal acquisition. 


   
ReplyQuote
 snb
(@snb)
Eminent Member
Joined: 1 year ago
Posts: 18
Topic starter  

@zander No luck with nano on 3.3V and Mux on 5V. Nano is failing to detect 0x70.

 

I didn't know about nano 33 before I invested in nano rp2040. 


   
ReplyQuote
Ron
 Ron
(@zander)
Illustrious Member
Joined: 3 years ago
Posts: 5567
 

@snb Have you tried just trying to detect one sensor on the NANO?

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
 snb
(@snb)
Eminent Member
Joined: 1 year ago
Posts: 18
Topic starter  

@zander yes. I am able to record data with one sensor.


   
ReplyQuote
Ron
 Ron
(@zander)
Illustrious Member
Joined: 3 years ago
Posts: 5567
 

@snb I am afraid you are in for a lot of disappointment and frustration if you are going to use the cloud. Also, almost impossible to help you. I haven't looked at the cloud in a few months since I gave up on it but I don't remember any support for the motion feature. Can you send me a snapshot or link to the cloud part that supports that?

From your comment it sounds like you expect a person to 'wear' the NANO. So you expect them to be connected to a battery for power, and stay within good WiFi distance. Not impossible, but maybe the cloud doesn't work the way you think.

BTW, the biggest consumer of power on any of these wireless boards is the WiFi especially while trying to reconnect a dropped connection. 

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
Ron
 Ron
(@zander)
Illustrious Member
Joined: 3 years ago
Posts: 5567
 

@snb Then that is both good and bad news. Good in that it proves the NANO is NOT broken. bad in that we have a mystery. I assume if you connect JUST the MUX it is NOT detected on the NANO but is on the UNO?

I did jump the gun on MUX power, it is actually a 1.8V device with two VR's, one for 5V and 1 for 3.3V so either will work, but I would do 2 tests, one with the MUX connected to the NANO 5V pin and one with it connected to the 3.3V pin. Just the MUX, no sensors and triple check the SDA and SCL wiring.

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
 snb
(@snb)
Eminent Member
Joined: 1 year ago
Posts: 18
Topic starter  

@zander Thanks a lot for all the help extended. if not for your quick responses, I would have really given up on this. I still have hope. let me try with other possibilities. I will revert if any significant change. If not I will continue the work with only one sensor. Can't thank you and the forum enough for having shared the burden. 


   
ReplyQuote
Ron
 Ron
(@zander)
Illustrious Member
Joined: 3 years ago
Posts: 5567
 

@snb I will have a MUX here tomorrow and try it with my NANO 33 IOT.

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
MadMisha
(@madmisha)
Reputable Member
Joined: 4 years ago
Posts: 355
 

@snb 

In your pictures, I do not see all of the pull-up resistors on the sensor side for the SDA and SCL, I can only see one for each sensor. Also, what are these resistor values? 10K?

It also appears that your sensors are not in the first 2 connections on the mux. That will be 0 and 1 on the other side since those are the ones you are calling in your setup function.

You could also add a short delay after changing the mux channel before sampling the sensor.

 

Also, your code will be reading the sensors in 16 bit instead of 32 bit. I doubt that will be a problem, but that could explain why it was working on an Uno, assuming it got that far. I would recommend changing this.

 

Libraries do not always work on all boards.

 

Take all of these things with a grain of salt. I am a bit rusty with Arduinos.


   
ReplyQuote
Page 3 / 3