Can't go at full speed directly

Hi,

I have a problem with my one of my Zeroborg.
I install everything, I launch the GUI but when I push the slider directly to 100, the motor beep but doesn't run.
But if I increase slowly the slider to 100, the motor run.

I already check my connections and it's good.
I already have this problem before with my first ZeroBorg (from Kickstarter) but it's now gone and I don't know why ...

I apologize for my bad english.

Thanks you :)

piborg's picture

It is possible that the drive protection is detecting a large current drain on the sudden power change and shutting off the power to the motor.

Usually under these conditions going to 99% instead of 100% works fine.

Can you try moving the slider to 99% instead and see if that works.

Thank you for your awnser :)

Is there anyway to disable this protection ? Because I control my raspberry from my smartphone and I can't let this protection enable, I control with joystick and to fully control I need all the time to push the joystick at 100.

This protection is off in my first Zeroborg (it was enable at the start) and I don't remember how I disable this protection.

Thank you !

piborg's picture

If the on-board protection is the problem then the answer is no, it is not possible to disable the protection.
This protection is designed to prevent damage to the board when their is a problem with the motor or battery.

It would help to know a bit more about your robot to determine how the problem can be solved.
It is likely to be a simple problem to fix as it sounds like you have had it working in the past.

  1. What motors are you using for the wheels?
  2. What batteries are you using to power the ZeroBorg?
  3. Have you tried testing the robot with a freshly charged set of batteries?
  4. What script are you running to control the ZeroBorg on the Raspberry Pi?
  5. Can you take some photos of how the robot is wired to the ZeroBorg?

- I have two DC motor from a old RC Car, a Nikko Dictator II (4wd). They work perfectly.
-I test with two batterie (one 6v, one 7.2v nimh) and they do the same thing ... (The 6v work with the zeroborg on my first robot).
- Yes
- This is the code I use. It's a server in Python with Flask. Work perfectly.


# coding: utf-8
import ZeroBorg
from flask import Flask, render_template
from flask import request
import RPi.GPIO as GPIO
import psutil
import os
ZB = ZeroBorg.ZeroBorg()                
ZB.Init()                               
ZB.ResetEpo()
app = Flask(__name__)

@app.route("/")
def hello():
	return render_template('index.html', cpuUsage=psutil.cpu_percent(interval=None), cpuTemp=int(float(getCPUtemperature())), rpiversion=GPIO.RPI_REVISION)
	
	
@app.route("/alive")
def alive():
    return "alive"


@app.route("/direction/Gauche")
def direction_gauche():
    ZB.SetMotor2(100)
    return "gauche"


@app.route("/direction/Droite")
def direction_droite():
    ZB.SetMotor2(-100)
    return "droite"


@app.route("/direction/Aucune")
def direction_aucune():
    ZB.SetMotor2(0)
    return "tout droit"

# Controle la puissance
@app.route("/power/")
def power(puissance):
    ZB.SetMotor3(float(puissance) / 100)
    return "Changement puissance"
	
def getCPUtemperature():
	res = os.popen('vcgencmd measure_temp').readline()
	return(res.replace("temp=","").replace("'C\n",""))
        return True
	

if __name__ == "__main__":
	app.run(host= '0.0.0.0', port=80, debug=True)

piborg's picture

It is hard to say given how old the RC car actually is, but I am guessing that the motors are beyond the specifications of the ZeroBorg.
In other words the 2A peak limit is probably being exceeded under harsh speed changes.
This will be especially true if you are changing the motor between full forward and full reverse instantly.

The reason you are having trouble will be due to the protection as expected.
It is actually protecting the board from damage as the motors try to draw too much power through the board.

What you can do is modify the motor settings you are using to allow the ZeroBorg to try its best instead of giving up.
To do this you need to run the motors below the 100% level, 99% will probably work in this case.

First change

ZB.SetMotor2(100)

to

ZB.SetMotor2(0.99)

Next change

ZB.SetMotor2(-100)

to

ZB.SetMotor2(-0.99)

Finally change

ZB.SetMotor3(float(puissance) / 100)

to

ZB.SetMotor3((float(puissance) / 100) * 0.99)

This should limit both motors to running at 99% maximum.
If this does not help try a smaller value, 0.95 for example.

As you are running over specification you may also find after running for a while the motors seem to slow down.
If the board feels warm this will likely be the protection reducing the power output to keep the board from getting too hot.

(Don't try this unless PiBorg say it is safe to try)

C̶o̶u̶l̶d̶ ̶t̶w̶o̶ ̶o̶f̶ ̶t̶h̶e̶ ̶o̶u̶t̶p̶u̶t̶s̶ ̶o̶f̶ ̶t̶h̶e̶ ̶m̶o̶t̶o̶r̶ ̶c̶o̶n̶t̶r̶o̶l̶l̶e̶r̶ ̶b̶e̶ ̶p̶u̶t̶ ̶i̶n̶ ̶p̶a̶r̶a̶l̶l̶e̶l̶ ̶t̶o̶ ̶d̶o̶u̶b̶l̶e̶ ̶t̶h̶e̶ ̶s̶a̶f̶e̶ ̶o̶u̶t̶p̶u̶t̶ ̶c̶u̶r̶r̶e̶n̶t̶?̶ ̶f̶r̶o̶m̶ ̶2̶A̶ ̶t̶o̶ ̶4̶A̶

̶I̶f̶ ̶i̶t̶ ̶i̶s̶ ̶p̶o̶s̶s̶i̶b̶l̶e̶ ̶y̶o̶u̶ ̶w̶o̶u̶l̶d̶ ̶n̶e̶e̶d̶ ̶t̶o̶ ̶b̶e̶ ̶1̶0̶0̶%̶ ̶s̶u̶r̶e̶ ̶t̶h̶a̶t̶ ̶b̶o̶t̶h̶ ̶o̶u̶t̶p̶u̶t̶s̶ ̶w̶e̶r̶e̶ ̶a̶l̶w̶a̶y̶s̶ ̶s̶e̶t̶ ̶t̶o̶ ̶t̶h̶e̶ ̶s̶a̶m̶e̶ ̶l̶e̶v̶e̶l̶ ̶a̶n̶d̶ ̶t̶h̶a̶t̶ ̶t̶h̶e̶y̶ ̶w̶e̶r̶e̶ ̶c̶h̶a̶n̶g̶e̶d̶ ̶a̶t̶ ̶e̶x̶a̶c̶t̶l̶y̶ ̶t̶h̶e̶ ̶s̶a̶m̶e̶ ̶t̶i̶m̶e̶.̶ ̶ ̶

Edit: Don't do this!

piborg's picture

We do NOT recommend doubling up the inputs.

While you are right in theory, the way the board is controlled means that the outputs cannot be changed at exactly the same time.

There is also only limited protection for dealing with reverse powering caused by timing differences.

Subscribe to Comments for "Can't go at full speed directly"