>>...with a 3V3 supply, 330R only sources 10mA. Even if all six inputs are pulled low at once this is
>However it is not recommended to take more than about 50mA from the 3V3 pin so marginal at best.
Where is this stated ? See my calcs below.
>>The inputs get a 100ms pulse every few seconds typically, so if I pull up with a 330R resistor, the
>>average consumption is probably well below 1mA per channel - only a tiny fraction of the Pis >>consumption.
>Depends if the line sits low most the time then the average is 9mA,
It doesn't. As I said, or to me more explicit, the pulses are low (conducting to ground) for 100ms. I suppose in theory you might get several pulses per channel per second, but certainly not in the currently intended application.
> but in reality you need to worry about peak as so near available 3V3 limit determined more by the
>onboard regulator and its existing on-board load.
Yes, see calc below.
>Might be better with 1k.
I think 330R should be OK. See calc below.
>>I have a little experience of this sort of thing.
>>We have a multi channel phase angle control light
>>dimmer with TTL inputs connected to switches round
>>the house for dimming or brightening lights. This
>>has the inputs to the TTL 74LS150 mux connected to
>>long wires and 220R pull-up resistors, and it's
>>been running 24/7 for 19 years without problem.
>But runs off a psu with much more spare capacity
Probably. It's been a while since I looked !
>>I can't see any penalty except power consumption ?
>For one input no but with limited 3V3 available and many inputs, your are risking other effects on board.
Let's try and quantify this. Looking at the Pi schematic, there doesn't seem to be anything between the 3V3 regulator and the GPIO 3V3 connector. The track might be a bit thin, but I can't imagine any track struggling with 60mA. The 60mA 'limit' strikes me as a bit arbitrary.
I guess the issues are 1) does the peak current exceed the regulators rated output current (which could kill
it quickly), and 2) with the additional load of the pull ups during pulses, will the regulator overheat with the
heat sink capacity available (which could kill the regulator slowly).
I suspect that given that the Pi isn't plugged in to anything else, we probably won't exceed the rated
output, though it's interesting that the schematic notes by the 3V3 regulator, "Place on Mh 400sq mm Copper Area for pd 800mW".
If the voltage regulator is dropping 1V7, it dissipates 800mW at 470mA. And here we all are buying 1500mA powers supplies... Anyway, it looks as if the NCP1117 itself is rated at 1A.
Web pages like http://www.raspberrypi.org/phpBB3/viewt ... f=2&t=6050
seem to indicate typical current consumptions on the order of 200mA. Even if we allow 300mA to give some headroom, I don't think it looks as if my drawing pulses of up to 60mA for 100 ms will either exceed the max rated regulator current, or the maximum recommended dissipation on the 'heat sink' provided.
USB outputs run at 5V, so hopefully the USB wi-fi doesn't further stress the 3V3 regulator.
>>As long as the open collector thing you are connected to can sink the current your input is sourcing of
>When the open-collector is off you are more than likely feeding a small amount of current to the Pi, >instead of when on taking small current from Pi and mainly the resistor. Current flow direction changes.
I don't know what semiconductor technology the SOC is, but as you say, it is only likely to sink a small amount of current, and the resistance of the pull-up probably won't change that a lot.
>>Surely pretty much any value will do ? In general I'd agree, but I'm using pull ups on the lines I'm using,
>>and the other GPIO pins aren't connected to external wiring.
>Almost any value much higher than 10k and its impedance makes it a weak force, below 1k and
>multiple lines then you start taking too much current a lot of the time from 3V3 and could exceed safe >operation.
As far as I can see from the calc above, even if it was drawing a 60mA current for a high proportion of the time, the regulator max current and dissipation would not be exceeded. (I can't envisage more that 200ms per second per chanel in the intended use though.)
>If you can shield cables or add extra grounds this will also help.
The choice of wire will probably be determined by wiring regs, and the need to run our pulse cables next to chunky mains cable in big electrically noisy conduit, then to terminate them in the quite chunky pulse
screw connectors in the electricity meter. The ideal cables for a channel would probably be a pair of double insulated singe 1.5sqmm cables, though the ideal stuff is hard to find.
Author of oBeMS open source Building energy Management System.
Automatic Meter Reading (AMR), Building Management System (BMS),
Building Energy Management System (BEMS), Infrastructure Control System (ICS).