Accessing Explorer reboot Pi

weird one this one… my Explorer HAT pro has started playing up and rebooting the Pi on certain calls. I have narrowed it down to one in particular (used in the example): explorerhat.motor.forwards()
(though there could be others).

calling explorerhat.motor causes no problem so it sems to be that particular function.

The only thing I recall installing that might be relevant is python-dev. Other than that yes, I have been hooking up various things to it to get a camera trigger working, but I haven’t touched the motor outputs at all, and I doubt that this has to do with the hardware side.

if I run ‘pip list’ this is what relevant info I have:

ExplorerHAT (0.1.1)
RPi.GPIO (0.5.11)
smbus (1.1)

… I am not aware that the EXplorerHAT lib itself has been updated, I certainly did not do it manually, so I don’t think that is has to do with recent changes that may have occurred in the last few days in your master code.

on a sidenote though, in the github top the Documentation links right at the end are broken ;-)

EDIT: if relevant when I call the function from the Interpreter I get some output:

pi@Rpi ~ $ sudo python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import explorerhat
Explorer HAT Pro detected…

two, one

{‘two’: None, ‘one’: None}

… then the Pi reboots. Well I lose connection to my ssh session, but that is what happens on the box itself, I can tell from the various events that occur visually on my WIFI adapter.

a bit of detective work lead me to believe that the forwards() function requires a value or this is what will happen, at least for me, right now.

I guess it does not really make sense to call it without a value, though that is being called that way in the example so maybe there is a purpose. I guess that the function (and example if appropriate) should be modified to handle it more gracefully, and do what it is supposed to (if anything?) if possible.

… anyhow, all good for me, I’ll stay away from that example until I hear the lowdown on it ;-)

EDIT: removed python-dev to test, same thing, the package version is 2.7.3-4+deb7u1, not sure whther it could be one of its dependency that is causing the issue, but though I’d note it here.

Bizarre, this must be something funky in RPi.GPIO’s software PWM, presumably. Do you have the Explorer HAT plugged in when attempting this, just to verify it isn’t browning out your Pi?

hum, yes, only with the Explorer HAT plugged in… not sure I understand the question though. If you mean the Propeller then no, I haven’t assembled it yet.

I’ve just checked apt-get history log and there is definitely nothing else software wise that has changed except for python-dev. A dependency that it brought along was libssl-dev:armhf (1.0.1e-2+rvt+deb7u16, automatic) but I can’t really think why that would matter.

not sure how to check pip’s history, perhaps the culprit is there. It definitely used to work as I was using the verbatim on shutdown/halt up to that point just fine, just to flash the LED during the process (called by a custom init.d)

quite a mystery, but I’ll keep digging and see if there is a cause I can identify…

I was trying to think of a way you could run just the motor control, without having Explorer HAT plugged in at all. It’s possible that it’s not software causing a reset, but a power issue caused by the motor driver that’s browning out your Pi ( starving it of power so it resets ).

It could potentially also be software, RPi.GPIO has had some funky bugs, but since nobody else has reported it I don’t think it’s likely.

Has this been resolved? As I have just got my Explorer Hat Pro and it too is rebooting my Pi when I call the motor.forward() function. I have tried passing it values. It seems to work with one motor but the minute I attach two, then it restarts my Pi.
Any ideas?

It’s most likely a power issue and something we can’t fix with software- IE: you’re using motors that your power supply simply can’t provide enough power for. The result is that the motors drain all available power when they’re both turned on and the Pi is browned out.

Which motors/power supply are you trying to use?

I’m using two of the micro metal gear motors from the pimoroni store trying to set up my sumo chassis. Power supply is the official raspberry pi wall plug at the moment as just testing stage.

Hey @thetrooper83! Could you upload a photo of your complete setup so we can replicate here please?

it is literally just the two motors attached to the motor pins on the explorer hat.

Would be really helpful to get a photo just so we can discount any potential error - though I’m sure you know what you’re doing! :-)

I am learning so chances are I am doing something wrong.
It won’t let me upload a photo as I am a new member. :(

I’ve promoted you to member, whee! You should now be able to post images.

So thats what i’ve got to test the motors and the zumo chassis. The code I have works fine with the one motor but restarts the pi with two connected.

Just to clarify, are you using this power supply or the older black one which you plug a USB cable into?

it is not that power supply no. could this be the issue?
I do get 5v output from my power supply, but it says its only 1A, not the 2A as in the power supply you linked to?

It could well be the issue. Is that a Pi 2 hiding under there?

Between a Pi 2, a Wifi dongle which can take anywhere from 200mA to 350mA, and 2 motors operating at anywhere from 30mA to 500mA you haven’t got a lot of headroom. I had this same problem with low quality portable batteries, which just couldn’t provide enough oomph to drive the motors and the Pi.

I loathe to recommend buying another power supply until we’re sure it’s the problem, so see if you’ve got anything rated at 5v, 2A ( a phone or tablet charger maybe ) lurking about your house first and try that.

It sure is a Pi 2 under there.
I will have a look. I’m sure i will have something around here. and if not I guess i will try a new power supply.