craftbeerpi3 icon indicating copy to clipboard operation
craftbeerpi3 copied to clipboard

No invert option

Open Mrpond1970 opened this issue 7 years ago • 25 comments

Hi

can't find a invert option on any screen when adding an Actor. Missing from CBPI 2.2

Mrpond1970 avatar Jun 24 '17 22:06 Mrpond1970

Rather than having an invert checkbox for each actor the current convention is to choose an inverted actor. For example Relayboard is an inverted version of GPIOsimple and is available as default. Alternatively there is a inverted PWM available as a plugin which you can install. Hope that makes sense.

jalim avatar Jun 25 '17 10:06 jalim

Hi Jalim

I have the official board all setup and working so if i install the the inverted PWM i use that for my pumps and heater?

Mrpond1970 avatar Jun 25 '17 10:06 Mrpond1970

It depends on how you have your relays wired but if you're finding that they're on when they should be off then yes the inverted PWM plugin should solve this.

jalim avatar Jun 25 '17 10:06 jalim

Thanks Jalim

I will give it a go and update later

Mrpond1970 avatar Jun 25 '17 10:06 Mrpond1970

I tried the Inverted PWM tonight and still the same

Mrpond1970 avatar Jun 26 '17 21:06 Mrpond1970

When you say still the same, can you detail the problem that you are experiencing?

jalim avatar Jun 27 '17 00:06 jalim

Hi Jalim

When the pump and heater buttons are in the off position the heater and pumps come on and when in the on position both are off. This was not a problem in 2.2 because i ticked the inverted boxs. I setup Inverted PWM and still have the same results. I will be honest though I'm not sure how to set PWM up but i set the Cycles Per Second in - position and + position and it did not change anything.

Mrpond1970 avatar Jun 27 '17 16:06 Mrpond1970

Inverted PWM - Just had a look at the Plugin details and its only for people running there heater relay in inverted mode. No Inverted mode on version 3 yet

Mrpond1970 avatar Jun 27 '17 16:06 Mrpond1970

I will add an inverted PWM Plugin

Manuel83 avatar Jun 27 '17 20:06 Manuel83

+1 for this please.

fuzzewuzze avatar Jul 07 '17 03:07 fuzzewuzze

You don't need an invert option. The RelayBoard actor type is identical to the GPIOSimple actor type except it is inverted. RelayBoard actors should be identical to 2.2 actors with the inverted checkbox checked.

If you need inverted GPIOPWM there is a plugin for that https://github.com/seesser/InvertPWM

carlallen avatar Jul 09 '17 05:07 carlallen

Great ill try it thanks.

All the more reason for better documentation then i suppose.
CBPI is amazing, but the lack of documentation about what things do needs some work :)

fuzzewuzze avatar Jul 09 '17 17:07 fuzzewuzze

it's free and open source software, created by a community in their spare time. If you want better documentation, you are free to write it and submit it.

carlallen avatar Jul 09 '17 19:07 carlallen

+1 Personally I would rather see an inverted checkbox (like hide) next to GPIO pin combo box so any add-on that used GPIO selector could just select inverted or not? That would save having to write an inverted version of some add-ons wouldn't it? To me having an extra add-on just to have inverted feature is confusing and may not be updated when the base add-on is. Relayboard is not intuitively the inverted version of GPIOSimple. At least have a naming convention like GPIOSimple (Inverted) instead and put for use with a Relayboard in the comments.

jtaylor54 avatar Jul 10 '17 12:07 jtaylor54

The problem with having a universal inverted checkbox is some actors don't have the option to be inverted. As an example: A wifi outlet is only going to have on and off.

carlallen avatar Jul 15 '17 21:07 carlallen

It might be sensible to have just a single GPIO and PWM actor with a drop down to select inverted? Would be as simple as adding a selection property to the default GPIO and PWM plugins.

jalim avatar Jul 15 '17 21:07 jalim

in the case of the built in GPIO actors maybe. There isn't a built in inverted PWM actor... so it wouldn't apply there.

carlallen avatar Jul 15 '17 21:07 carlallen

I've not really looked at the PWM actor in too much detail but am I right in thinking you simply invert the duty cycle? IE 100% duty cycle for an inverted PWM is actually 0% duty cycle? All I'm thinking is that both the SimpleGPIO and PWMGPIO base plugins should have an invert option added. I'll have a play around with it tonight.

jalim avatar Jul 15 '17 23:07 jalim

well, right now the pwm actor doesn't really work particularly well. And the way it is currently written you wouldn't be able to just invert the power.

carlallen avatar Jul 15 '17 23:07 carlallen

You're right, it needs a few changes. I've noticed the term duty cycle being used in the PWM actor where it should really be titled frequency and may be confusing some people.

jalim avatar Jul 15 '17 23:07 jalim

@carlallen

The problem with having a universal inverted checkbox is some actors don't have the option to be inverted. As an example: A wifi outlet is only going to have on and off.

But does that actor have a GPIO Pin Selection dropdown? I was thinking only have it when the GPIOPin Selection dropdown is shown.

jtaylor54 avatar Jul 16 '17 13:07 jtaylor54

Hello, any solutions? i`m using GPIO Simple and y need invert de output signal in the GPIOs. I intalled the inverterPWM plugin but no is the solution.

germanherbik avatar Jul 27 '18 21:07 germanherbik

@germanherbik , to invert, you need to use the RelayBoard actor. The RelayBoard actor is the same as GPIO Simple only inverted.

HooTsBrooklyn avatar Jul 27 '18 23:07 HooTsBrooklyn

@HooTsBrooklyn i have this RelayBoard https://www.switchelectronics.co.uk/5v-16-channel-relay-board-module and the problem is when shutdown the raspberry, because when the raspberry is OFF all the relays are OFF, but when the raspberry y ON and the crafbeerpi is runing (when the actors OFF) all the relays are ON. If i will connect NC and COM when the raspberry is OFF y have all working!

Sorry if i have bad english!

germanherbik avatar Jul 28 '18 01:07 germanherbik

I have a similar board (https://www.amazon.com/gp/product/B01MT1MI8N). Mine is switched with 5v and the GPIO pins only send 3.3v. I had to use two ULN2803 (8-channel Darlington Array) IC chips to make it work.

HooTsBrooklyn avatar Jul 28 '18 02:07 HooTsBrooklyn