Piksi with raspberry pi B+

657 views
Skip to first unread message

rinex20

unread,
Feb 6, 2016, 9:40:42 AM2/6/16
to swiftnav-discuss
It is my Piksi,embedded with raspberry Pi.
It support bluetooth output NMEA data from UART B.

With 3G modem to access internet,download SBP raw data from caster server.

Now I could be working when I plug in power cable.

But now I can't run console on raspi.
Anyone have some experience with this issue?

 

awat...@swift-nav.com

unread,
Feb 12, 2016, 2:47:33 PM2/12/16
to swiftnav-discuss
Very cool setup you have built there.  

Could you tell us a bit more about what commands you're running on your RPi, and what errors you're getting?  Also what are you trying to accomplish with your RPi+Piksi -- to output the Piksi data to your 3G modem, or to import data from 3G to your Piksi?

I haven't personally experienced this problem running console on RPi, but I can help track down answers here at Swift.

Thx,
Andrew

Salil Goel

unread,
Mar 9, 2016, 1:01:53 AM3/9/16
to swiftnav-discuss
I had been trying to do a similar thing, i.e. RPi with Piksi. After spending hours, I managed to make console run on RPi.

The instructions i followed are mostly the same on the wiki page of swift nav except that i had to install three separate things to make the setup run smoothly. There are:
1. libffi-dev
2. libssl-dev
3. libyaml-dev

I found this solution after spending a lot of time searching on the internet. I'm posting it here hoping it might be of use to someone.


There is another problem I've been trying to solve and I've no idea. So, If i try to run console while Rpi is getting power directly from the mains through the micro-usb, for some reason Rpi shuts down as soon as i run the console. Well sometimes it works, but most of the times it shuts down. I've no idea why that is happening.

But instead of using power from mains, if i use a powerbank (https://www.jbhifi.com.au/phones/Phone-Accessories/cygnett/cygnett-4400mah-charge-up-sport-powerbank-black/520959/) to power my Rpi everything works perfectly.

Any ideas?

Thanks
Salil

Brice Thrower

unread,
Mar 9, 2016, 7:53:05 AM3/9/16
to swiftnav-discuss
Hello, I'm definitely no expert but I've using piksi with the raspberry pi 2 b+ for my senior project over the past two semesters. Bear with me here.

I might be able to relate to the amount of googling it's taken to get libsbp and the console set up on the rpi. Well, currently I only have libsbp on it. When I need the console I prefer to plug it into my laptop. But while building libsbp I have encountered a good few unlisted dependencies that were necessary to get everything working properly. Anyways, about the power issue..

I noticed that after a few times of running the example c code the piksi would disconnect after 5-10 seconds, sometimes it'd last longer. I noticed that when I took out my USB WiFi adapter the program would run much longer. I also noticed that if I plugged the piksi in my laptop, took it out of simulation mode, saved to flash, then put it back in sim mode it seemed to act healthier. I keep getting off track, back to power.
Yesterday after I got sick of googling, I read through the rpi documentation about power and the USB ports, and now all this weird behavior makes more sense.

In the power documentation they say the rpi uses 700-1000 mA by itself and the max it can use is 1000 mA, and anything that pushes the total out of this range needs to be connected via powered USB hub.

In the USB documentation they state "The USB ports on a Raspberry Pi have a design loading of 100mA each - sufficient to drive "low-power" devices such as mice and keyboards. Devices such as WiFi adapters, USB hard drives, USB pen drives all consume much more current and should be powered from an external hub with its own power supply. While it is possible to plug a 500mA device into a Pi and have it work with a sufficiently powerful supply, reliable operation is not guaranteed."

After I read all this I was curious as to how much power the piksi needs. According to the piksi documentation its "typically 500mW" which, after a quick calculation, seems a bit low. 500mW = 5V from usb * current. Current = 90.9 mA...

After I got sick of searching for the second time I pulled out a spare micro USB data Cable, cut it open (carefully) with a razor blade, found the red wire, cut it, stripped it, alligator clipped it, hooked it in line to my multimeter and did some tests and took some pictures. The current draw ranged from 185 mA running with or without sim mode on, to about 235 mA with the transmitter and ext antenna connected.

Here's links to the docs

Power Documentation
https://www.raspberrypi.org/documentation/hardware/raspberrypi/power/README.md

USB documentation
https://www.raspberrypi.org/documentation/hardware/raspberrypi/usb/README.md


Let me know if you want to know more about the unlisted dependencies I mentioned at the beginning. I hope something here may have helped you out. Best of luck

Clive Turvey

unread,
Mar 9, 2016, 11:59:48 AM3/9/16
to swiftnav-discuss
Ok, but what is the amperage/wattage rating for the mains supply? Using 2A supplies for RPi's here, it is not as if the RPi has to draw all of that, but if you have a 500mA supply the voltage will drop below 5V and even dramatically lower if the current drawn exceeds the capacity of the supply, and the voltage collapses. That you have 15-20A on the 110/220VAC side is some what irrelevant.

A lot of the "Juice-Box" battery packs here are rated for 1.5 - 2.1A, you'd need to review the labelling/specifications.

awat...@swift-nav.com

unread,
Mar 10, 2016, 2:26:05 PM3/10/16
to swiftnav-discuss
Brice do tell us more here about the unlisted dependencies you figured out.  I'd like to create a new Wiki page for http://docs.swiftnav.com/wiki/Main_Page about how to connect Raspberry Pi to Piksi.  I'll include what you figured out.

Salil too, if you have anything to add on top of what you mentioned before.

Salil Goel

unread,
Mar 10, 2016, 10:08:12 PM3/10/16
to swiftnav-discuss
I don't have anything else to add at the moment. As i mentioned earlier, I had been facing random shutdown of Rpi if it was connected to the mains directly. However it has been working perfectly if used with a powerbank. Not sure what goes wrong when Piksi is connected to Rpi while the power is supplied from the mains.

I've a couple of other sensors which i am using with Rpi and I am not facing any problem when they are connected to Rpi and power is supplied through mains. Only connecting piksi messes it up.

I must mention that the libraries i mentioned above are needed to get the console up and running on Rpi. As of now i am only interested in Rinex files and I am getting that via console. However i am still looking for a solution where i can log rinex files directly from the command line.

Cheers
Salil

Clive Turvey

unread,
Mar 11, 2016, 1:35:45 PM3/11/16
to swiftnav-discuss
Current requirements are cumulative, the Piksi and Radio will add significant additional burden, as will heavy processor utilization, review the current or power ratings of the mains power supply, on the 5V side

The use of powered hubs is also common in RPi applications due to the inherent limitations of the boards and supplies.

Clive Turvey

unread,
Mar 12, 2016, 9:43:15 AM3/12/16
to swiftnav-discuss
While I can see the cost appeal of the RPi's the size, power and weight requirements are a bit on the high side. We've taken a different tack with data recording and RINEX spidering, using custom software on small STM32 based boards. I should probably port my CORS-LITE platform to the RPi, but that is more tailored to generating hourly files, than flight logs.

There should be enough Python source related to the Console and RINEX logging, to fashion something that could be run from the command line. You'll likely have to commit your own time/resources to that end.

Salil Goel

unread,
Mar 15, 2016, 10:16:42 PM3/15/16
to swiftnav-discuss
Thanks clive! I'll probably try doing that!
Reply all
Reply to author
Forward
0 new messages