[Part Bug] HC-SR04 Ultrasonic Sensor - False Connection

Hey guys, I realized that for some reason after connecting the part the way it is supposed to be as shown here:

It keeps trying to auto route the echo pin to the ground pin. Any reasons why this could be the case? This happens after you start trying to play around with the connections in the schematics area or the PCB area.

The most likely explaination is that you have made (and possibly now removed) an incorrect connection in schematic. Sometimes that causes corruption that can only be cleared by deleting all the wires and starting again. It isn’t clear if this is a bug or just how things work, because despite seeing the result, I’ve never been able to reproduce it by doing what I think was done to get there. If you upload the sketch (the .fzz file, upload is 7th icon from the left in the reply menu) I’ll have a look. Since this is the smallest (and thus maybe easiest to reproduce) case I’ve seen, anything you remember about what you did would also be useful. If I can reproduce a case of this, we can trace what is happening and maybe fix it. So far I haven’t been able to reproduce it.


I am unable to replicate it, however if I do I will be sure to report back here, sorry for the troubles!

That is what I figured (although I was hoping :slight_smile: ), I’ve tried everything I can think of on the examples I have by starting from scratch and making the incorrect changes I see in the final result, but have never been able to reproduce it. Any idea what you might have changed in schematic? This is a simple case (at least it appears so) with only one part and a couple of connections, the others I have are multiple modules with lots of pins and a simple case is easiest to trace. If you have a copy of the corrupted .fzz file, I would appreciate a copy of it to poke at in case I can recreate it.

Nothing to be sorry about :slight_smile: , this has been around for at least 3 years now with none of us being able to reproduce the failure. It can be very painful if you have a large sketch that gets hit and you have to start again, so a fix (if there is one) would be good.


Hey, I appreciate your dedication, so the thing is, I tried this all again with 2 ultrasonic sensors and the Arduino Yun. If you take a look at the “schematics” section you will see it’s trying to connect the echo pin. I have not done anything out the ordinary here, simply connected the GND to GND.

Broken Ultrasonic Sensor.fzz (35.3 KB)

Ah! This is a case of a broken part, not db corruption. The SR04 part in core appears to be wrong. If you hover over the ECHO pin with the mouse, the pin label is GND (Pin 4) not ECHO which means Fritzing thinks it is correctly connected but schematic is wrong. The other SR04 in core is also wrong, it doesn’t connect at all in schematic. Try this corrected version of the SR04 you used:

HC-SR04 Ultrasonic Distance Sensor-fixed.fzpz (25.7 KB)

It has a new moduleId so will load along side the core part. If you do a delete minus on the current part, that will delete the part but leave the wires in place. When you drag in the new part you then need to click on the end of each wire in each view and move it slightly so the connection gets remade (it may be easier to just redo the wires in this case though.)


1 Like

Thank you so much for the fix, I had a feeling it’s a broken part as well. Is it possible to have it on the database instead of the broken one? Since the broken one is still publicly available for usage by anyone and people would need to dig in the forums to find the fixed part by yourself.

Yes, but … The but is, to replace the part I have to figure out how to obsolete the old one, and I haven’t yet done that yet (then have my usual fight with github about submitting parts to core, but that is probably easier than the obsoleting.) So yes it will eventually get done. My long term plan is to fix up all the parts in core because there are other errors but that is going to be a big project. Hopefully some of the folks learning to make parts will join in the effort.