Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Interfacing ZMOD4410 with Arduino UNO

Status
Not open for further replies.

msalmankhan334

New Member
Hello Everyone I am working on a project in which I am interfacing ZMOD4410 with Arduino UNO. The Issue I am facing is that I am unable to read data from the sensor. To debug issue I used logic analyzer to see what kind of data is writing on the i2c bus, Here I found some strange result which I will show you in picture below, I just want to know what could be the possible reason for this behavior?
Thanks
logic_data.png


WhatsApp Image 2022-04-25 at 2.16.36 PM.jpeg


WhatsApp Image 2022-04-25 at 2.16.36 PM (1).jpeg

WhatsApp Image 2022-04-25 at 2.16.35 PM.jpeg
 
I found a datasheet for that module but couldn't find a memory map. Do you have a memory map (or link to) and what is at location 0x97? Assuming that's what you're reading.

Mike.
 
I found a datasheet for that module but couldn't find a memory map. Do you have a memory map (or link to) and what is at location 0x97? Assuming that's what you're reading.

Mike.
No I don't have the memory map of the sensor , Its may be on the Renesas website I searched for the datasheet which contain the memory map but no luck.
As per the demo program I am running on the MCU, I think like state of the sensor , initialization of the sensor get validated but the data contain in the sensor register always empty, as you can see from the Logic analyzer waveform.
when the MCU wants to read data from the sensor , the registers are empty.
 
Datasheet says that the 7-bit slave address is 0x32, and the diagram shows a 0 sent after that. Doesn't that mean you have to shift the address and send it as 0x64 instead of 0x32?

EDIT: Nevermind...I see the trace is the correct address.
 
Last edited:
I see you have a level shifter. Does it provide the necessary pullups for the clock and data lines? If not, put in about 4.7k to 10k as pullups on the I2C line(s)
 
I hope I don't get this wrong again...But it looks like he is sending the slave address with a write flag (0), sending the address 0x97, but not sending any data. He then sends the slave address with a read flag (1) and sends the address 0x00...which is apparently empty?
 
I hope I don't get this wrong again...But it looks like he is sending the slave address with a write flag (0), sending the address 0x97, but not sending any data. He then sends the slave address with a read flag (1) and sends the address 0x00...which is apparently empty?
You write the slave address (with write) followed by the address of the area you want to read then a restart followed by the slave address (with read) before reading back the area you have addressed.

Mike.
 
I found the attached which has Arduino examples.

Mike.
 

Attachments

  • REN_ZMOD4410_MAS_20211202.pdf
    1,010.7 KB · Views: 2,690
Datasheet says that the 7-bit slave address is 0x32, and the diagram shows a 0 sent after that. Doesn't that mean you have to shift the address and send it as 0x64 instead of 0x32?

EDIT: Nevermind...I see the trace is the correct address.
The Address of the slave is correct, I am using a built in example in which the software first ensure that the connected sensor have a stable communication and it is connected correctly like status of the sensor , configuration of the sensor also the host MCU checks communication error if incase data is inconsistent during communication with the sensor.
I think the ADC registers in the sensor are always zero, now raw data is calculated by the sensor, due to which I am reading zero's
 
I hope I don't get this wrong again...But it looks like he is sending the slave address with a write flag (0), sending the address 0x97, but not sending any data. He then sends the slave address with a read flag (1) and sends the address 0x00...which is apparently empty?
I have shorten the wave form , If you want I can send the whole waveform if you want, The part of the waveform is skipped, Unfortunately I am unable to find the Register Map of the sensor, due to which I also know about the addresses locations except 32hex which is slave address of the sensor.
 
I found the attached which has Arduino examples.

Mike.
Yup I am following this guide, there is a sample code for Arduino, Please take a look you will know what is actually happening.
This is the Logic Analyzer file if you want to see the whole communication for at least one cycle.
File file is CSV channel 0 is SCL and channel 1 is SDA line, please change the extension from .txt to .csv
 

Attachments

  • digital.txt
    81.7 KB · Views: 497
I solved the problem, The problem was with the MCU UNO , as far as I Know, by changing the MCU from UNO to Nano board, Things start working fine.
I am not sure what was the problem but finally changing the MCU solved my problem.
Thanks to all members who takes part in this thread. Again Thank you very much for helping me.
1652082971322.png
 
can you please tell me how to connect the sensor with arduino because i have to do the same project but with senson ZMOD4510. but i if you tell me how you do it i can understand about my sensor.thank you for your help
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top