DS28E17 support

I am currently working on a robotics project (home project) that involves a 1-Wire Slave Module you have available in your store (DS28E17)

Sadly I bought the evaluation board from maxim but if I am capable of setting up the sensors I will make sure to purchase them from you as they a lot cheaper. (In have added the maxim datasheet below but they match your board in functionality)

After extensive searching on the interwebs I found you published a library for the DS28E17 4 days ago GitHub - hardwario/arduino-DS28E17 and thus I am here to ask if you capable of explaining how to use it in combination with other I2C sensors.

I am (attempting) to build a robot that using several VL53L0X Time of Flight sensors (link is below)
I wish to use these sensors on a 1-wire bus rather than using a differential bus expander (PCA9615) due to the number of sensors involved (each sensor would require an IO to trigger the Xshut pin to change the I2C address) and sadly I am already packed on I/O’s. Additionally the 1 wire protocol allows me to have greater cablelengths and be more robust to EMI. All in all it has to go on 1wire.

My robot will contain both an Arduino(uno) as a Raspberry Pi 3B+. Preferably I would like them connected on the raspberry but using the Arduino would do if its not possible.

I have tested several VL53L0X together and the problem is not in coding/using this sensor standalone, but in the combination with the DS28E17. I am already capable of finding the DS28E17 in Arduino using the one wire scanner. But I have yet to be to get further than that.

I hope you capable of supporting me in getting it running.

*I do not expect you to do my “homework” I enjoy figuring stuff out myself but after few weeks of failing it’s clear I am not going to get any further without some help.

I would like to thank you for publishing so many boards and documentation. Sharing is caring

Development board Maxim: https://nl.mouser.com/datasheet/2/256/8814-740804.pdf
Vl53L0X Sensor: https://learn.adafruit.com/adafruit-vl53l0x-micro-lidar-distance-sensor-breakout
VL53L0X arduino library: https://github.com/adafruit/Adafruit_VL53L0X

My test setup with arduino (Sorry for the mess my other protoboard is full so i used my mydaq one)

I try to guide you and give you some hints.

You can get inspiration in SoilSensor which uses that DS28E17 library. Soil Sensor is the product which will be also supported for Arduino soon. It has many I2C chips inside and uses 1-wire communication to the external world.

Here is for example access to the I2C EEPROM memory that is located on teh soil sensor behing DS28E17

We also had some issues with that chip because it takes some time until it wakes up. Usually it should wake up after 1-wire reset pulse, but it takes a bit longer so we used two 1-wire reset pulses, or you can do a small 100 us delay after reset pulse.

But if you do not put the chip to the sleep, then the issue explained above maybe does not apply.
If you would like to put the chip to sleep, you have to do that after ANY 1-Wire communication. If you for example have also 1-Wire DS18B20 temperature sensor on the same bus, then the RESET pulse for this temp sensor will also wake-up the DS28E17. So after every DS18B20 transaction you should call DS28E17 sleep command again.

Hope that it helped you in some way. Let me know if you have any questions.



Thanks for the quick reply.
I have looked in your code and its really clear however I assume I am stuck with this line of code.

The soilSensor(&oneWire);part of the code is mainly the part I am stuck with.

All other DS28E17 examples I managed to find (Links below) use this similar xxx(&oneWire); feature

Adafruit library and the library I use does not seem to have this onewire feature in it. I have already attempted to add it in myself but my knowledge about modifying library’s is little but an library this complex (VL53L0X) is non existing.

If I would like to integrate the VL53L0X library inside your SoilSensor.H and .CPP (Or other way around) so i can call it under the soilSensor(&oneWire); how would you realize this?

I am not planning on putting the chips to sleep. The planned setup (16x DS28E17 + VL53L0X (one each)) is for detecting the surroundings to prevent collision with objects putting them to sleep would be bad :smiley:

I can't put more than 2 links so here they are
Maxim example: https://github.com/travis-taylor4/FTHR_DS28E17_Master
SparkX example: https://github.com/sparkfunX/1Wire_to_Qwiic_Bridge_DS28E17
Other example: http://www.fay.tv/bme280-1-wire/

To explain what I attempted to modify.

I could not add more links xD

Using the library mentioned above I tried to modify this line


To match your SoilSensor(OneWire *oneWire);

So it would be

[code] VL53L0X(OneWire *oneWire);[code]

I further added the

    OneWire *oneWire;
    DS28E17 ds28e17;
    bc_tof_sensor_t bc_tof_sensor;

(I changed all soil to tof)

I tried to modify the rest of the code but looking how complex (at least to me) it looks I kinda getting overwhelmed and no not know what to modify and what not. As result the Arduino compiler keeps spitting me errors that I cannot make sense off.

I’ve upgraded your account from new user, you could add more links now.

My other post was removed/hidden due to been seen as advertisement I guess this was done automatically

You To port the original TOF sensor library you would need to change at least the low level functions for reading and writing.

I think that your problem is Arduino IDE specific and you should ask on their forums including all the sourcecode and complete compile output, because it will make sense to them.
None of us at BigClown has written Arduino library, this one is by one of our external supporters.

I’ve already rewritten Pololu Arduino library for VL53L0X to BigClown Core Module:

it is still a draft, you can use only one VL53L0X.


1 Like

Great @martin.grames.
Could you briefly describe how to connect vl53l0x to fit your rewrited pololu Arduino library? Do you use only I2C bus? I bought this one.

Yes, only pins GND, VDD, SCL, SDA - same interface as BigClown Tag.

1 Like

Great, thanks
Yours sensor seems to be identical to my.

Top one Grove bottom one adafruit

I like the Grove more cus it allows cleaner connection than the adafruit. This as the capacitors on the adafruit board are larger than the sensor itself so covering the sensor becomes harder

Reading the bigclown firmware SDK for the DS28
would it be possible to use that in combination with your library or would it still require significant adjustment?

Hi @Double13

if I understand correctly, you would like to edit existing Arduino Library for vl53l0x which needs to be ported to use 1-Wire communication over other Arduino libary DS28E17.

@martin.grames has vl53l0x library for BigClown SDK (no Arduino, completely different ecosystem) and is using direct I2C communication.

So (@Double13) you really need to ask Arduino forum community because

  1. we have not this knowledge
  2. there’s many times more people on Arduino forums with that knowledge

You can add a link to your thread here so we can find your solution if you find one.


Sorry for the confusion by last question was not related to arduino but to the use of your software tool Bigclown.

I saw that BigClown has a library and various sensors working on the DS28E17. Further I saw it also has the VL53L0X by @martin.grames so i was wondering if I would switch from arduino to bigclown if the process in linking them would be more feasible.

This I ask as in the SDK link posted it does mention various sensors but not (maybe yet) the VL53L0X

I have poked quite a bit in your software tool and it is really nice and a lot is very detailed so i am thinking of potentially switching to it. I am thinking to attempt recreating some of my code to see how it works. However if this link between the VL53 and your Bigclown is not possible either than that would prob be a nono cus I already own an arduino and the investment would not be worth to have a PI/arduino and clown.

Extending any of our I2C sensors or VL53L0X library over 1-Wire slave is simple. You just initialize the sensor with virtual I2C BC_I2C_I2C_1W.

More details in this I2C chapter in developers.

Virtual I2C in our SDK

In @martin.grames library that means changing the BC_I2C_I2C0 to the BC_I2C_I2C_1W.

How big is your robot going to be?

Well i was thinking of buying one of those cheap chinese robotic lawnmowers and strap some sensors on it and go.

I was thinking of adding GPS to it and sorta prelearn it to drive in rows | | | | (cus the eye also wants it to look nice) (Not random pasterns like most do)

Than the VL53 are more like collision detection that if something would be in the way (lets say a footbal is on the field) it would detect it and drive around it.

I also have some other ideas in mind (maybe vacuum version) but haven’t really came that to a point what exactly I want to do.

The reason for 1wire is mainly that on previous project (all done in uni (i just graduated electrical engineering)) we quickly ran out of I/O’s on the boards. While I might have no issue with this project it would be nice to just get it running over 1-wire so i can keep spare I/O ports.
(I mainly did the PCB design part and not a lot of programming but I wish to expand on that by doing some projects like this)