Diddyborg freezing

Hello guys,

I've recently been playing around with my new diddyborg and encountered a problem. I quickly threw together some code so that I can drive it - I use input() to drive it (ie. python asks for input, I type PerformDrive(+0.5).
It usually freezes when driving into an obstacle, but sometimes also freezes just randomly. I usually have to reboot my diddyborg to make in functional again (SSH, VNC stop responding alltogether). Any idea what could cause this, and how to solve it?

piborg's picture

It sounds like the Raspberry Pi is loosing power and hanging or restarting because of it.

Usually this turns out to be a battery related problem. What batteries are you using in your DiddyBorg?

2000 mAh
Nickel metal hydride battery

piborg's picture

This does tend to happen when rechargeables are nearly flat. Have you tried fully recharging all of the batteries?

Yes, I've used them fully charged and the problem still persists.

piborg's picture

That is fairly odd, it still is likely to be a power problem of some kind though.

If you can answer some questions about your DiddyBorg:

  1. Are the batteries old?
  2. What brand are the batteries?
  3. If you have a multimeter can you measure the voltage of the 10x AA battery pack?
  4. What model of Raspberry Pi are you using?
  5. Do you have any other GPIO / USB devices attached to the Raspberry Pi?
  6. Have you added any other parts to the DiddyBorg, e.g. servos?

1. They are brand new, I bought them for my diddyborg.
2. Tesco Greener living
3. I have no multimeter :(
4. pi 3 model b
5. I only have a camera attached. it has actually 2 infrared reflectors, could this be a reason?
6. nothing

piborg's picture

From what you have said it would seem there are two likely possibilities:
  1. The camera may be the problem, it may be drawing a bit too much power. We have found some USB webcams draw quite a lot of power from the Raspberry Pi.

    In this case you can check if removing it solves the problem. If it does we know the official Pi Camera works with any problems.

  2. The Tesco AAs may not be quite up to the task.

    If this is the case you will need to try different batteries. I did try and pick some of the ones you are using up from Tescos earlier, but my local store do not have any :(

    We have found GP 2600 ReCyko+ work very well and both Energizer and Duracell rechargeables hvae proven reliable. Do not try non-rechargeables, we know they tend to have this kind of trouble in most cases.
If the camera you are using is a USB camera then I think it will be the most likely cause.

I have disconnected the camera and tried fresh new energizer batteries, but the problem still persists. Could it be a problem with wiring/soldering? This was my first soldering.

piborg's picture

It is possible the wiring could cause this kind of problem.

Are you able to take some photos of the wiring in your DiddyBorg?

A few comments about my work:
1. One of the DC motors has a red wire instead of the black one. This was my first work and I ran out of black because of an accident... my engineer friend said it's okay to use the red one instead.
2. Other than that, I experienced no major difficulties while soldering and wiring. This was my first soldering/wiring, I hope I didn't make any serious mistakes.

Timothy Freeburn's picture


Sorry to hear you are having problems :( I thought I'd try and add a few ideas to the discussion.

I'd just like to check that when you say it freezes, are you saying the motors stop turning and the Pi becomes unresponsive on the network. Does the Pi reboot? What do the Pi status LEDs do?

If it reboots, while it isn't impossible to be something else, it does sound like the cause is the power being momentarily disconnected. There are quite a few possibilites here, so I'll get you to check all of these things:

1) It's possible what is happening is that the batteries are popping out of the connector. Could you inspect the battery holder for any loose connectors or springs.
2) Could you check the 9V connector has a nice tight connection on to the battery holder and that the tabs aren't bent or damaged.
3) Could you check the other end of the 9V connector is securely connected into the BattBorg + and GND and the Reverse + and GND (they shouldn't come out with a gentle tug)
4) Could you try running some tape tightly around the batteries to make sure they don't come out.
5) It could be the Reverse to Pi connection. Could you try re-seating the 3 pin cables from the Reverse and Pi. There should have been a spare 3 pin cable, you could also replace one with this spare, and if the same behaviour persists, try replacing the other 3 pin cable with the first one.

The red cable you have used won't be any different to the black one. I can't see any soldering problems although the detail on the pictures makes it hard to check. If you could, please just check that the soldered connections on the motors only touch the terminal and don't touch the body of the motor. If they do, you can trim off any excess cable.

It's working!!! I've trimmed a cable, readjusted a loose cable and reshuffled the GPIO cables a few times. It was failing but somehow along the way one of the above just solved it. It's finally working, I've been using it for hours now and had ZERO problems. Thank you both for your help!

Timothy Freeburn's picture

Hooray! Happy to help out. If you find out it happens to be the 3 pin cable, just let us know and we'll send out some replacement ones - we have had some problems with some of those in the past (hence why we send 3 with a kit).

Hope you enjoy using your Diddy :)

Subscribe to Comments for "Diddyborg freezing "