Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more outputs #28

Open
diegotam855 opened this issue Feb 20, 2025 · 3 comments
Open

Adding more outputs #28

diegotam855 opened this issue Feb 20, 2025 · 3 comments

Comments

@diegotam855
Copy link

diegotam855 commented Feb 20, 2025

Hi and thank you so much for your work!

I tried to add more output pins to the list in the file gpio_list and I got 3 more to work, also shown in the UI relay page and in the settings menu.

Not sure if it's a good idea though..

But when I try to add another one (the 10th relay output), it does not work and all the pin outputs got mixed up.

Can you please help me to make this to work?
I would love if you integrate more outputs in the next update.

@diegotam855
Copy link
Author

diegotam855 commented Feb 20, 2025

Now the file gpio_list looks like this:

#### LEGACY assignments for Relay 1, 5 and 6 and Dig In 4
#### WILL CONFLICT with second channel on WaveShare dual channel CANbus hats, a                                                                                                             >
####    interrupts, chip selects and second SPI bus
#### single channel CANbus hats should be OK with these assignments
####    this includes using only the first channel of the WaveShare dual channe                                                                                                             >
#### note that WaveShare sells two different dual channel CANbus hats: the non                                                                                                              >

### for use by the RpiGpio package on Raspberry PI platforms ONLY

# This is a list of GPIO pins, set by the script /etc/rcS.d/S90gpio_pins.sh
# They are documented at: https://github.com/victronenergy/venus/wiki/bbb-gpio
# Format: <pin_number> <direction: in/out> <name>
#
# The <name> part is used to create an symlink in /dev/gpio.

# relays are active HIGH
# Relay 1   GPIO 21 / header pin 40
21  out relay_1
# Relay 2   GPIO 17 / header pin 11
17  out relay_2

# Relay 3   GPIO 27 / header pin 13
27  out relay_3
# Relay 4   GPIO 22 / header pin 15
22  out relay_4
# Relay 5   GPIO 23 / header pin 16
23  out relay_5
# Relay 6   GPIO 24 / header pin 18
24  out relay_6
# Relay 7   GPIO 4  / header pin 7
4   out relay_7
# Relay 8   GPIO 18 / header pin 12
18  out relay_8
# Relay 9   GPIO 25 / header pin 22
25  out relay_9
# Relay 10   GPIO 20 / header pin 38
#20  out relay_10

# these have pull UPs
# Digital input 1   GPIO 5 / header pin 29
5   in digital_input_1
# Digital input 2   GPIO 6 / header pin 31
6   in digital_input_2

# in stock code these have pull DOWNs
#### modified to pull UPs by the GPIO overlay that is installed as part of this                                                                                                             >

# Digital input 3   GPIO 13 / header pin 33
13  in digital_input_3
# Digital input 4   GPIO 19 / header pin 35
19  in digital_input_4
# Digital input 5   GPIO 26 / header pin 37
26  in digital_input_5

#### Gracefull shutdown input
#### Note this input is NOT added to the available I/O used by Venus OS !!!!
# GPIO 16 / header pin 36
16  in digital_input_6

@kwindrem
Copy link
Owner

I recall there is some hard coded limit to the number of GPIO pins but don't recall what it is. Sounds like it's 9.

This is not something I have any control over as it's in the lower levels of Venus OS.

There is an enhancement that uses a separate module that connects via ModBus that can expand the number of digital inputs and relays 18. You might look into it:

https://github.com/Lucifer06/RemoteGPIO

Note that it's gpio_list file uses relay_1 through relay_9, then relay_a, relay_b, through relay_i. No guarantees that would work with RpiGpioSetup though.

@diegotam855
Copy link
Author

I think I’m going to stick with 9 relays then.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants