Installation Issues

Forums:

Post here for queries regarding setup problems.

We recommend you try using the troubleshooting instructions here first if you have not already.

Please try to list as much about the problem as you can (OS distribution, versions, motor setup et cetera), the more we know the easier it is to help :)

noxgenus's picture

Hi there, I've been using the Ultraborgs for a while now and they always work fine. But currently I'm having a problem with a Hitec HS 9380. It's a very high torque servo that needs a separate power supply because it can consume 2 amps on torque peaks. If I connect this to any standard or advanced RC receiver, the servo works great, even on an Adafruit PWM hat for the Pi2 it works, but not on the Ultraborg. All other analog or digital servo's work fine, Futuba based and Hitec based, except for this HS 9380. Do you perhaps have any idea why it doesn't work on the Ultraborg? Kinda lost here... Thanks!

piborg's picture

Well this is an odd problem, we tried a number of different servos but it looks like you may have found one that UltraBorg does not like.

I found this notice on the web regarding the HS 9XXX series servos:

June 2014: Brushless Servo Service Bulletin

While compatible with most radio control devices, the regenerative braking feature of the HSB-9XXX series servos may cause a problem if the device cannot accept a backflow of current. The types of devices that cannot accept this backflow are: Voltage Regulators, Power Safe Receivers and certain BEC circuits whether stand alone or integrated within an Electronic Speed Control. Check with the manufacturer or the Hitec website for a list of compatible models. If your device cannot accept a current backflow, then you must install a PAD (Power Absorbing Device - Hitec PN# 55756) as described in this manual. A PAD is included with every Hitec brushless servo.
Found here.

What happens when you try to use this servo, is there any movement at all?

noxgenus's picture

Hi, yeah baffles me too, I already installed the PAD according to specs, also checked for backflow current and that's all ok. Also works fine even with very old RX units currently. Also the PWM signal and everything else matches.

The only thing it does is power on and move to its center position, but it's powered externally so that doesn't have anything to do with the Ultraborg.

To be honest I have no clue why it's not moving, I was hoping you did...I really like the Ultraborg boards and I don't want to swap the hardware of two robots.

piborg's picture

How have you attached the power to the servo and the UltraBorg?

UltraBorg uses a pull-up resistor to the external 5V for the PWM signal.
If there is no power at all to the external 5V then there will be no PWM on the signal pins either.

noxgenus's picture

Ah that might explain it, didn't know there were pullup resistors used on the board. But I do wonder, since the servo can peak at 2A, can I power it through the Ultraborg?...I can't see anything about it in the specs. I'm using a powerful 10A 5V/6V BEC, if I would power the Ultraborg with that BEC, can the Ultraborg relay the full 10A through to the servo's? Or is there a limit?

I'll try this eve with the servo fully connected to the Ultraborg

piborg's picture

UltraBorg will be perfectly fine for servos drawing 10A in total from the power supply / BEC.
We think a cautious limit for the board would be 12A, but it would probably be happy as high as 15A between all four servos.

Sorry about the slow reply :)

Can someone please help me on the way in using the UltraBorg with Windows 10 IoT on my Raspberry Pi 2B, please?
I'm looking for an example on addressing the UltraBorg via C#.
I can already address the card through the I2C, but I'm having trouble with the rest of the communication. How can I read the HC-SR04 distance or command the connected servo? I think I'm missing a link for the different commands?
The board works with the python examples so the connections are ok, but I would like to use C#...
Thanks to anyone who can help me on the way :-)

piborg's picture

See reply on the separate thread here.

I have installed Ultraborg as per instructions. The Raspberry Pi is powered by a plugin power source. The Ultraborg is connect to the Raspberry Pi as instructed and the battery pack has been connected. The jumper has been removed.

Utraborg Tuning cannot be run from the desktop icon, it must be run from the ultraborg directory. Same for Demo GUI. Upon running from the directory I can tune the Ultraborg and was able to run the Demo GUI once.

I then get the following error upon trying to run it again as seen in the screen shot demo GUI.jpg (first image below).

Having read that this can occur when tuning has been done incorrectly, I attempted to re-tune. I get the error indicted in screen shot re-tune.jpj (second image below).

I have run through the entire trouble shooting routine to no avail.

If I reboot and try again, I can get the ability to tune, but the values are not held. Opening tuning again results in screen shot tuning.jpg (third image below). The values are changed as noted. If I reset them, I get random values again.

An i2c detect results in screen shot i2cdetect.jpg (last image below)

It should also be noted that while in the tuning routine, the values displayed constantly change, jumping about randomly.

I am using your full Ultraborg kit with your servos. I have not connected ultra-sonics yet.

PLease help.

Images: 
Attachments: 
piborg's picture

From what I can see there appears to be a problem talking from the Raspberry Pi to the UltraBorg.

In re-tune.jpg it finds the UltraBorg at address 0x36 as expected, but it saw a response of 0xCC instead of the expected 0x36.
In tuning.jpg the strange numbers are all the same: 52428, this is 0xCCCC in hexadecimal.

The reason I think this is a communications problem is that the UltraBorg sends 0xCC whenever the Raspberry Pi tries to read bytes past the end of the internal buffer.
This suggests that the UltraBorg missed the end-of-message signal at the end of a message and thinks the Raspberry Pi has asked for more data from the same message.

There are three likely candidates for the culprit:

  1. The wires between the Raspberry Pi and the UltraBorg
  2. The UltraBorg itself has some kind of connection fault
  3. The Raspberry Pi is not generating the correct I2C signals

I suspect the most likely cause to be the wires between the two boards.
If you have any replacements you can try it that would be the best starting point.
Alternatively you can try swapping the two 3-pin cables over and see if the behaviour changes.

Swapped wires out to new ones. Same behavior. I didn't mention before that I occasionally got a "save failed" error. Now I am getting that more consistently as can be seen in savedFailed.jpg below.

what is the next step?

Images: 

BTW, checked i2c on Raspberry Pi. All checks out and I have used another servo board with this Pi and have had no problems.

When save fails. I can retry several times to get a saved value, but the value always defaults to 52428. Upon closing tuning and opening again, several other values revert to 52428. You can see that in the last image uploaded above. Trying again, I get the error seen in the screen shot below.

Images: 
piborg's picture

Since changing the wires seems to have made things worse I think it just confirms that there is a problem communicating between the boards.

Are you able to take some photos of the UltraBorg and the connections between the boards?

Will do so in a bit. BTW, tried a different Raspberry Pi. Same behavior.

Three photos

Images: 

Just tested and Ultrasonics are working correctly. Apparently it is just the servos giving trouble.

deleted

Photos were uploaded on March 10 as requested. Awaiting a response.

piborg's picture

Sorry about the slow reply, from your earlier post regarding servos being the problem we thought you might have figured out what the issue is.

Given that this is a rather strange problem I think the easiest thing to do here is to sort out a replacement UltraBorg for you.

I will reply to your email with details about sending you a replacement board.

Thank you. Your help is appreciated. I have responded to your email. Will I receive notification of shipment?

piborg's picture

Yes, you will be notified by email when your replacement UltraBorg is shipped.

I have connected everything correctly. Nice click from servo when connected. However when I try to run software, like ubGui I get:

Loading UltraBorg on bus 1, address 36
Missing UltraBorg at 36
UltraBorg was not found
Trying bus 0 instead
Loading UltraBorg on bus 0, address 36
Traceback (most recent call last):
File "ubGui.py", line 11, in
UB.Init() # Set the board up (checks the board is connected)
File "/home/pi/ultraborg/UltraBorg.py", line 294, in Init
self.Init(False)
File "/home/pi/ultraborg/UltraBorg.py", line 264, in Init
self.bus = smbus.SMBus(self.busNumber)
IOError: [Errno 2] No such file or directory

Any idea what file of directory is missing?

Thanks,

piborg's picture

The error you are seeing means that the UltraBorg has not been found on the I2C pins.

Can you run this command in a terminal and show us the result:
sudo i2cdetect -y 1

i seem to be getting this exact issue, running sudo i2cdetect -y 0 gives file not found '/dev/i2c-0' or '/dev/i2c/0' but sudo i2cdetect -y 0 gives the below table:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- 36 -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --    

any ideas? ive had both ultra and pico running side by side for some time. today however its a no go.

piborg's picture

You seem to have made a typo above, which version of the command worked:

  • sudo i2cdetect -y 0
  • sudo i2cdetect -y 1

It would also help if you can show what the output is from the script you are trying to run so we can look at the exact error messages.

sorry, sudo i2cdetect -y 1 shows output.
This is running from any ultraborg related script, currently as im trying to get it working im just running the ./ubReadDistances.py script:

  File "./ubReadDistances.py", line 12, in 
    UB.Init()                       # Set the board up (checks the board is connected)
  File "/home/pi/JUNK/drive2/UltraBorg3.py", line 295, in Init
    self.Init(False)
  File "/home/pi/JUNK/drive2/UltraBorg3.py", line 265, in Init
    self.bus = smbus.SMBus(self.busNumber)
  FileNotFoundError: [Errno 2] No such file or directory
piborg's picture

The actual error is missing from that output, but I am guessing it is something like "file not found".

First I would double check the bus number in UltraBorg3.py.
You are looking for this line:

busNumber               = 1                 # Check here for Rev 1 vs Rev 2 and select the correct bus

Make sure the value is 1, not 0.

If that is right or changing it makes no difference then try running the script with sudo, e.g:
sudo ./ubReadDistances.py

ive checked busNumber and it is set to 1, tried running as sudo. same issue as before. i recently had camera issues and managed to resolve by doing sudo rpi-update i am aware this method is depreceated but rpi was asking for firmware update for the camera... could this of caused the issue?
$ uname -a
Linux pi-car 4.9.23-v7+ #989 SMP Wed Apr 19 15:29:25 BST 2017 armv7l GNU/Linux

piborg's picture

I presume you are seeing this error message somewhere in the output:

Found a device at 36, but it is not a UltraBorg (ID 00 instead of 36)

From what I can tell it looks like recent versions of the Linux kernel from rpi-update (after 4.4.X) have some trouble with the I2C driver. This causes the commands which read data to receive 0s instead of the real values.

Because the ID reads back the wrong value the code thinks it is talking to a different device and gives up with an error. Even if it ignored the problem any of the commands which read back values would get the wrong values anyway.

We found it can be fixed by setting the kernel to an older version, the most recent working one being 4.4.50. This can be done using rpi-update with the correct code for the 4.4.50 version:

sudo rpi-update 5224108

This version does work with both the new and old Pi cameras so everything should behave afterwards. You will want to reboot the Pi after running the command before checking if it has fixed the issue.

Seems to have fixed the issue, I now get a board detected and readings from sensors! If I get any more errors I'll let you know otherwise thanks alot guys!

Comment moved!

I keep getting an error when I try to launch either of the GUIs.
The error I get is: "UltraBorg was not found"
I have run a "UltraBorg.ScanForUltraBorg()" command and everything is fine, it correctly locates the board. But when I try to use the GUIs they don't work.
In addition, when I double- click on the GUI desktop icons, nothing happens.
Are there any suggestions?
Thanks

piborg's picture

What result did you get from running UltraBorg.ScanForUltraBorg() ?

Hi,

The result is attached in a photo:

Attachments: 

The Result form the Scan command is:

Scanning i2c Bus#1
UltraBorg found at 0A
1 UltraBorg board found
[10]

piborg's picture

It also looks like your UltraBorg is set to a non-default address.

You can set it back to the default by running these lines from python in the ~/ultraborg directory:

import UltraBorg
UltraBorg.SetNewAddress(0x36)

This will reset the board to the default address used by the examples and the GUIs should work :)

That has worked, the GUIs are now working
Thank you :)

Hi,
I have been having some trouble with calling commands from the UltraBorg.py file.
I have attached the code and the resulting error message when I try to call the function.

Any advice would be greatly appreciated.

Thank you in advance.

Images: 
piborg's picture

Hi Liam,

The problem is a mismatch with the import line. It should be in the same case:

import UltraBorg

Python is case-sensitive, so it is always worth checking names match exactly when you see a NameError :)

Hi,

Thank you for letting me know, it was such an obvious mistake on my part, I am now encountering a more puzzling issue.
Please see error message attached.
Thank you
Liam

Images: 
piborg's picture

That is very odd.

Can you run these lines in the shell:

import UltraBorg
for x in dir(UltraBorg): print(x)

You may have to press ENTER twice after the second line to make it run.

The output from the second line should be a long list of entries:

COMMAND_CALIBRATE_PWM1
COMMAND_CALIBRATE_PWM2
COMMAND_CALIBRATE_PWM3
COMMAND_CALIBRATE_PWM4
COMMAND_GET_FILTER_USM1
COMMAND_GET_FILTER_USM2
COMMAND_GET_FILTER_USM3
COMMAND_GET_FILTER_USM4
COMMAND_GET_ID
COMMAND_GET_PWM1
COMMAND_GET_PWM2
COMMAND_GET_PWM3
COMMAND_GET_PWM4
COMMAND_GET_PWM_BOOT_1
COMMAND_GET_PWM_BOOT_2
COMMAND_GET_PWM_BOOT_3
COMMAND_GET_PWM_BOOT_4
COMMAND_GET_PWM_MAX_1
COMMAND_GET_PWM_MAX_2
COMMAND_GET_PWM_MAX_3
COMMAND_GET_PWM_MAX_4
COMMAND_GET_PWM_MIN_1
COMMAND_GET_PWM_MIN_2
COMMAND_GET_PWM_MIN_3
COMMAND_GET_PWM_MIN_4
COMMAND_GET_TIME_USM1
COMMAND_GET_TIME_USM2
COMMAND_GET_TIME_USM3
COMMAND_GET_TIME_USM4
COMMAND_SET_I2C_ADD
COMMAND_SET_PWM1
COMMAND_SET_PWM2
COMMAND_SET_PWM3
COMMAND_SET_PWM4
COMMAND_SET_PWM_BOOT_1
COMMAND_SET_PWM_BOOT_2
COMMAND_SET_PWM_BOOT_3
COMMAND_SET_PWM_BOOT_4
COMMAND_SET_PWM_MAX_1
COMMAND_SET_PWM_MAX_2
COMMAND_SET_PWM_MAX_3
COMMAND_SET_PWM_MAX_4
COMMAND_SET_PWM_MIN_1
COMMAND_SET_PWM_MIN_2
COMMAND_SET_PWM_MIN_3
COMMAND_SET_PWM_MIN_4
COMMAND_VALUE_FWD
COMMAND_VALUE_OFF
COMMAND_VALUE_ON
COMMAND_VALUE_REV
DELAY_AFTER_EEPROM
I2C_ID_SERVO_USM
I2C_MAX_LEN
I2C_SLAVE
PWM_MAX
PWM_MIN
PWM_UNSET
ScanForUltraBorg
SetNewAddress
USM_US_TO_MM
UltraBorg
__builtins__
__doc__
__file__
__name__
__package__
fcntl
io
time
types

Hi,
I added the commands and get the same output

Images: 
piborg's picture

In the last test you ran the commands from ~/ultraborg.

Have you tried moving your import attempt.py script into ~/ultraborg and running it from there?

Hi,
I tried moving the import attempt.py file into ultraborg as you said. It now seems that the UltraBorg.py file is now being invoked, however there is a point where there is a syntax error with regard to the UltraBorg.py file.

I have not edited this UltraBorg.py file. So I do not know why this error is occurring. Screenshot attached.

Images: 
piborg's picture

The problem here is that the standard copy of UltraBorg.py only works with Python 2. You are using Python 3, so a different version of the script is needed.

You can download the Python 3 version using these commands:

cd ~/ultraborg
wget -O UltraBorg3.py http://piborg.org/downloads/ultraborg/UltraBorg3.py.txt

To use this version you will need to change the import statement slightly to

import UltraBorg3 as UltraBorg

Then you can use it normally.

Sorry about the 20 questions!

But I have downloaded the UltraBorg3.py file but am still getting a module error.
I have confirmed that the UltraBorg3.py.txt file is in the same file directory as the other UltraBorg files and the working directory of the "import attempt.py" file I am working from. But there is still an error.

Do you know why this might be?

Images: 
piborg's picture

No problem, this one is simple to fix :)

The file needs to be renamed to UltraBorg3.py for Python to find it. Remove the .txt from the end of the file name and it should work.

Hi,

Just to say it's working fine now. Thanks very much for all your help!

Hi, I just bought an ultraborg, and i have installed the Ultraborg GUI's on my Raspberry Pi 3B+, running Raspberry Pi OS Bullseye. When I click on the Desktop icons, they don't open the GUIs. Can anyone help? I have tried running ubTuningGui.py in the terminal and Thonny Python IDE and it says that there is a syntax error. also asking whether it is possible to run a TowerPro SG92R micro servo straight off the ultraborg, powered only by the RPi GPIO?

Pages

Subscribe to Comments for "Installation Issues"