Problem with ULTRASONIC DISTANCE SENSOR - Still!

I previously started a thread here about being unable to get a 4TRONIX ULTRASONIC DISTANCE SENSOR BREAKOUT (CE07356) working with our BitBot XL & MicroBit v1 -

Core were great & shipped a new replacement. (Thanks!) But I’m somewhat embarrassed to have to report that we are still having exactly the same problem.

Here is the program (though we have tried variants):
image
We’ve tried the beta of makecode as well as the normal. Photos are as per previous post.

We’ve tried to be particularly careful when handling it, so I’m confident it’s not damaged.

Any suggestions? Has anyone seen this work?

Thanks for any help.

Cheers

1 Like

Hi Anthony,

I’m about to head home for the day (I’m actually still here late) but now that we’ve got these on shelf I’ve grabbed some stock of the XL and the distance sensor so we can test it out tomorrow.

1 Like

Hi Anthony,

Well, I have good news! I’ve been able to replicate your result!

And the problem is - I think your batteries are flat :slight_smile:

I just tried powering the BitBot with our lab supply and slowly dropped the “battery” voltage down to see where it would fail. At 2.7v (instead of the ~4.8v of 3x fully charged AA’s) the micro:bit output a constant 1 on the screen.

There must be enough voltage to keep the micro:bit running (I checked, it’ll actually keep operating down below 1.8v), but not enough to drive the Ultrasonic sensor properly - hence the erroneous reading.

The good news is that the code definitely works!

Here’s a new BitBot XL running from a power supply replicating your issue:

And here’s the code running with fresh batteries.

Please let us know how you go with a fresh set of batteries!

1 Like

Interesting find Oliver! 4Tronix also reached out to us regarding this topic with a concern for the battery voltage.

2 Likes

Fixed! You folks are genius - thanks so much for your efforts.

FYI our problem wasn’t exactly flat batteries - it was that we were using rechargeables. Apparently rechargeables produce a lower voltage. Switching to standard batteries fixed the problem.

Cheers

3 Likes

Alkaline 1.5, rechargeables 1.2 (or 3.7 LiPo).
Cheers Bob

3 Likes

Watching the video it looks like you’d get away with fully charged NiMHs, but once they got a bit flat you’d be out of luck.

FYI, NiMHs have a relatively high self discharge rate, so if they’ve been sitting on the shelf for a while they’ll probably need a top up.

2 Likes

4 rechargeable (4.8V) instead of 3???
Cheers Bob

3 Likes