Not all the GPIO pins are available, especially if you want to use I2C, SPI, Serial or another I/O hat.2uk wrote: ↑Mon Apr 08, 2019 6:52 pmHello to all
I have read that the PI 3 B+ has 26 GPIO and that they can be reprogrammed (is that true?)
than my question will be Can I use all 26 GPIOs
(Pins 3,5,7,11,13,15,19,21,23,29,31,33,35,37,8,10,12,16,18,22,24,26,32,36,38,40) .
I have read that GPIO-2,3,4,14,15 are High during Boot, but after can operate normally.
I wold like to drive as many Optocuplers as possible with 1 board.
Thank You in advance.
I am not sure how to calculate the resistor
Forward voltage on the INPUT side is 1.2-1.4V.2uk wrote: ↑Wed Apr 10, 2019 6:24 pmI am not sure how to calculate the resistor
so the PC 817 is rated 6V at 50mA http://html.alldatasheet.com/html-pdf/4 ... PC817.html
tha PI suplys 5v at 300mA I think
doing the Ohm Law is R=(Voltage Supplied - Voltage Needed) / 50mA
I am doing it wrong or ?
nice to know thank you,LTolledo wrote: ↑Wed Apr 10, 2019 6:52 pmIt seems that Echo software uses wiringpi, and wiringpi supports MCP23017 so it may be possible.
Pin 9 (VDD) is connected to 3.3V2uk wrote: ↑Fri Apr 12, 2019 2:05 pmnice to know thank you,LTolledo wrote: ↑Wed Apr 10, 2019 6:52 pmIt seems that Echo software uses wiringpi, and wiringpi supports MCP23017 so it may be possible.
than I have the next question "how to I connect 2 of them ? " on internet I find only how to connect 1
thx I am thinking to use ULN2803 if I will have problems with the curent or voltage out of GPIOs
that is doable yes ?
Thank you for the fast Response, at this Point i think i have all i need on the Hardware site, going forward with the PCB Design and will come back for an PCB control ( if some one will be so kind, last will be the Software.LTolledo wrote: ↑Sun Apr 21, 2019 6:01 amProblem 1: connect to either anode or cathode, my preference is usually on the anode side. but may change during the PCB layout.
Problem 2: if you still want to use a relay, then the board space will get bigger. You may group your outputs depending on the load you want to connect.
low amperage module (optocoupler-transistor array combo) for low ampere loads (less than 200mA), while another group for higher loads with relays connected to output of the low amperage modules. You may also have a "dry contact" module comprising of just the optocouplers (optocoupler outputs not connected to any Vcc and ground on the board).
Problem 3: If this is for the MCP23017 then yes. for the first MCP23017 you may have A0, A1, and A2 all connected to ground. For the second MCP23017, the connection will be A0 --> +3.3v, A1 and A2 to ground. In your binary table A2 and A0 are reversed.
The MCP23017 data sheet states that the maximum current per pin is 25mA but the max the current that can pass thru the MCP23017 is 125mA (Vdd pin), so that means max 5 pins sourcing or sinking 25mA. However with 5mA recommended current to flow thru each optocoupler, you can have all pins sinking or sourcing current at the same time, the total current used by the chip will only be below 90mA, so you wont fry the MCP23017.
somebody once told me ".....design with the worst possible scenario in mind, .....hope for the best possible outcome....."