10 million Raspberry Pi's sold...

You said the requirement was 30.

--

Rick C
Reply to
rickman
Loading thread data ...

Perhaps an analogue mux could be used. A 4051 can switch eight analogue channels to a common output.

--
James Harris
Reply to
James Harris

Thinking that it would be cool to get some R-Pi, because meedja told them. (-;

Reply to
Rob Morley

Oh dear. Obviously you don't know how to interface ADCs to a processor.

Where did I say it had 30 ADCs?

It obviously has an ADC that can be attached to one of 30 different inputrs, sampled, digitised and stored,

If you have 30 wires coming in, each with a different voltage, you need

30 pins of something to multiplex them. The PIC does that inside the same chip.

Where id I say I was?

Once again its cleat english is not your native language.

O,j maybe a comma got left out somwehere ;-)

--
Outside of a dog, a book is a man's best friend. Inside of a dog it's  
too dark to read. 
 Click to see the full signature
Reply to
The Natural Philosopher

Yeah. actually its 24 on one chip and 6 on another.

Different boxes.

--
?it should be clear by now to everyone that activist environmentalism  
(or environmental activism) is becoming a general ideology about humans,  
 Click to see the full signature
Reply to
The Natural Philosopher

WEll indeed. But the PIC has a 24:1 analogue MUX built in....

The peripherals needed to adapt the PI would cost more than the PIC chip by a large margin.

--
?it should be clear by now to everyone that activist environmentalism  
(or environmental activism) is becoming a general ideology about humans,  
 Click to see the full signature
Reply to
The Natural Philosopher

Cool. Which PIC?

When I was last looking at stuff like this PICs did not exist. I remember coming up with a natty solution to the time delay between beginning A-D conversion and getting a result. Basically, each read would supply a value and also trigger the next conversion.

I never built it but it would have used a 4051 and a few other gubbins. Something like it should be very cheap - just pennies per IC, for the most part.

I've never used any PICs but programming them looks to be pretty horrible - at least in assembly.

--
James Harris
Reply to
James Harris

Umm. I cant exactly remember.

PIC16F1718 I think.

Basically all I want to do is monitor 25 rotary pots.

C is available.

But actually there's very little code - a simple poll of each analog input, then a bit of de scratch, then assemble a USB frame and send the data.

--
If you tell a lie big enough and keep repeating it, people will  
eventually come to believe it. The lie can be maintained only for such  
 Click to see the full signature
Reply to
The Natural Philosopher

2x RPi Zero: $10 4x MCP3008 8-channel 10-bit ADC: ~$10 (plus 2x SD card, power adapter etc: ~$20)

Great info here

formatting link

Only 2 SPI chip select pins, so only 2 SPI devices per RPi, officially. I think you could add more by using free gpio pins and doing software SPI, should be plenty fast enough for simple rotary pots, so all 4 with one Zero. Bottom of the linked article discusses sampling speed and alternative solutions.

Reply to
A. Dumas

a PIC is less than $5 with everything I need.

--
?It is hard to imagine a more stupid decision or more dangerous way of  
making decisions than by putting those decisions in the hands of people  
 Click to see the full signature
Reply to
The Natural Philosopher

It's good to look at various solutions to things, howerver, much as I like the Pi and have written shed-loads of GPIO software for them, sometimes a simple solution is needed. There are single-chip microcontrollers with

28 analog inputs and either serial or USB at the other end.

Some solutions I've seen (& developed) are what looks like a multi-function I2C device - which is reality is an ATmega (I prefer them to PICs) talking to the hardware on one side and talking I2C back to a Pi, but the possibilities are endless. Right now I'm working on wireless "nodes" for a project - each node is an ATmega with a radio blipping telemetry back to a host (which happens to be a Pi, but it could be anything)

The world is your bi-valve, but don't overly complicate it. Pi's are great but sometimes, all you need is an 8-pin µC.

Gordon

Reply to
Gordon Henderson

ike

h

eat

Good post.

When you've got half a dozen Pi's it's tempting to try to use them for every project, but quite often there are better tools for the job. There

are a whole host of Adrino and ATmega type boards with a greater range of inputs and outputs which are more suitable for remote sensors or controllers.

Where the Pi comes in to it's own with its full OS and low power consumption, is acting as an always on server aggregating the data from the other devices coming in via LP wireless.

---druck

Reply to
druck

I use an MCP3008 for 8 A/D inputs. It uses SPI, so you can do it with 3 GPIO pins for the SPI bus plus one CE pin per MCP3008 -- a total of 6 GPIOs for 24 inputs.

Unlike some other SPI chips, the MCP3008 doesn't have a chip address as part of the SPI data, so you need separate CE for each chip on the SPI bus, in order to address them all. (You can of course use separate SPI busses for each, and then it's 4 GPIOs per MCP3008 chip.)

Not sure if you can use Raspbian's SPI driver -- I wrote my own SPI driver before that existed, and still use my own even now.

In theory, the chip can do around 100,000 samples/sec, but I only do about 1 every 2 seconds, just reading potentiometer settings. (My application also ignores small changes in values, which you tend to see on successive samples anyway.)

--
Andrew Gabriel 
[email address is not usable -- followup in the newsgroup]
Reply to
Andrew Gabriel

Me too. If it doesn't need the help of a Linux O/S (or equivalent), or the Internet, or a database, then I don't think it belongs on a Pi. People who aren't into building hardware from scratch can do great things using an Arduino for the deterministic processing connected to a Pi to make the complicated decisions. Of course, if the problem fits, and a Pi is just sitting there ...

Mel.

Reply to
Mel Wilson

On Sat, 10 Sep 2016 11:03:41 +0100, James Harris declaimed the following:

40 years ago?

formatting link
"The name PIC initially referred to Peripheral Interface Controller.[4][5] The first parts of the family were available in 1976"

Granted, field programmable units with lots of complex internal peripherals (if that isn't an oxymoron) came later... I think the problem these days is finding the time to search the parts catalog to figure out which chip will suffice for the task.

40-pin 18F4520 claims 13 A/D, its 28-pin cousin 18F2520 claims 10 A/D... But the 14-pin 16F676 states 8 A/D (how many pins are left for non-A/D I/O?). But, as is common, there is only one actual A/D module, so the code has to cycle the channel select.

I don't think I've encountered anything with true independent A/Ds -- strike that; the TIVA TM4C123 has two A/D modules sharing 12 input channels (and an internal temperature sensor), so should be capable of taking two readings in parallel.

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

Haha! Well, maybe it wasn't quite that long ago. Maybe they did not exist in my field of view. ;-)

--
James Harris
Reply to
James Harris

On Sat, 10 Sep 2016 18:24:44 +0100, James Harris declaimed the following:

Heh... Granted -- back then my world view was the unobtainable Altair system . My first exposure to PIC was in the form of the Parallax BASIC Stamp (really overpriced by today's standards).

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

Same here. Pricey or not, I found the BS2 STAMP an eye-opener both for what it could do and for the quality of its editor/compiler/debugger.

Now, I'd look at using a PICAXE before springing for a BS2, partly because the packaging is often smaller (smallest is an 8 pin DIP vs the BS2's 24 pin DP format PCB) and partly on price.

Has anybody on here used both the BS2 and a PICAXE? If you have, how do the support packages (editor/compiler/debugger) stack up against each other?

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
 Click to see the full signature
Reply to
Martin Gregorie

Actually, none of this is obvious because you never stated your requirements even after I asked for them.

I think you are not really interested in communicating, so I think we are done.

--

Rick C
Reply to
rickman

I have a B+, 2 B2s, 1 B3, and 1 Zero. The B+ runs DNS/DHCP on the network. One B2 runs a ZNC server One B2 runs an OpenSIM server

I had a Minecraft server going on the B3 but I'm in the process of moving it to a full box because I want to do more with it (and use the Pi for other things).

I have not found a good use for the Zero yet but they were hard to get and showed up in stock when I ordered my B3.

--
Ramen Junkie 

Supreme Dictator for Life, alt.games.final-fantasy
Reply to
Ramen Junkie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.