Need to use gpio 2-4, 7-11, 14-15, plug in header

I have a 16 channel Sainsmart relay.
I am using the SainSmart 16-Way Level Conversion Module for Raspberry Pi
its a nice little header 3.3 to 5v converter.
BUT I need to use pins 2-4,7-11 and 14-15 as high/low outputs.
Is there any way to edit pins/swap gpio’s or a way to enable those pins as outputs for my home automation project.

So far its a web menu I’ve made to control the relays with python and php but I would like to try to use this cayenne setup.
I do not want to have to use wires and separate the converter from the pie header and then use wires do to the gpio exchange as the 16ch relay is already in the attic with everything wired up and they would mean more wires that could come lose and a housing or mounting solution for the level converter.

Hi mase
Nice to see you using the 16 channel relay board I’ve perched one myself but did find the 5v to 3.3v a problem I had to make a board up to control it with my pi,
Are you creating your switchs on the cloud or are you using the app?
I have 9 of the relays running (eventually) this are the pins I am using.


The pins that I’ve left free are for another project :zipper_mouth_face:

the pins to the sansmart header are
2
3
4
17
27
22
10
9
11
14
15
18
23
24
25
8
sainsmart 16 channel level converter

I installed the app and it lets me use the pin 2 and 3 etc… but pin 4 still auto-deletes when I try to add it as a button.

I plan on installing some sensors too. maybe a few PIR.
Still have to figure out how to get the lights to come on when the PIR is tripped.

I will have a go tonight see if I can use the pin 4 for as a switch only problem I can think of pin 4 is set for ( 1 wire censer) but in the settings menu it can be disabled I maybe wrong I’m still a noob.
Sorry to come back with a question but on one of your posts you have a app which shows the state of the power out of the relay are you using an ic chip to detect the output?

@mase.hacker

Mase,
If the lights have plugs on them (guessing that’s not the case) this switch is super nice-
http://www.amazon.com/Iot-Relay-Enclosed-High-power-Raspberry/dp/B00WV7GMA2/ref=cm_cr_arp_d_product_top?ie=UTF8

@bestes turned me onto this one and I’m very happy with it-

-Ian

Hi mase
I just tested pin 4 on my pi and relay board and all worked ok.

So in my noob logic
1st you need to disabled the 1-wire option at the bottom of the menu in settings.
2nd go too Gpio menu and select Gpio 4 and set it as an output.
3rd go to your add device menu and add the relay as normal.

Hope this helps and if there’s any more info on 16 channel board you have by all means pass it my way.
This guy on you tube don’t now how he’s got his board working but he has his pi connected straight to the board. Raspberry Pi: 16 Channel Relay how to with example software for automation projects - YouTube
This was one of the reasons why I perched mine.

Haven’t messed with it in days working on an aquaponics system.
I had to get the pi 16 channel 2.3v to 5v converter. I have no clue how he did his without the converter because on the 16 channel as soon as you hook up the power you get 5v through the 5v lines and then if you high a gpio the 3.3 triggers the relay and the 12v thats on the relay lets 5V from the board pass through the gpio and shorts the board and it overheats and locks up. I’ve tried this on 3 diff 16ch relay boards and it multimeters the same on all boards. maybe its a 5v assist or something on the board but it messes up the pi’s.I’ll try pin 4 again tomorrow when I go back home.
look at the amazon sainsmart link i posted a few post ago.

Yes mate.
These video can be misleading but when you are faced with these problems I think that you learn a lot more About the ins and outs of what you are working on and become better for it. (To understand how things work you need to let the smoke out)

Still not working on pin 4… It wont let me turn off i2c or 1wire in the options. I flick them off they come right back on.

Can you change the settings through raspi-config in your Pi?

You can then go to Advanced options → disable I2C.

In case you need a link: Raspberry Pi Documentation - Configuration

We still need to complete the settings section in Cayenne dashboard…it’s read only now. We’ve been dedicating most of resources to Arduino, custom code, API, and custom drivers, and a new ‘Projects’ centric dashboard. We plan to do some house cleaning (like finishing the settings section) after we get these big features out the door.

-B

that fixed the i2c problem but the 1wire must still be read only because it wont un-check/flip and just turns itself back on immediately.
It wouldn’t be a big deal at all if the sainsmart 16ch level converter wasn’t a shield forcing you to use those pins.
15 relays working fine is more than enough usually and I have some temp sensors to use on the remaining gpio and maybe a few PIR sensors

Hi mase
Just thought you might like my version of the conversion board.


If you can see I’ve used the 5v out on the board as a Ian to power the pi.

thats cool. I’ve been working on an arduino with NRF24l01+ wireless modules and I was just going to use it to send data back to the pi but now I am thinking I might hook a 2relay sainsmart to it and have it send the temp/flow data back to the pi and recieve commands from the pi to flip the 2 relays on/off.

Still a work in progress as I am waiting for the relay and the temp sensor and the flow sensor was on backorder…