Installation Issues

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 :)

piborg's picture

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

After the other changes run these lines from python:

import PicoBorgRev
PicoBorgRev.SetNewAddress(0x44)

This will reset the board to the default address used by the examples.

Everything works now, thank you so much for your help

Hello!

I'm not getting any power through the battery pack to my Raspberry Pi when I plug it all in. I've checked the wires connecting from the BattBorg aren't shorting on the motors, and checked all the other instructions around the power multiple times without any luck.

Does anyone have any good tips or problems they've ran into that cause the Rpi to not even power up(No red light?)

Got it! No clue what was malfunctioning, but after replacing the batteries it worked.

At first i have connected the picoBorg reverse on rapsberry pi 2 as instructed from the tutorial on your website but the red light did not light up.

Then i continued with the commands listed in the image called pico1.png i got the error shown in the image.

After that i requested the troubleshooting tab for help and i went to the point that mentions the IOError: " [Errno 2] No such file or directory " and to solve this error i have changed the line in PicoBorgRev.py file
the busNumber = 0 in line 194.

Then i executed the command as follow in the image called pico 2.png. As you can see i get the same errors.

What is causing this problem?

Images: 
Attachments: 
piborg's picture

The problem is most likely to be cabling.

What results do you get from these commands:

  1. sudo i2cdetect -y 0
  2. sudo i2cdetect -y 1

Hi, i've had a problem with my picoborg reverse. When I try to run an example program, the following error occurs:

pi@raspberrypi:~/picoborgrev $ ./pbrGui.py
Loading PicoBorg Reverse on bus 1, address 44
Missing PicoBorg Reverse at 44
PicoBorg Reverse was not found
Trying bus 0 instead
Loading PicoBorg Reverse on bus 0, address 44
Traceback (most recent call last):
File "./pbrGui.py", line 11, in
PBR.Init() # Set the board up (checks the board is connected)
File "/home/pi/picoborgrev/PicoBorgRev.py", line 264, in Init
self.Init(False)
File "/home/pi/picoborgrev/PicoBorgRev.py", line 234, in Init
self.bus = smbus.SMBus(self.busNumber)
IOError: [Errno 2] No such file or directory

This are the returns of lsmod and ls /dev :

pi@raspberrypi:~/picoborgrev $ lsmod
Module Size Used by
bnep 10340 2
hci_uart 17943 1
btbcm 5929 1 hci_uart
bluetooth 326105 22 bnep,btbcm,hci_uart
brcmfmac 186339 0
brcmutil 5661 1 brcmfmac
joydev 9024 0
evdev 11396 8
cfg80211 427855 1 brcmfmac
rfkill 16037 4 cfg80211,bluetooth
snd_bcm2835 20447 1
snd_pcm 75762 1 snd_bcm2835
snd_timer 19288 1 snd_pcm
snd 51908 5 snd_bcm2835,snd_timer,snd_pcm
bcm2835_gpiomem 3040 0
bcm2835_wdt 3225 0
uio_pdrv_genirq 3164 0
uio 8000 1 uio_pdrv_genirq
i2c_bcm2708 4834 0
i2c_dev 5859 0

fuse 83653 3
ipv6 347466 46

pi@raspberrypi:~/picoborgrev $ ls /dev
autofs loop4 ram15 tty18 tty44 urandom
block loop5 ram2 tty19 tty45 usb
btrfs-control loop6 ram3 tty2 tty46 vc-cma
bus loop7 ram4 tty20 tty47 vchiq
cachefiles loop-control ram5 tty21 tty48 vcio
char mapper ram6 tty22 tty49 vc-mem
console mem ram7 tty23 tty5 vcs
cpu_dma_latency memory_bandwidth ram8 tty24 tty50 vcs1
cuse mmcblk0 ram9 tty25 tty51 vcs2
disk mmcblk0p1 random tty26 tty52 vcs3
fb0 mmcblk0p2 raw tty27 tty53 vcs4
fd mmcblk0p5 rfkill tty28 tty54 vcs5
full mmcblk0p6 serial1 tty29 tty55 vcs6
fuse mmcblk0p7 shm tty3 tty56 vcs7
gpiomem mqueue snd tty30 tty57 vcsa
hidraw0 net stderr tty31 tty58 vcsa1
hidraw1 network_latency stdin tty32 tty59 vcsa2
hidraw2 network_throughput stdout tty33 tty6 vcsa3
hidraw3 null tty tty34 tty60 vcsa4
hwrng ppp tty0 tty35 tty61 vcsa5
i2c-1 ptmx tty1 tty36 tty62 vcsa6
initctl pts tty10 tty37 tty63 vcsa7
input ram0 tty11 tty38 tty7 vcsm
kmsg ram1 tty12 tty39 tty8 vhci
log ram10 tty13 tty4 tty9 watchdog
loop0 ram11 tty14 tty40 ttyAMA0 watchdog0
loop1 ram12 tty15 tty41 ttyprintk xconsole
loop2 ram13 tty16 tty42 uhid zero
loop3 ram14 tty17 tty43 uinput

ls /dev lists only i2c-1, not i2c-0. I've tried changing the busNumber on line 194 of PicoBorgRev.py to 0, and all it did was delete the
"Loading PicoBorg Reverse on bus 1, address 44
Missing PicoBorg Reverse at 44
PicoBorg Reverse was not found
Trying bus 0 instead"
I also enabled i2c via the sudo raspi-config command.
I had 1 extra cable, so I switched them both out and tried to run the script after each one got replaced.
Maybe they were both broken?
My guess is that it tries i2c-0, but that is not listed in ls /dev ?

Please help me fix this :,(

P.S.
sudo i2cdetect -y 0
Outputs "Error: Could not open file '/dev/i2c-0' or '/dev/i2c/0': No such file or directory."

sudo i2cdetect -y 1
Outputs

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

piborg's picture

Hi Rick,

The script definitely wants to have busNumber set to 1 in your case (i.e. use i2c-1).

The most likely explanation is that the cables are not making a good connection on the I2C lines.

We have a few questions for you to help us diagnose the problem:

  1. Does the LED on the PicoBorg Reverse light up briefly when power is first connected to the Raspberry Pi?
  2. Is anything else connected to the GPIO on the Raspberry Pi?
  3. Can you take some pictures of the wiring between the Raspberry Pi and the PicoBorg Reverse?

1. The LED does briefly light up once. After that it stays out.
2. Nothing else is connected to the Pi's GPIO.
3. I've added 3 pictures, the first two are with the original cables, and the last one is the setup I tried last, with all new individual cables (I didn't have female-female so i soldered two male-female cables together).

Thanks for the reply :)

Images: 
piborg's picture

The wiring all looks correct, the problem seems like the I2C signals are not getting to the PicoBorg Reverse.

The brief LED blink is a good sign, it means the PicoBorg Reverse is getting power from the Raspberry Pi and the on-board code is running.

There are two likely explanations at this point:

  1. The wiring is not making a good connection on either pin 3 or pin 5
  2. One of the two boards has faulty I2C pins

I would suggest we try and use WiringPi to see if the Pi has faulty GPIO pins.

First disconnect all of the wires from the GPIO.

Next download and build the WiringPi code:

cd ~
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build

After it has built run the GPIO pin tester:

~/wiringPi/gpio/pintest

You should see some diagnostics after pressing ENTER:

PinTest
=======

This is a simple utility to test the GPIO pins on your Raspberry Pi.

NOTE: All GPIO peripherals must be removed to perform this test. This
  includes serial, I2C and SPI connections. You may get incorrect results
  if something is connected and it interferes with the test.

This test can only test the input side of things. It uses the internal
pull-up and pull-down resistors to simulate inputs. It does not test
the output drivers.

You will need to reboot your Pi after this test if you wish to use the
serial port as it will be left in GPIO mode rather than serial mode.

This test only tests the original pins present on the Rev A and B. It
does not test the extra pins on the Revision A2, B2 nor the A+ or B+

Please make sure everything is removed and press the ENTER key to continue,
or Control-C to abort...

          The main 8 GPIO pins  0: 7:  OK
                The 5 SPI pins 10:14:  OK
               The serial pins 15:16:  OK
                  The I2C pins  8: 9:  OK

Hopefully all of the end lines say OK, otherwise the GPIO is not working correctly on the Raspberry Pi itself.

After the test restart the Raspberry Pi to reset the GPIO pins back to their standard behavior.

I did test the Pi's GPIO pins, and it said "OK" on every one of the last lines. The cables won't go further onto the pins , and since i swapped them out I think they're also not broken. So should I return my PicoBorg Reverse then?

Thanks for the help!

piborg's picture

Not a problem, you can return the PicoBorg Reverse to us and we will investigate what is wrong with it.
If you could put a note in with the board explaining why it is being returned and where to send it back to when fixed.

One last suggestion before you make the return, do you have any other board that you could check the I2C on the Raspberry Pi with?

I unfortunately do not have another board. I've bought this one at modmypi.com, so I'll probably have to return it there and I'll link this conversation to them so they can see the problem.

Again thanks for all the help!

piborg's picture

You can return the PicoBorg Reverse directly to us :)

The address to send the board back to is:

Freeburn Robotics Limited
Unit 15, Earith Business Park
Meadow Drove
Earith
Huntingdon
Cambridgeshire
PE28 3QF
United Kingdom

Remember to include your return address as well.

piborg's picture

Hi Rick,

The board you returned is definitely faulty, it seems like there is a problem with the on-board logic chip.
We are going to attempt to repair the board, I will let you know when we have a working board for you.

Sorry about the long wait,
PiBorg.

Thanks a lot! :)

piborg's picture

It turns out we do not have the required parts to repair your board, instead we will send you out a replacement.

The new board has just been fully checked and is functioning correctly.
We will send the new board back to you in our next mail drop, probably tomorrow morning.

Hello me and a friend are doing an excercise for school using raspberry pi3 + picoborg reverse, now the motor works but we have a problem with the ampere, we supply 24v but the ampere that reach the motor are 7+ while it should work with 1.2A max, is there a way to set the picoborg that give only a determined amount of amperes or we need another power supplier ?
this is the type of the motor RTA103-H5208-0483

piborg's picture

You can limit the current to the stepper by reducing the power output from the PicoBorg Reverse.
I have attached an improved version of the standard stepper script which will make this easier.

What you want to do is use this new script and reduce the values maxPower and holdingPower.
maxPower is the power used when the stepper is in motion.
holdingPower is the power used when the stepper has stopped.

Typically holdingPower wants to be lower than maxPower as the stepper needs less power to hold a position than to rotate.

Attachments: 

Hi

I am trying to setup my PicoBorg Reverse board for a new project and get an error when running

wget http://www.piborg.org/downloads/picoborgrev/examples.zip

Looks like the path is not valid, see image.

Cheers
Stuart

Images: 
piborg's picture

The command and address are definitely correct, I have just checked the command myself (see below).

The error you are getting is:
wget: unable to resolve host address
This usually points to a problem with the internet connection from the Raspberry Pi.

What result do you get from this command:
ping www.piborg.org -c 4

Images: 

I am a complete noob to this, so please excuse my ignorance....
I have just purchased a diddyborg. When following the getting started instructions, I try to run (basically any of the) code and I keep getting:
bash: cd: No such file or directory
I have tried the troubeshooting page and several forums, but no cigar??
Any help would be appreciated,
Thanks,

piborg's picture

No worries about being new to this, we all have to start somewhere :)

Have you run the installation commands for both the PicoBorg Reverse as the DiddyBorg software yet?

The two commands are:

bash <(curl https://www.piborg.org/install-picoborgrev.txt)
bash <(curl https://www.piborg.org/install-diddyborg.txt)

Make sure you type the correct symbols for <, ( and ) as Linux is rather picky about the characters used.

We have seen some people struggle here as the keyboard symbols may not match the symbols on screen, in this case the symbols on screen are the important ones.

Hi,

I just received a PicoBorg Reverse I ordered from https://www.piborg.org/ (ordered as guest).

I have been surprised to see it not working, since I've been cautious about electrical discharges and plugging errors.

The PicoBorg LED is off.
I never plugged any battery or actuator yet. (I wanted to make the I2C part work before plugging anything to it)

Here are the logs:

$ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 
$ i2cdump -y 1 0x44
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

This last log shows the Picoborg does not return anything via I2C (not even its ID).

I'm certain about bus 1, since 0x44 disappears if I unplug the PicoBorg.
I'm using Raspbian Stretch. I tried the same commands on another Raspberry, same output. -> not the raspberry.

I even tried to change the cables with new ones -> same problem.

piborg's picture

We have never tried using i2cdump, but I suspect the I2C signals do not match the format used by our library.

Have you tried using the provided Python library?

Start by running Python from the directory the library was installed to:

cd ~/picoborgrev
python

Next run these commands in Python to connect to the PicoBorg Reverse:

import PicoBorgRev
PBR = PicoBorgRev.PicoBorgRev()
PBR.Init()
print PBR.foundChip

If the final line prints True then the library successfully read the correct ID from the PicoBorg Reverse.

Actually it was because the library did not work that I tried to access the peripheral using I2C.

Here is the library-way output:

>>> PBR.Init()
Loading PicoBorg Reverse on bus 1, address 44
Found a device at 44, but it is not a PicoBorg Reverse (ID 00 instead of 15)
PicoBorg Reverse was not found
Trying bus 0 instead
Loading PicoBorg Reverse on bus 0, address 44
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/pi/PicoBorgRev.py", line 264, in Init
    self.Init(False)
  File "/home/pi/PicoBorgRev.py", line 234, in Init
    self.bus = smbus.SMBus(self.busNumber)
FileNotFoundError: [Errno 2] No such file or directory

ID 0x00 is confirmed when trying to access address 0x99 manually:

$ i2cget -y 1 0x44 0x99
0x00

Shall have returned 0x0F

piborg's picture

The output from i2cget is misleading, it does not work with our boards. Put simply it tries to read data back in a different way to the library.

Based on the error it looks like you are using an old version of the PicoBorg Reverse library. This has a known problem with recent copies of Raspbian causing all reads to return either 00 or FF.

This can be fixed by downloading the latest version of the PicoBorg Reverse code:

cd ~
mv picoborgrev picoborgrev-old
bash <(curl https://www.piborg.org/installer/install-picoborgrev.txt)

You are right, I was using a former version of the library.
This old version used SMBus to communicate with the PicoBorg Reverse.

SMBus has been updated. New versions of SMBus seem not to work anymore with PicoBorg Reverse!
This explains why i2cget command doesn't work.

In your new library, you re-code I2C parts by converting data to bytes then writing them directly to io files symbolizing i2C bus instead of using SMBus.

Now my new PicoBorg Reverse works, and the one I had before works too! (it had the same issue)
Thanks

When has SMBus been updated?

piborg's picture

I am not sure exactly when they updated SMBus. I know we changed our library over a year ago to work around the issue.

What's the latest on python3 smbus compatibility? I've been following the installation instructions up until the second part of comment 379 (http://forum.piborg.org/comment/379#comment-379). I checked and my installed version of smbus (4.1-1) seems to be Python3 compliant. Will the latest smbus work without modification?

piborg's picture

We have moved away from the smbus library, the PicoBorg Reverse code no longer requires it.

There is a Python 3 version of the new library available, I have attached it and the new examples.

Attachments: 

Pages

Subscribe to Comments for &quot;Installation Issues&quot;