No response from rpi-gpio

Have you got any other gpio nodes in the flows? Possibly ones configured as inputs?

Dont know how to do that, but what I did instead is create a new flow with all the ports in them.
7,11,12,13,15,16,22 rip gpio out modules.

Inject connected to all pins to set to 1 number value
inject connected to all pins to set to 0 number value

nothing responded.

In the python above it uses GPIO.setmode(GPIO.BCM) and "pins" [18,17,15,14] - these are the BCM pin numbers which are the physical pins 12,11,10 and 8 - so if the python works then the Node-RED pins need to be set as 12,11,10 and 8.

or indeed as I suggested try editing the python code above to be
GPIO.setmode(GPIO.BOARD)

and then
pins = [12,11,10,8]

and check it still works with python

1 Like

One step forward, two steps back. You were right about the numbering. I now get a response, in node red and can switch the relay board........but just the leds of the relay, not the relays themselves (no click)
Figuring that is a power issue.
Iā€™m going to disassemble the entire rig and measure the power supply and all the wires.
Since the leds do light up on the board it does get some power. Iā€™ll keep you guys posted.

@spawnreaper, seems like you know what is next? The issue right? :slight_smile:

@others... For those that may not realize... If the relays do not click... you have a power/current issue. You can NOT drive the relays from the Pi power pins consistently. You want to drive the relay logic via GPIO pins and Pi power and GND. But use a separate power source to drive the relays themselves. This is why most relay module (boards) have jumper for separate power to relays separate from the logic control power/GND. The classic LED light and unlit, but relays not clicking is a dead give away that the relay (board) needs more power/current to trip and hold the relays open consistently. You may find also that you cannot open multiple relays at the same time, as well. So always use a separate power/GND source for the relays themselves. This does not have to be a separate transformer, but could be one that has better than a 5v/3a rating, and using Y split. When I test relay boards I use two power supplies, until I know what the Pi is drawing, and what the relays are drawing for voltage/current. I size the power source for relays according to need, i.e. what is required for all relays open at the same time as the worst case power/current demand is.

Assuming that you are feeding 5v to the relay board from the pi in the way shown in the link you posted, have you remembered to fit the JD-VCC link?

[Edit] Sorry I must delete the pictures. Its possible, that the pictures are protected by copyright. You find this pictures on internet.

The relay turn on, if you connect the input to ground.
But if the relay off, the raspi gpio output turn 3.3v on.
Over relay input, the output becomes 5V and burns the gpio input diodes and output transistor.
Ok this works for a while, but later ?

1 Like

Ii believe there is a flaw in your logic. Note that in series with the GPIO output are two forward biased diodes, the LED and the optoisolator. If you look at the specs of those you will find that in combination the minimum forward volt drop is at least 1.7v so the gpio pin will not be pulled higher than 3.3v.

[Edit] I have just re-measured the open circuit voltage on one here and it is 2.9v.
In addition, if you only supply 3.3V to VCC then there may not be enough current when the GPIO output is low to fully drive the opto isolator, so you can end up with the transistor not turned fully on and it may overheat.

Update: Turns out to be an underpowered issue. Hooked up one of the power blocks from one of the other pi3's and it started working.
Thanks everyone. Could not have getting to this stage without you guys.
Gratefull!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.