Although not strictly OT here, there's almost certainly better places, so can anyone recommend any friendly mailing lists for getting started with using Linux to talk to GPIO etc? The sort of thing you might use a Pi or BeagleBone for (but not specific to a single platform).
I've got several Pi's, a BB Black (and an Arduino for good measure) sitting around not really being used for much, and I really should learn to do some interesting things with them.
There are loads of forums and Google Groups but I just prefer mailing lists like this one.
Specific examples of the sort of thing I want to do:
For personal use I want to do something interesting with Christmas lights, probably running from a solar charged 12V battery - that feels like it should give me plenty of scope to "play".
Also, a colleague has asked about a simple application to record encoder and analogue input values to CSV on a periodic basis.
In each case I can't even decide whether I should be looking at Arduino or Pi/BBB hence looking for a more general mailing list than one targeted at a specific solution.
To be honest that is quite a tough one. Most of the good places tend to be a bit device/platform centric.
As to how to decide what to use then I'd say it really comes down to how much of an OS your project needs, all the platforms you mention would be capable (at various degrees of overkill) of doing the two projects you mention.
On the Pi/BB you have the advantage of doing it all in userland at a very high level if you want, and using pretty much any language.
Arduino you get simplicity and the fun of doing it relatively close to the metal, but you are pretty much stuck with Arduino's Pseudo C++ like language (though if this sort of development tickles your fancy and you want to expand to other projects you can of course move (and even port your existing projects to) a grown-up AVR development environment quite easily)
In fact for your colleagues project there is something on arduino.cc which is already 80% of the way there.
http://arduino.cc/en/Tutorial/Datalogger.
Personally I wouldn't consider a Pi in any application where I didn't need it's Gfx/hdmi capabilities but that's because outside of those I don't believe it is a very good platform :D
On Sat, Oct 19, 2013 at 11:15:38PM +0100, Wayne Stallwood wrote:
To be honest that is quite a tough one. Most of the good places tend to be a bit device/platform centric.
Yes, I was going to reply to the OP in much the same vein, but was too lazy! :-)
I have some similar projects (in particular some work for amateur astronomers and also instrumentation on my boat).
As to how to decide what to use then I'd say it really comes down to how much of an OS your project needs, all the platforms you mention would be capable (at various degrees of overkill) of doing the two projects you mention.
On the Pi/BB you have the advantage of doing it all in userland at a very high level if you want, and using pretty much any language.
Arduino you get simplicity and the fun of doing it relatively close to the metal, but you are pretty much stuck with Arduino's Pseudo C++ like language (though if this sort of development tickles your fancy and you want to expand to other projects you can of course move (and even port your existing projects to) a grown-up AVR development environment quite easily)
I actually have a Pi and an Arduino and also something called Pokeys56E, none of them is anywhere near ideal. The difficulty is mostly in the nitty gritty hardware intefacing, getting voltages into the device in such a way that it's unlikely to kill it if/when spikes and noise come along.
Currently on the boat I have an ancient 7" eeePc with a 1-wire to USB interface and sensors on the 1-wire bus. 1-wire is good for various measurements but doesn't seem to have voltage sensors. In fact *nothing* seems to offer decent voltage measuring sensors, there's lots of things with "A2D inputs" but nothing that offers an 'outside world facing' capable one.
In fact for your colleagues project there is something on arduino.cc which is already 80% of the way there.
http://arduino.cc/en/Tutorial/Datalogger.
Personally I wouldn't consider a Pi in any application where I didn't need it's Gfx/hdmi capabilities but that's because outside of those I don't believe it is a very good platform :D
It has the advantage of being really cheap though, same sort of price as many Arduino variants and *much* more accessible, especially to Linux aware people.
If you want something with a bit of both there's the Beaglebone Black, runs Linux but has lots of Arduinolike I/O capability. A little more money but not by much.
On 20/10/13 10:24, Chris Green wrote:
I actually have a Pi and an Arduino and also something called Pokeys56E, none of them is anywhere near ideal. The difficulty is mostly in the nitty gritty hardware intefacing, getting voltages into the device in such a way that it's unlikely to kill it if/when spikes and noise come along.
That's always going to be the case really unless you move to PLC type systems that have hardened I/O...but then you have to use PLC type development languages and pay PLC type money for the interfaces :-) The little AT-Mega isn't bad really, at least all the inputs (other than pin 1) are ESD safe. It's certainly a bit tougher than the RPi GPIO.
Currently on the boat I have an ancient 7" eeePc with a 1-wire to USB interface and sensors on the 1-wire bus. 1-wire is good for various measurements but doesn't seem to have voltage sensors. In fact *nothing* seems to offer decent voltage measuring sensors, there's lots of things with "A2D inputs" but nothing that offers an 'outside world facing' capable one.
I guess you mean you want to measure something other than 0-5v ?
If you want to do something quick and dirty that doesn't need to provide millivolt accuracy like monitor a battery state then that's pretty straightforward, just have the voltage to be measured as the top of a potential divider with the ADC pin or whatever on the middle tap.
Then I'd add a fast acting 5.1v zener clamp and fuse the input to protect from overvoltage. In fact there are now prepackaged and cheap (thanks to USB) capable protection arrays that can do exactly that and save you from anything other than a direct lightning strike.
On Sun, Oct 20, 2013 at 02:16:13PM +0100, Wayne Stallwood wrote:
On 20/10/13 10:24, Chris Green wrote:
I actually have a Pi and an Arduino and also something called Pokeys56E, none of them is anywhere near ideal. The difficulty is mostly in the nitty gritty hardware intefacing, getting voltages into the device in such a way that it's unlikely to kill it if/when spikes and noise come along.
That's always going to be the case really unless you move to PLC type systems that have hardened I/O...but then you have to use PLC type development languages and pay PLC type money for the interfaces :-) The little AT-Mega isn't bad really, at least all the inputs (other than pin 1) are ESD safe. It's certainly a bit tougher than the RPi GPIO.
Yes, that's true, the Pi GPIO needs to be treated with kid gloves from the electrical point of view really. Though there are very cheap boards now (for example from Quick2Wire) that do the basics of making it a bit more robust.
Currently on the boat I have an ancient 7" eeePc with a 1-wire to USB interface and sensors on the 1-wire bus. 1-wire is good for various measurements but doesn't seem to have voltage sensors. In fact *nothing* seems to offer decent voltage measuring sensors, there's lots of things with "A2D inputs" but nothing that offers an 'outside world facing' capable one.
I guess you mean you want to measure something other than 0-5v ?
Well, yes, surprisingly the 12 volt batteries and voltages from the Hall effect current sensors which are mostly either +-2.5 volts or 0 to 2.5 volts (corresponding to all sorts of odd full scale values).
If you want to do something quick and dirty that doesn't need to provide millivolt accuracy like monitor a battery state then that's pretty straightforward, just have the voltage to be measured as the top of a potential divider with the ADC pin or whatever on the middle tap.
At the moment I have 200mV digital LCD meters with (as you describe) resistor dividers providing the appropriate scaling. For local display of the battery voltage these are fine but for the Hall Effect current sensors some sort of auto-zeroing would be useful. For this reason (and for remote monitoring) I would like to use a micro based system.
Then I'd add a fast acting 5.1v zener clamp and fuse the input to protect from overvoltage. In fact there are now prepackaged and cheap (thanks to USB) capable protection arrays that can do exactly that and save you from anything other than a direct lightning strike.
Pre-packaged as in 'on a chip'? ..., oh, yes, I've found some now. I searched for "cable protection arrays" first having slightly misread what you wrote! :-) Just searching for "protection arrays" found some.
On 20/10/13 15:40, Chris Green wrote:
Well, yes, surprisingly the 12 volt batteries and voltages from the Hall effect current sensors which are mostly either +-2.5 volts or 0 to 2.5 volts (corresponding to all sorts of odd full scale values).
Ok both of those are fairly easily solved as well. You could fix either problem with an op-amp circuit, though the simple solution for the first one would itself need a -v reference supply so you'd have to add a little dc-dc converter for that as there are no* -v supplies on the Arduino
Alternatively for the 0-2.5 measurement if you want the full resolution you could cheat and just set the arduino onboard ADC's reference voltage to a little over 2.5v with a potential divider. That will rescale the ADC to 0-2.5v in 1024 steps.
But even using half the ADC by feeding it 0-2.5 with a 5v reference you still have 5mv resolution.
The only downside is of course setting AREF affects all the ADC pins on the arduino....there is of course a way around that but I'll let you figure that one out for yourself as I am not even sure the Arduino IDE supports selecting the AREF source ;-)
* There are on the original serial arduino shields, but you'd have to tag onto chip legs to get to them.
On 20 October 2013 14:16, Wayne Stallwood ALUGlist@digimatic.co.uk wrote:
That's always going to be the case really unless you move to PLC type systems that have hardened I/O...but then you have to use PLC type development languages and pay PLC type money for the interfaces :-)
I did have a quick look for SoftPLC's that would run on a Pi, but it wasn't really what I was looking for so didn't try very hard. There seem to be projects that are heading in that direction though. Of-course that solves the wrong end of the problem (doesn't fix the hardware interfacing) but if it took off then I'm sure more breakout kit would be forthcoming.
It would be good to see PLC-type equipment become more available outside industry; it could have applications in home automation for example but not at the sort of prices that typical PLC kit command. A DIN-rail case for the Pi/BBB and DIN-Rail based breakout boards would be a great idea, I think.
On 20 October 2013 10:24, Chris Green cl@isbd.net wrote:
The difficulty is mostly in the nitty gritty hardware intefacing, getting voltages into the device in such a way that it's unlikely to kill it if/when spikes and noise come along.
^^^ This!!
Currently on the boat I have an ancient 7" eeePc with a 1-wire to USB interface and sensors on the 1-wire bus. 1-wire is good for various measurements but doesn't seem to have voltage sensors. In fact *nothing* seems to offer decent voltage measuring sensors, there's lots of things with "A2D inputs" but nothing that offers an 'outside world facing' capable one.
In the absence of any knowledge to guide me elsewhere I'm looking at I2C. I don't know the size of your boat though so it might be pushing the limits on i2c (I've seen references to people running it over CAT5 to distances of ~20m - not bad for a bus designed for inter-chip comms).
On 19 October 2013 23:15, Wayne Stallwood ALUGlist@digimatic.co.uk wrote:
To be honest that is quite a tough one. Most of the good places tend to be a bit device/platform centric.
Which is fine as far as it goes, but ideally I was looking for somewhere like ALUG where we all use Linux but don't all use the same distro. I get the impression it's something whose time is coming, given the popularity of Pi/Arduino/etc, but unfortunately it'll probably take the form of a forum rather than a mailing list (not that I really found much in the way of forums either, except hanging off the back of some electronics mags but the forums seem very quiet).
On the Pi/BB you have the advantage of doing it all in userland at a very high level if you want, and using pretty much any language.
And the advantage of finding example code and tutorials all over the place!
Arduino you get simplicity and the fun of doing it relatively close to the metal, but you are pretty much stuck with Arduino's Pseudo C++ like language (though if this sort of development tickles your fancy and you want to expand to other projects you can of course move (and even port your existing projects to) a grown-up AVR development environment quite easily)
AVR stuff generally I'd like to get into; I haven't really played with that sort of level of stuff, at least not in the last 20 years and things have changed a bit since then :-)
In fact for your colleagues project there is something on arduino.cc which is already 80% of the way there.
Thanks for that, I'll take a look. I'd been looking more at the Pi and BBB with the Arduino almost an afterthought, maybe I have it the wrong way around!
Personally I wouldn't consider a Pi in any application where I didn't need it's Gfx/hdmi capabilities but that's because outside of those I don't believe it is a very good platform
Historically I've done several jobs on small Linux boxes (previously x86 based, more recently ARM based) and aside from the actual packaging the Pi is better than most of them at a fraction of the cost.
I prefer the BeagleBone Black - it just feels like a better board, has far more capability, is faster, has onboard flash and supports microSD (not SD cards sticking out of the side of the board), and is only marginally more expensive. The majority of the "how-tos" talk about the Pi but where that's a code issue I can work out the differences, it's hardware differences that leave me out of my depth.
To be honest I can turn myself to whatever coding is required, it's more the electronics that I have a problem with. For example, almost any analogue I'm going to want to interface with will be 4-20mA or 0-10V, and I just don't know enough to work out what goes between that and (for example) the 0-1.8V ADC input on the BBB.
On Mon, 21 Oct 2013 09:43:32 +0100 Mark Rogers mark@quarella.co.uk wrote:
I prefer the BeagleBone Black - it just feels like a better board, has far more capability, is faster, has onboard flash and supports microSD (not SD cards sticking out of the side of the board),
Not seen these? https://www.modmypi.com/raspberry-pi-micro-sd-card-adaptor
On 21 October 2013 09:55, Chris Walker cdw_alug@the-walker-household.co.uk wrote:
On Mon, 21 Oct 2013 09:43:32 +0100 Mark Rogers mark@quarella.co.uk wrote:
I prefer the BeagleBone Black - it just feels like a better board, has far more capability, is faster, has onboard flash and supports microSD (not SD cards sticking out of the side of the board),
Not seen these? https://www.modmypi.com/raspberry-pi-micro-sd-card-adaptor
Yes I have, but worth pointing them out for anyone who hasn't. It only fixes one of the problems with the Pi though. and for me it's one of the reasons why the BBB feels better designed for "real" applications rather than for kids to play with. Don't get me wrong, I think the Pi is a great bit of kit and is doing great things for education - and I'm sure the BBB only exists at its price point because the Pi created/demonstrated the market. But for a modest increase in price I think the BBB has a lot more to offer than a Pi.
(That said, for some applications the Pi is probably better; I believe it has better graphics acceleration, for example, making it better for XMBC-type apps than the BBB. I think it might also have slightly lower power requirements.)