Black Lives Matter - Action and Equality.
0

Crickit Hat [Errno 5]
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Crickit Hat [Errno 5]

by maclysaght on Mon May 11, 2020 9:48 pm

I built a small remote control vehicle with Pi 3 and the Crickit Hat. It uses two motors. I have a separate battery powering the Hat.

I'm using code from this page:
https://learn.adafruit.com/adafruit-cri ... -dc-motors

I also have a small GUI built with Flask so I can control Fwd/Back, turn and Stop. This seems to work at first; I can move in reverse (throttle = -0.5) and turn right and left. I can also do Stop from either of those directions.

However, when I go to forward (throttle = 1 on both motors), if I then try to stop (or reverse or turn), the motors stop responding (stuck in forward) and I get this error from my gui;
File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 308, in write_bytes
self._device.write(buf)
OSError: [Errno 5] Input/output error

There's a lot more of the error traceback, but those are the last two lines. The only way to stop the motors is to hit the Hat reset button.

I have updated the seesaw firmware. Any clues what could be going on here?

thanks

maclysaght
 
Posts: 3
Joined: Mon May 11, 2020 8:36 pm

Re: Crickit Hat [Errno 5]

by dastels on Mon May 11, 2020 10:03 pm

What happens if you set throttle to -1 on both motors?

I'm wondering if it's due to electrical noise generated by the motors. You can try soldering a ceramic or disc 0.1uF capacitor between the motor tabs (on the motor itself!) this will reduce noise that could be feeding back into the circuit.

Dave

dastels
 
Posts: 2473
Joined: Tue Oct 20, 2015 3:22 pm

Re: Crickit Hat [Errno 5]

by maclysaght on Tue May 12, 2020 12:10 pm

Thanks for the suggestion. Yes, I tried throttle -1, and the motors seem to stall out and then give the same error. The reason I bought the Crickit Hat was i thought it handled all of the motor drive needs. I will see if I can track down some capacitors.

thank

maclysaght
 
Posts: 3
Joined: Mon May 11, 2020 8:36 pm

Re: Crickit Hat [Errno 5]

by dastels on Tue May 12, 2020 1:32 pm

It does give you the drive capacity, but motors are noisy things. Another thought... is your battery powerful enough to supply both motors running at full speed? Noise or a power brownout might be crashing the seesaw chip.

Dave

dastels
 
Posts: 2473
Joined: Tue Oct 20, 2015 3:22 pm

Re: Crickit Hat [Errno 5]

by maclysaght on Tue May 12, 2020 2:02 pm

Dave, thanks for that suggestion. I am currently looking for a more powerful battery pack, to see if that solves the issue.
I am now seeing a flashing red led (right next to the on/off switch) on the Crickit hat. Do you know what that means? I measured the batteries at 6v, but not sure where to take a measurement on the board under load to see true voltage.

maclysaght
 
Posts: 3
Joined: Mon May 11, 2020 8:36 pm

Re: Crickit Hat [Errno 5]

by dastels on Tue May 12, 2020 2:28 pm

Check out https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit/troubleshooting-crickit for soem troubleshooting ideas. Sounds like it's indicating bad power.

Dave

dastels
 
Posts: 2473
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.