mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Blogorrhea > jvang

Reply
 
Thread Tools
Old 2018-12-26, 01:57   #1
jvang
veganjoy
 
jvang's Avatar
 
"Joey"
Nov 2015
Middle of Nowhere,AR

3×5×29 Posts
Default Raspberry Pi Experiments and Projects

As mentioned in the other blog post, I now have a Raspberry Pi 3B+. My dad has suggested making a server out of it, and he’ll help me figure out port forwarding to make it accessible from outside our local network. Its main features are a 1.4 GHz quad core processor and wireless capabilities (dual band wireless LAN and Bluetooth 4.2). In addition to servers, I’ve seen people use Pis in robots and smart appliances (connect to Amazon's Alexa service or the Google equivalent). What other cool things have you seen done with a Raspberry Pi that would be worth trying out?

I took a quick look at the official Raspberry Pi magazine, and in a section on add-ons to Pis, there’s a neat device called a Hologram Nova. It’s a little chip on a USB connection that you plug into your Pi. It allows the Pi to access cellular networks in the absence of WiFi/Ethernet access. If you were doing something relatively crazy with a Raspberry Pi (trailblazing robots or something) then that would be pretty handy!

They call certain Pi add-ons HATs, which sit on top of a full sized Pi and connect to its various parts. One of these is a Cluster HAT, which would sit on top of the main, full size Pi. It can then connect to 4 Pi Zeros that attach directly to the HAT which connects directly to the main Pi's motherboard. This would be a pretty big boost to the Pi's distributed processing power!

There’s also a HAT specifically for the Pi 3B+ that allows it to be powered over an Ethernet cable...? How’s that work, and why would you want to do that? (As opposed to normal power solutions)
jvang is offline   Reply With Quote
Old 2018-12-26, 02:07   #2
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

8,369 Posts
Default

Quote:
Originally Posted by jvang View Post
As mentioned in the other blog post, I now have a Raspberry Pi 3B+. My dad has suggested making a server out of it, and he’ll help me figure out port forwarding to make it accessible from outside our local network. Its main features are a 1.4 GHz quad core processor and wireless capabilities (dual band wireless LAN and Bluetooth 4.2). In addition to servers, I’ve seen people use Pis in robots and smart appliances (connect to Amazon's Alexa service or the Google equivalent). What other cool things have you seen done with a Raspberry Pi that would be worth trying out?

I took a quick look at the official Raspberry Pi magazine, and in a section on add-ons to Pis, there’s a neat device called a Hologram Nova. It’s a little chip on a USB connection that you plug into your Pi. It allows the Pi to access cellular networks in the absence of WiFi/Ethernet access. If you were doing something relatively crazy with a Raspberry Pi (trailblazing robots or something) then that would be pretty handy!

They call certain Pi add-ons HATs, which sit on top of a full sized Pi and connect to its various parts. One of these is a Cluster HAT, which would sit on top of the main, full size Pi. It can then connect to 4 Pi Zeros that attach directly to the HAT which connects directly to the main Pi's motherboard. This would be a pretty big boost to the Pi's distributed processing power!

There’s also a HAT specifically for the Pi 3B+ that allows it to be powered over an Ethernet cable...? How’s that work, and why would you want to do that? (As opposed to normal power solutions)
https://en.m.wikipedia.org/wiki/Power_over_Ethernet came up on Google.
science_man_88 is offline   Reply With Quote
Old 2018-12-26, 02:45   #3
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

886310 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
Basically the inverse of the X10 system https://en.wikipedia.org/wiki/X10_(industry_standard)
Uncwilly is offline   Reply With Quote
Old 2018-12-26, 09:28   #4
Nick
 
Nick's Avatar
 
Dec 2012
The Netherlands

101110101102 Posts
Default

Quote:
Originally Posted by jvang View Post
What other cool things have you seen done with a Raspberry Pi that would be worth trying out?
Up until about 10 years ago, every PC had a serial port (also known as a COM port).
The great thing about these was that the signalling was simple enough for you to connect
your own electronic circuits directly to the computer without too much trouble.

Now that PCs use USB ports instead, connecting basic electronics to the computer is harder.
But on the Raspberry Pi it is still easy!

Try something relatively simple to start with: connect a LED to your Raspberry Pi
and write a program (in any language you like) for turning the LED on and off.
If there are technical problems to resolve, it is easier to do so on a small project like this
before you attempt something more challenging.
(This is a bit like a "Hello, world!" for electronic engineers!)
Nick is offline   Reply With Quote
Old 2018-12-26, 10:47   #5
M344587487
 
M344587487's Avatar
 
"Composite as Heck"
Oct 2017

69610 Posts
Default

Some of the more practical uses include various types of server (LAN typically a file server and/or home streaming box, WAN you could host a website with some dynamic ip cajoling, you could setup a VPN with custom compression to preserve a limited mobile data plan, etc). Pihole is an ad blocker and can be used to block ads from your entire network. You could use some cheap cameras and optionally motion sensors for DIY home security.

Quote:
Originally Posted by jvang View Post
...
There’s also a HAT specifically for the Pi 3B+ that allows it to be powered over an Ethernet cable...? How’s that work, and why would you want to do that? (As opposed to normal power solutions)
To have a single wire going to the device, not require a PC or transformer to supply USB power and still have full network speeds. Having to buy a HAT and have a switch that can supply PoE makes it rather niche IMO.

Quote:
Originally Posted by jvang View Post
...
One of these is a Cluster HAT, which would sit on top of the main, full size Pi. It can then connect to 4 Pi Zeros that attach directly to the HAT which connects directly to the main Pi's motherboard. This would be a pretty big boost to the Pi's distributed processing power!
Not really. Fun and a good learning experience, but not a practical or cost effective source of compute. A pi zero has a single weak core that struggles to serve the most basic of websites with lighttpd. Four Pi zero even running discrete tasks with zero cluster communication would be heavily inferior to a single A53 chip for 99% of tasks. On paper 4x pi zero has ~70% the compute of a 3+, in practice I wouldn't be surprised if there was an order of magnitude difference or more.
M344587487 is offline   Reply With Quote
Old 2018-12-26, 11:03   #6
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

66408 Posts
Default

Congrats on your purchase!

For USB cameras, study motion and its configuration file. You can set motion as a http server and much more.
paulunderwood is offline   Reply With Quote
Old 2018-12-26, 11:38   #7
xilman
Bamboozled!
 
xilman's Avatar
 
"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across

3·43·79 Posts
Default

Quote:
Originally Posted by M344587487 View Post
Fun and a good learning experience, but not a practical or cost effective source of compute.
Indeed. A cheap way of playing with parallel computation, especially if you want to write your own communications and task-distribution code, but not to do any serious calculations.

From what you've posted so far I doubt you want to write code of that nature but it's by far the best way of learning about the basic problems and how to solve them IMO. Book learning is fine, and essential, but it's never the same as practical work.
xilman is offline   Reply With Quote
Old 2018-12-26, 11:47   #8
nomead
 
nomead's Avatar
 
"Sam Laur"
Dec 2018
Turku, Finland

1010010002 Posts
Default

Quote:
Originally Posted by M344587487 View Post
Not really. Fun and a good learning experience, but not a practical or cost effective source of compute. A pi zero has a single weak core that struggles to serve the most basic of websites with lighttpd. Four Pi zero even running discrete tasks with zero cluster communication would be heavily inferior to a single A53 chip for 99% of tasks. On paper 4x pi zero has ~70% the compute of a 3+, in practice I wouldn't be surprised if there was an order of magnitude difference or more.
There's not much sense in using the 3B+ (or 3A+) for cluster computing either, from a price or even power usage point of view. But yeah, it can still be fun, as a learning experience.

As an example, for some reason my 3B+ runs Mlucas a bit slower than the timings on the Mlucas 17.1 README. The timings are for the Odroid C2, same Cortex-A53 core but at 1.5 GHz instead of 1.4 on the Rpi 3B+. So for example, 4096K is 258.60 ms/iter on my 3B+, 223.17 ms/iter on the C2. I'm running 64-bit Gentoo on it in order to get access to all the CPU features. Sure, the power consumption is probably in the 2-3 watt range (less for the 3A+ since it doesn't have wired Ethernet on board), but how many of those do you need to match even a lower-end PC setup

Some relatively cheap Cortex-A72 boards are on the way, but the ones I've seen only have two fast A72 cores and then four slower A53 cores. Like this one :
http://linuxgizmos.com/rk3399-based-...or-even-lower/
nomead is offline   Reply With Quote
Old 2018-12-27, 01:39   #9
jvang
veganjoy
 
jvang's Avatar
 
"Joey"
Nov 2015
Middle of Nowhere,AR

3·5·29 Posts
Default

Wow, I guess there are a ton of things to do with the Pi

It looks like there are a ton of online code repositories that some people use to program their Pis, if you were in a hurry to do something productive with it. There are also tutorials for the more casual users...

I think that I’ll set it up as a server first, then possibly make it into a sort of Internet of Things device that can connect to my phone or something. Maybe they make rechargeable Pi batteries that attach to the convenient case!

Just checked, and of course someone sells them. Amazon has tons of Pi components for sale, including touch screens, cameras, and batteries (one is a 4000 mAh pack that attaches to the Pi in a form-fitting fashion).
jvang is offline   Reply With Quote
Old 2018-12-27, 05:25   #10
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

22·23·97 Posts
Default

Quote:
Originally Posted by Nick View Post
Up until about 10 years ago, every PC had a serial port (also known as a COM port).
The great thing about these was that the signalling was simple enough for you to connect
your own electronic circuits directly to the computer without too much trouble.

Now that PCs use USB ports instead, connecting basic electronics to the computer is harder.
But on the Raspberry Pi it is still easy!
Re: connecting stuff to usb ports, it is still easy and cheap, and usb-to-serial (or respectively to CAN, SWIM, JTAG, whatever) adapters or cables cost peanuts, or are free, for example you can get a demo Discovery or Nucleo ST board which contains a Cortex M microcontroller on it, which you can program to turn on/off LEDs and stuff, and it has serial and SWIM/JTAG interfaces to connect to everything; alternately, you can get an Arduino board too, which connects to USB, and it has serial ports, SPI, etc. Chinese replicas of "nano" can be bought for 99 cents on alibaba. By the way, the Nucleo boards have "ino" interface too (they have a socket into which the arduino boards can be stuck directly, with no soldering).


We use such contraptions every day in our daily work.
LaurV is online now   Reply With Quote
Old 2018-12-28, 09:22   #11
nomead
 
nomead's Avatar
 
"Sam Laur"
Dec 2018
Turku, Finland

23×41 Posts
Default

Well, hey, if you're going to do computing on the Raspberry Pi 3(A+/B/B+), do take care of cooling! Despite everything, I started a LL double-check a few days ago on one 3B+, using the precompiled Mlucas_c2simd version 17.1. It'll take something like three months to complete, but it's just a "set and forget" type of run anyway.

I found that the clock state stays at 1400 MHz, no matter what, as found in /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state (again on 64-bit Gentoo, not Raspbian). But in spite of that, there seems to be some sort of mild throttling going on. Here's what I found thus far. All timings are for 2816K FFT, using all four cores.

At first, the temperature rose to about 74-75C. Thought this was a bit high, but the Pi was at work and it was Christmas so it ran for a couple days like that. Iteration timing about 185 ms.

Then, back at work, I found that the two-sided thermal tape holding the small heat sink in place had failed, and the heat sink had fallen off completely. (14x14 mm base, 10mm tall) Stuck it back on, now temperatures went down to 70-71C but for some reason iteration times fell to 180 ms. Hmm.

After a few hours of that, I removed that heat sink and glued on a slightly larger one, same base but 14mm tall. Temperatures were still in the same range but now iteration times went down to 174 ms. Even more Hmmm.

So today I put a fan on the thing. Ripped from some old CPU cooler and undervolted to 5V, but still totally overkill for the job. And now the core temperature is 45C. Iteration times further dropped down to 169 ms.

That's a 9% improvement in performance just by working on the thermals. And it is important to keep the air moving. My board is just bare on the table, but if it's inside some plastic case, I don't think air will move there at all without a fan. The problem is, small fans usually rotate fast and are noisy. So in a cluster it would probably make sense to stack the boards somehow and use a bigger fan to move air through the whole stack at once.
nomead is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Raspberry Pi 3A+ M344587487 Hardware 3 2018-11-17 13:20
Experiments in photometry xilman Astronomy 23 2018-01-18 21:41
Raspberry Pi lavalamp Hobbies 10 2017-08-16 00:37
Raspberry Pi sloppyonefoot Software 1 2017-07-02 08:48
Raspberry Pi xilman Hardware 126 2017-06-01 14:42

All times are UTC. The time now is 04:22.

Tue Nov 24 04:22:15 UTC 2020 up 75 days, 1:33, 4 users, load averages: 2.28, 2.24, 2.69

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.