HC-SR04 causes Raspberry Pi Reboot - Ideas?

Moderator: Steve

HC-SR04 causes Raspberry Pi Reboot - Ideas?

Postby alanmcdonley » Tue Jun 14, 2016 7:19 am

HC-SR04 operation is causing occasional reboots - Ideas?

Details here: https://goo.gl/QOT9gG (with a good word for the Pi Droid Alpha there too!)
alanmcdonley
 
Posts: 91
Joined: Thu Jul 23, 2015 10:50 am
Location: Boynton Beach, Florida

Re: HC-SR04 causes Raspberry Pi Reboot - Ideas?

Postby alanmcdonley » Tue Jun 14, 2016 8:33 am

OUCH

Now that I think about it, I need to check maybe I have the 5v Echo going straight into the GPIO - I may have reversed the trigger and echo pin allocation.


If so, lucky I didn't fry my Pi!
alanmcdonley
 
Posts: 91
Joined: Thu Jul 23, 2015 10:50 am
Location: Boynton Beach, Florida

Re: HC-SR04 causes Raspberry Pi Reboot - Ideas?

Postby mikronauts » Tue Jun 14, 2016 10:36 am

Thank you for your kind words!

Scratching my head... the only way I can think of that happening is:

ECHO going directly to a Pi pin without voltage divider, and one of the two conditions below:

1) Pi drives pin at 3.3V, HC-SR04 pulls it to GND

2) Pi drives pin at GND, HC-SR04 drives it to 5V <--- more likely

Depending on the HC-SR04's low current limit, it might short the Pi's 5V and cause a reboot.

1 is the same thing - in reverse.
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm

Re: HC-SR04 causes Raspberry Pi Reboot - Ideas?

Postby alanmcdonley » Tue Jun 14, 2016 8:54 pm

Fixed!!


I had the Echo going direct and the Trigger from a servo pin - exactly backward... Glad I didn't fry my board.

I've been running the switched wiring with my hcsr04.py interface code for two hours now with no reboots, even moving the tilt or pan servo that occasionally bumps the total current draw to 1.8A which is 1.4 A to 1.6A flowing to/through the Pi board (the regulator claims to be 80-90% efficient).

I'm careful not to run both tilt and pan servos at the same time, but I'm going to move the HC-SR04 Echo (and Vcc,Gnd) to the other half of servo pins, and put the servos on the 5v unregulated tap.

That will keep the Pi current draw around 500mA with everything going at once.
alanmcdonley
 
Posts: 91
Joined: Thu Jul 23, 2015 10:50 am
Location: Boynton Beach, Florida

Re: HC-SR04 causes Raspberry Pi Reboot - Ideas?

Postby mikronauts » Wed Jun 15, 2016 9:56 am

Glad to hear you fixed it!

I'd be careful about that GPIO pin, would not rely on it.

alanmcdonley wrote:Fixed!!

I had the Echo going direct and the Trigger from a servo pin - exactly backward... Glad I didn't fry my board.

I've been running the switched wiring with my hcsr04.py interface code for two hours now with no reboots, even moving the tilt or pan servo that occasionally bumps the total current draw to 1.8A which is 1.4 A to 1.6A flowing to/through the Pi board (the regulator claims to be 80-90% efficient).

I'm careful not to run both tilt and pan servos at the same time, but I'm going to move the HC-SR04 Echo (and Vcc,Gnd) to the other half of servo pins, and put the servos on the 5v unregulated tap.

That will keep the Pi current draw around 500mA with everything going at once.
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm


Return to Pi Droid Alpha

Who is online

Users browsing this forum: No registered users and 3 guests

cron