I have not checked your link Chris as I am not into pics really but it was posted that a pickit was useless and a ttl to usb converter needed by someone respected on gcb forum.
can't be bothered being sherlock holmes to find who.
Thanks anyway.
gcb seems to get more complicated every day! :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I ask that myself Evan :)
I came across it on checking what picaxe up to and Haroen seemed to have a picaxe version working.
Haroen, is this the same device?
pins
gnd
vdd
rx
tx
sda
scl
that info could be wrong.
I didn't write the i2c address finder :)
I used a uno which has built in pull up for i2c but not set that up and use as normal.
i2c finder gives same address with or without 3.8k pull up resistors.
using 0xA4 gives constant error I2C Ack error.
Haroen got it to give serial results???
may be it is faulty device.
maybe gcb i2c address finder wrong but works for other i2c like ssdxxx or port expander.
I don't really understand arduino and picaxe i2c being different to gcb i2c addresses...
like gcb uses full address.
This isn't basic it's complicated stuff doh :(
so is gcb i2c address finder results to be used or what?
I think there's more to this device's implementation.
Last edit: stan cartwright 2021-01-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I ask that myself Evan :)
I came across it on checking what picaxe up to and Haroen seemed to have a picaxe version working.
Haroen, is this the same device?
Yes I think it is!
pins:
gnd
vdd
rx
tx
sda
scl
Looks like my connections too! Try switching sda with scl because you know chinese :-)
I don't get any "I2C ack error" like Stan has in his tof10120address.jpg!
used 3.8K pull ups and used 0xF4 as address and got this on terminal
Sorry, I have now corrected all datasheet links in my posts.
This isn't basic it's complicated stuff doh :(
so is gcb i2c address finder results to be used or what?
I think there's more to this device's implementation.
Hang on Stan, we will try to get yours working!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@Stan, This is my picture attachment and try to duplicate the projects wiring and on exact these Arduino NANO pins.
Try it with Anobiums latest code without changing anything, just copy and paste.
The default I2C address will be used for now.
Let us know how that went.
OK. Back to basics. What is the voltage on the sensor? voltage on both i2c lines? then, remove power - what is resistance between supply voltage and data line, and, resistance between supply voltage and clock line?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The sensor is too easily shorted (ie too small to probe) but the 5V supply is 4.88V, ie uno 5V pin.
sda to gnd=4.88V
scl to gnd=0V
resistance device supply, unplugged from uno, meter pos probe to device V+supply in, -probe to
scl=11.5 Meg ohm
same with probes swapped.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
then, remove power - what is resistance between supply voltage and data line, and, resistance between supply voltage and clock line?
Do you mean leave the tof10120 connected to uno and measure resistance with no power?
There's nothing wrong with uno or nano I use to test this. I tried ssd1306 and that works and is i2c.
This would not be the first fleabay device to not work if you know what I mean.
I think they sell them and by the time you figure how they work you find it's faulty but then it's too late to send it back...imho :)
ps thanks for reply, know you are busy
Last edit: stan cartwright 2021-01-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
then, remove power - what is resistance between supply voltage and data line, and, resistance between supply voltage and clock line?
No. I mean. what is the resistance on the clock line (and data line) with no power to the 5v0 rail. Do a set of measures with the sensor connected, and ,not connected. So, you have 4 results to post.
Sensor connected
1 DATA to 5v rail
2 CLOCK to 5v rail
Sensor disconnected
3 DATA to 5v rail
4 CLOCK to 5v rail
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not sure who told you That Stan but Here is an example of Me using it to Fine tune the timing of a Soft UART in XC8.
Here is the full story but fair warning - "C Code Ahead"
Tutorial - Advanced Debugging and Code Porting with Mid Range PIC’s
I have not checked your link Chris as I am not into pics really but it was posted that a pickit was useless and a ttl to usb converter needed by someone respected on gcb forum.
can't be bothered being sherlock holmes to find who.
Thanks anyway.
gcb seems to get more complicated every day! :)
I read it also some time ago
Last edit: Haroen 2021-01-21
I didn't and it worked ok.
Last edit: Haroen 2021-01-21
1) Official china datasheet,
2) un-official translated of-the-record datasheet.
don't work
https://drive.google.com/file/d/1uaMZ421smI0FN40iJgn-ZKQG42KUvFfh/view
https://drive.google.com/file/d/1uaMZ421smI0FN40iJgn-ZKQG42KUvFfh/view
Last edit: stan cartwright 2021-01-20
Oh sorry, my bad,
Double http://http://
Working links:
1) Official china datasheet,
2) un-official translated of-the-record datasheet.
used 3.8K pull ups and used 0xF4 as address and got this on terminal
No PullUps Stan.
I am going to ask a dim question @Stan - is this the same device as Haroens sensor?
in the code
should that be byte as later
I ask that myself Evan :)
I came across it on checking what picaxe up to and Haroen seemed to have a picaxe version working.
Haroen, is this the same device?
pins
gnd
vdd
rx
tx
sda
scl
that info could be wrong.
Last edit: stan cartwright 2021-01-20
@Stan.
There is something wrong. In the datasheet the address is 0xA4. the PICAXE code is $A4, Haroen code uses 0xA4 but you think your address is 0xF4
This is the root cause. You could assume the device address is different and therefore a difference device. But, I do not think this is the case.
Looks the first nibble on your 0XF4 address.. all the bits are high. And, the second nibble is the same.
I think you need to sort this - my guess is your address is 0XA4 and you are getting rubbish reads.
So, post your code - let us look.
I didn't write the i2c address finder :)
I used a uno which has built in pull up for i2c but not set that up and use as normal.
i2c finder gives same address with or without 3.8k pull up resistors.
using 0xA4 gives constant error I2C Ack error.
Haroen got it to give serial results???
may be it is faulty device.
maybe gcb i2c address finder wrong but works for other i2c like ssdxxx or port expander.
I don't really understand arduino and picaxe i2c being different to gcb i2c addresses...
like gcb uses full address.
This isn't basic it's complicated stuff doh :(
so is gcb i2c address finder results to be used or what?
I think there's more to this device's implementation.
Last edit: stan cartwright 2021-01-20
Please post your code, or, did you ? if so, where?
Yes I think it is!
Looks like my connections too! Try switching sda with scl because you know chinese :-)
I don't get any "I2C ack error" like Stan has in his tof10120address.jpg!
No need for PullUps Stan.
Sorry, I have now corrected all datasheet links in my posts.
Hang on Stan, we will try to get yours working!
Stan's issue is that he is running at 400mbits not 100mbits. He has not posted his code but my guess he is overloading the sensor.
@Stan, This is my picture attachment and try to duplicate the projects wiring and on exact these Arduino NANO pins.
Try it with Anobiums latest code without changing anything, just copy and paste.
The default I2C address will be used for now.
Let us know how that went.
Tried programs posted and mine but i2c finder says address 0xF4.
it's only 2 wires.
In your photo the t0f10120 supplu-red is going to nano VIN ! not +5V
OK. Back to basics. What is the voltage on the sensor? voltage on both i2c lines? then, remove power - what is resistance between supply voltage and data line, and, resistance between supply voltage and clock line?
The sensor is too easily shorted (ie too small to probe) but the 5V supply is 4.88V, ie uno 5V pin.
sda to gnd=4.88V
scl to gnd=0V
resistance device supply, unplugged from uno, meter pos probe to device V+supply in, -probe to
scl=11.5 Meg ohm
same with probes swapped.
OK.
What is the R on SDA?
11k5 on SCL would required a clock speed of walking pace. Was the power turned off?
Last edit: Anobium 2021-01-22
then, remove power - what is resistance between supply voltage and data line, and, resistance between supply voltage and clock line?
Do you mean leave the tof10120 connected to uno and measure resistance with no power?
There's nothing wrong with uno or nano I use to test this. I tried ssd1306 and that works and is i2c.
This would not be the first fleabay device to not work if you know what I mean.
I think they sell them and by the time you figure how they work you find it's faulty but then it's too late to send it back...imho :)
ps thanks for reply, know you are busy
Last edit: stan cartwright 2021-01-22
then, remove power - what is resistance between supply voltage and data line, and, resistance between supply voltage and clock line?
No. I mean. what is the resistance on the clock line (and data line) with no power to the 5v0 rail. Do a set of measures with the sensor connected, and ,not connected. So, you have 4 results to post.
Sensor connected
1 DATA to 5v rail
2 CLOCK to 5v rail
Sensor disconnected
3 DATA to 5v rail
4 CLOCK to 5v rail
Is this method how all I2C devices can be checked?