I am assembling a Pico-4WD car that I just received. Ahead of the final assembly I tested all of the modules, as recommended in the pico-4wd-car documentation. All modules tested positive except the ultrasonic range finder. Running the test sonic test from Thonny, it reported the same negative distance, -0.034, regardless of how I positioned the sensor.
I have a raspberry pi 4, so I tested the sensor on it using the software from your Raspberry Pi starter kit (which includes the same distance sensor). The sensor worked fine in that environment.
The wiring of the sensor to the Pico RDP matches what is described in the documentation.
I would appreciate your help in addressing this issue; without the sensor, the car would be “driving blind”!
You have the same ultrasonic sensor working fine on the Raspberry Pi Starter Kit, but not on the Pico RDP?
It may be that your wiring is not correctly connected.
There may be a problem with the ultrasonic sensor interface of the Pico RDP board.
a. First, please confirm whether the wiring of the ultrasonic sensor corresponds to the Pico RDP interface. (Provide clear wiring pictures)
b. If you have a multimeter, please measure the GND and 3V3 of the ultrasonic sensor interface 6 on the Pico RDP board. The standard measured voltage is about 3V.
Using the same ultrasonic sensor on a Raspberry Pi 4B (using bread board and Raspberry Pi GPIO Extension Board) and running test 25 from the Sunfounder_SensorKit_for_RPi2, it worked fine, but the same ultrasonic sensor is not working on the Pico RDP: regardless of how I position the sensor, it reports -0.034
If the ultrasonic sensor runs on Sunfounder_SensorKit_for_RPi2, it can work normally, which means the ultrasonic sensor is normal.
Working on Pico RDP does not work, then the working voltage of the ultrasonic sensor pin interface is a stable 3.3v or so. It can also be judged that there is no problem with the Pico RDP board.
You try to replace a new set of cables, the pins of the Pico RDP interface correspond to the pins of the ultrasonic sensor, and check the result.
I am sure the cables are fine. Below is a picture of how I connected the sensor to the bread board (that is attached to my raspberry pi 4). In that setup I used the same cables I used to connect the ultrasonic sensor to the Pico RDP, the only difference being I used male-to-male jumper cables to connect to sensor cables to the breadboard.
I also ran a test on the pico where I moved the sensor to RDP pins 8 and 9 (where the speed module is typically connected) and updated line 27 in pico_4wd.py from
sonar = Ultrasonic(6,7)
to
sonar = Ultrasonic(8,9)
I got the same failure mode:
distance:-0.034
Could there be a problem with the diagnostic software in the pico_4wd_car repo? Have you successfully run test_sonar.py?
If you are sure the diagnostic software is correct, would it be possible for me to get a replacement pico RDP board? (I would send you back my current board.)
The pico RDP board should be fine.
Use a multimeter to measure the pins 6 and 7 of the pico RDP board and the GP6 and GP7 pins of pico:
Is the SIG pin 6 of the pico RDP board connected to the GP6 pin of the pico?
Is the SIG pin 7 of the pico RDP board connected to the pico GP7 pin?
If there is no intercommunication, there may be a problem with the pico board.
I got a 1.3 ohm reading between SIG pin 6 on the pico RDP and GP6 on the pico
Similarly, I got a 1.3 ohm reading between SIG pin 7 on the pico RDP and GP7 on the pico
I tested the voltage again on between GND and 3V3 pin 6 of the pico RDP and it is now measuring low: around 1.8V. This may be due to a short I temporarily created while probing the connections?
The ultrasonic sensor interface pin of the pico RDP is short-circuited and damaged, and a new pico RDP board needs to be replaced.
Note: When the sensor is connected to the pico RDP board, carefully check whether the pins of the two are well connected. If the pins are reversed, it may cause damage to the sensor or short circuit damage to the pins of the pico RDP board.
I wanted to close this thread by recognizing and thanking Sunfounder on their outstanding customer support. The support I received through the forum and then directly with service staff has been superb. We determined I needed a new Pico RDP board, but due to production schedules Sunfounder will not be able to get me the new board for some time. They will send me a new Pico RDP board as soon as it is back in production, AND, as compensation I just received an entirely new PiCar-S kit, which I can assemble with a spare Raspberry Pi 3 I have. Sending the new kit was totally unnecessary but greatly appreciated.