Rasberry Pi and other electronic things

Thanks very much for those detailed descriptions; I understand a lot more now and am in a position to delve in.
Happy Christmas.

The cheapest way to get going with embedded is one of the STM32F Discovery boards and the free Coocox development suite. These are mid range embedded devices, on a level with a top end Arduino. You can run a small OS on them like FreeRTOS or the tiny CooOs. A board is less than £10 from Farnell and includes an on-board JTAG - all you need is a USB cable. There is less of a community than there is behind Arduinos or RPis because they are not intended for education or learning, but the ST interface library is the best in the business and makes it all a lot easier.
 
The downside of that is that where precise timing is important things get complicated with the pi. Your program running on the arduino (which is the only thing running on that hardware) can respond almost the moment the voltage changes across a pair of pins. On the pi, that change may occur when the operating system (which really runs the show) is doing other things, so you can't say exactly when your pi program will respond (it's usually after a few milliseconds but exactly when is not certain).

that comes home to roost when decoding SSB wefax; the chart tends to skew at different rates.

Doing a whole load of things other than the single task you want it for, means there's more possible things to go wrong with the pi, and although I haven't seen the figures, I would imagine the pi would be more power hungry.

The operating system is very stable, there's not much to go wrong there.
The Pis are very reliable. We use four Pis at work in a global operations centre; they are continually polling databases and displaying results on large HD monitors .. they've been running 24x7 for more than a year with no problems.

Power-wise, the Pi's pretty frugal, especially compared to a laptop. I'll leave my Pi running overnight on the on the boat overnight without hesitation, but not my laptop.


Alisdair has documented several things and has got OpenCPN running on it (though IMHO it's not exactly snappy on the pi).

sailing at 4 kts it doesn't need to be snappy, and I don't watch it continually, so it's perfect as a reference

Other people have looked at things like using it as an AIS receiver using a software defined radio (ie tv receiver dongle tuned to receive AIS) though with current software implementations that's pushing the limits of the oomph the little thing has available for signal processing.

I haven't cracked the AIS bit, but ADS-B is great (think of it as AIS for aircraft).
 
We have a RPi on the boat. Please don't ask me how it works.........but this is what it does;

1. Our AIS transponder is connected to it. The RPi is then connected to a wifi unit. The wifi unit "broadcasts" the AIS data and is picked up on an I Pad ( or any other wifi smart phone or laptop ). This data is then overlaid on the INavx charts already downloaded onto the I-Pad. So, what you get on the screen of the I-Pad is all your AIS data including your own position, overlaid on the chart. Touching any AIS target throws up a box with all of the data relating to that ship, incl CPA.

2. The RPi is also connected to the sea talk network. It sends all of this data to the wifi unit and is viewed on the I- Pad via a web page.

3. The RPi records all of the position information received from the AIS unit so all position, course, speed etc info can subsequently be recalled.

4. The track you have sailed is also displayed on the chart on the I - Pad.


This was all made and installed by a friend who is a whizz with all this software stuff. He did it for fun and out of kindness. It's not available commercially at all. Please don't ask me how it works, as I have no idea.

What I can say is its FAB! :D. I think I am a very luck boy to have this on the boat!
 
Power-wise, the Pi's pretty frugal, especially compared to a laptop.

Compared to a laptop, yes, frugal. But it's all relative. For very small simple tasks that run continuously (like many of the YAPPs do), they are power gluttons which is why I don't use them, a question I am often asked. For example, for NMEA183 multiplexing as mentioned somewhere in this thread they would be a poor choice power consumption wise. I can get power down to a few milliamps, and sometimes even microamps. But as I posted earlier, for embedded, decide what you want to do and then choose appropriate hardware.
 
The operating system is very stable, there's not much to go wrong there.
Largely yes but I've experienced several hangs. I suspect the majority of these were not actually OS but USB microcode related. The general point though is that, microcode aside, an entire OS + user program will have more things to go wrong than the program you might write for a microcontroller.

Power-wise, the Pi's pretty frugal, especially compared to a laptop.
Agree (I'm on team pi too, remember :-). It might not be as good as an arduino or similar though (and I confess I haven't got the figures for the latter) which was the comparison I'm making.

sailing at 4 kts it doesn't need to be snappy, and I don't watch it continually, so it's perfect as a reference

Fair call and TBH I don't personally use a computer for navigation, more for planning which involves a lot of screen movement and "what if"s and I wasn't finding the pi as usable as a laptop for that. If I was going to be doing electronic nav I'd probably also be wanting to use AIS overlays. Haven't tested that with opencpn on pi, but having the mast up again as of last week I can investigate more next week.
 
Largely yes but I've experienced several hangs. I suspect the majority of these were not actually OS but USB microcode related.

Networking on the Pi is a real kludge, because they hang their ethernet on a USB-ethernet converter which is slow, unreliable and uses an awful lot of CPU cycles and therefore power.
 
fldigi. It was fun trying though, and it's OK for NAVTEX on the rare occasions I can get a signal.
Was a while ago, haven't touch the pi for a while.
Have you played around with the konni logbook Opencpn plugin yet?
I think that would be a nice use for a Pi, auto log entries with lat, long, speed & cog every hour. Plus weather etc if you get round to doing it manually.
Though Istr the date/time format was a bit weird under Linux.
Great plugin all round though, all the boat data is slowly migrating on there
 
Networking on the Pi is a real kludge, because they hang their ethernet on a USB-ethernet converter which is slow, unreliable and uses an awful lot of CPU cycles and therefore power.

Agree that there's been issues with USB on the pi and my choice would be to have a proper ethernet controller, but it was built down to a price for a specific purpose. It's not intended to have any mad network performance. Is it perfectly adequate for the types of things we want to do on a boat (like sending data from serial lines out on the network)? I think so. Punting AIS, GPS and assorted other NMEA data over the network my pi is on little more than tickover: A tiny weeny fraction of the cycles a browser would take. Is the linux network stack itself a kludge? Well YMMV on that but it seems to do what I expect of it, which is an order of magnitude more than anything any of the commercial "marine" serial to network converters can do.

for NMEA183 multiplexing as mentioned somewhere in this thread they would be a poor choice power consumption wise.

Power-wise, compared with a microcontroller solution for simple serial multiplexing, certainly. However is the pi an all-round bad idea as a multiplexer? Not in other respects. I'll suggest that many people have a few hundred milliamps to spare. As a programmer with a pi I can leverage a POSIXy API to do all kinds of network-fu and high-level logic which would be, well, harder, with a microcontroller (feel free to pick me up on this because I don't really know much about microcontroller programming :-) and have it compile and run just as well on laptops running linux or MacOS. More to the point, your pi doesn't necessarily have to be a one trick pony: It can be doing other stuff (like being an access point, running a chartplotter program, randomly flashing lights for no particular reason) too. I suspect there's a number of users who simply feel comfortable installing and configuring a software package but might be a bit intimidated by microcontrollers. For sure you are right about choosing the right tool for the job but I suspect many of us use multi-tools for jobs around the boat when a specific single-purpose tool would be both cheaper and more efficient. For me, I'm just more at home with a linux computer but will quite happily admit to the many occasions when a microcontroller solution would be the more appropriate choice (we already mentioned writing seatalk for example). A pi-based multiplexer is possibly the better choice if you also want it to log lat, long, sog, cog and wind to a file every hour :-)
 
I'll suggest that many people have a few hundred milliamps to spare.

I'd say you are right. However, my choices are influenced by the power availability on my boat, which being outboard powered, is not great. Therefore I always look for the lowest power consumption, and Microchip PICs lead the way in processors at the microamp level. So if I wanted to log every hour, I still wouldn't use a RPi. But each to their own. I'm not criticising your choice. It's only a bit of techno-fun.
 
Usual techno bitchiness going on I see.

Pi is a cheap computer aimed at getting something into every parents budgets that will stimulate youngsters to discover programming. It has worked very well at this.

It's doing 1000 things that were probably never envisioned. Certainly running vector graphics with charts on a seagoing vessel will have been at the far end of the envelope of applications. it's also doing things that barely require a 'computer' but it has got people into programming that would never have tried it before.

The very fact that it has been taken up in incredible numbers by 'serious amateurs' is an indication of it's success.

'This is better than that' is just pointless!

Bon Noel you grumpy old lot!
 
Last edited:
I have just - ie in the past thirty minutes - been given a Beaglebone Black to play with. My very first impressions are favourable.

A wee update ... I've had time to fiddle with the BeagleBone more, and now have Ubuntu running on it very nicely, with LXDE as the desktop and tightvncserver to let me run it from my desktop machine. One nice difference from the Raspberry Pi is that it has 2GB of flash rom on board, so the OS doesn't have to live on an SD card, though you can boot from a card if you want.
 
A wee update ... I've had time to fiddle with the BeagleBone more, and now have Ubuntu running on it very nicely, with LXDE as the desktop and tightvncserver to let me run it from my desktop machine. One nice difference from the Raspberry Pi is that it has 2GB of flash rom on board, so the OS doesn't have to live on an SD card, though you can boot from a card if you want.

I have read this post very carefully several times and I still don't know what it means!
 
I have read this post very carefully several times and I still don't know what it means!

I have been given a BeagleBone, which is similar to the Raspberry Pi though a bit more powerful. I have successfully installed Ubuntu Linux on and, and since the distribution I used was command line only I added the Lightweight X11 Desktop Environment (LXDE) to get a graphical user interface. I haven't connected it to a monitor; instead I also installed the tightvnc version of a Virtual Network Computing (VNC) server which lets me view its output as a window on my dekstop. Unlike the Rasperry Pi, which uses a Secure Digital (SD) card for storage, the BeagleBone includes some memory to which the operating system can be written. Booting from an alternative operating system on an SD card is also possible.

Or

I have the wee computer running a version of Linux and appearing as a window on my desktop.
 
I have been given a BeagleBone, which is similar to the Raspberry Pi though a bit more powerful. I have successfully installed Ubuntu Linux on and, and since the distribution I used was command line only I added the Lightweight X11 Desktop Environment (LXDE) to get a graphical user interface. I haven't connected it to a monitor; instead I also installed the tightvnc version of a Virtual Network Computing (VNC) server which lets me view its output as a window on my dekstop. Unlike the Rasperry Pi, which uses a Secure Digital (SD) card for storage, the BeagleBone includes some memory to which the operating system can be written. Booting from an alternative operating system on an SD card is also possible.

Or

I have the wee computer running a version of Linux and appearing as a window on my desktop.

Thank you JumbleDuck. I nearly understand your first very clear explanation and I certainly understand your second one !
 
Top