Trigger Relay from Kegboard Pro Mini

I use I-button authentication which is great BUT I need to be able to trigger my solenoid valves when a user successfully authenticates and shuts off at the end of a pour. Currently users can pour as a guest without authenticating as I have no way to trigger the solenoids automatically (so they are permanently open) which kinda’ makes the authentication pointless.

All my solenoid valves are and powered by a single relay, I believe there are 2 unused pins in the KBPM jack - can one or both of them be used to trigger a relay and if so, what additional hardware will I need to achieve this, is there a relay board that can be purchased ‘off the shelf’ to make this work?

Thank You very much for any guidance on this as I am pretty desperate to get my kegerator ‘locked down’ & prevent my beer disappearing when I’m not around.

Mark

Can’t say whether it works, but I’m on a similar track:

According to mikey, of the two unused pins: GP2 is digital (D8) & GP3 is analog (A5)

For me, I set A5 as both RELAY_A and RELAY_B in my KBPM’s firmware. So far it’s only been tested using the command line tools provided, but when it tests toggle0 and toggle1 my attached relay lights up since both toggles are tied to the same pin. Nothing tested, set up (no solenoids yet, just a relay), or configured in production yet.

What I am HOPING here is that the following will work, but I daren’t experiment until someone offers a bit of guidance…

I have one of these little Arduino relay boards (5v version): http://www.ebay.com/itm/231239289082?_trksid=p2059210.m2749.l2648&var=530462519616&ssPageName=STRK%3AMEBIDX%3AIT

My thought was if I take pins 2 (Orange +5v) and 5 (Blue/White GND) and connect them to the DC + and - connections on the board, I can then trigger the relay by connecting Pin 7 (Brown/White GP3) to the IN1 or IN2 connector. Am I correct with this or way off?

If I am correct I have 3 questions…

  1. Should the jumper be set to High or Low?
  2. Will the relay trigger as soon as my I-button authenticates a user?
  3. When the relay does trigger, is it momentary, will it turn off as soon as a pour times out/Done Pouring button is clicked or is it on for a timed period set in the app?

Thank you VERY VERY much in advance for anyone who can shed a bit of light on this for me.

Mark

Anyone? I have a 50 liter Keg of Boddingtons English ale sat in my kegerator untapped as I don’t want it to disappear and need the solenoids active to protect it. The valves are installed and on a 12v circuit, I have the 5v relay board and KBPM to switch it, my I-button reader is authenticating users correctly I just need help making sure I wire it correctly and don’t fry anything.

I’ve spent the past 2 days searching for a solution all over the web and from what I can tell my post above may be correct if I use GP2 rather than GP3 to trigger the relay board but I’d still like to know if this is the case before I join any wires and also have the same 3 questions I posted a few days ago…

  1. Should the jumper on this relay board be set to High or Low?
  2. Will the relay trigger as soon as my I-button authenticates a user, if not how do I trigger it from the KBPM?
  3. When the relay does trigger, is it momentary, will it turn off as soon as a pour times out/Done Pouring button is clicked or is it on for a timed period set in the app?

PLEASE reply if you know the answer to this so I can get my new keg online.
Thank You in advance.

Honestly, I’d tap it.

To start, you have to edit the code and then compile & re-flash your KBPM’s firmware to even bring out A5-as-RELAY_A/B. So if you’re not comfortable with that, it’s kind of a non-starter.

  1. Unless I’m mistaken and can be corrected by the mods, the code path in pycore that normally wrote to the relay pins (er, ‘consumed published SetRelayEvents’) has been disabled since what appears to be around the second git commit of pycore or so. I’m looking into re-enabling it (and disabling some other paths) in my personal setup, but that’s not really something to wait on tapping beer for. And that’s in kegberry-land. If you’re on the android tablet setup, well, maybe somebody can chime in as to how that works?

  2. From what it looks like in the pycore debug logs, the former is what’s supposed to happen. Your 1-wire might trigger “done” also simply by removing it from the reader.

If you set it up right, you can tell your friends that every pour is recorded and announced by email and/or twitter. If they’re still pouring and not paying you back or disabling your KB setup before pouring, wow are your friends jerks.

(wither “DIY Corner”?)

Thank You John,
I’m hoping Mike or someone can chime in with something more positive towards this working for me as sadly I wouldn’t know where to begin in compiling and flashing firmware, and to complicate it more I’m using a different firmware I believe which Mike made to fix a bug just to get the I-buttons working as they don’t work on the current official release.

The server I’m running is what is out there as the Digital Ocean install, only I installed it on my own virtual Ubuntu box rather than on a hosted one. I thought that was the Kegberry install however it is running on a Linux box and is attached to an Android tablet with 3 KBPM’s that run the 6 taps.

As for my friends and the beer yes, the tricky thing is that I live on a small ranch and about 20 people use my kegerator (it is a 6 tap system I built from a big old freezer which holds 8 kegs) who are a mix of friends, relatives, neighbors and guys who help me out on the farm. Treating the guys to a couple of pints is what I’ve always done and wasn’t so much of a big deal when I had cheap beers on there but now I’m tapping $200+ European kegs with the added expense of being on Nitro I just can’t afford to let them loose with it. The camera feature helps but another bug with kegbot is that it only automatically takes pictures on one of the two taps attached to each KBPM so at best I can only keep track on half my taps and even then it is far from secure. My kegerator is too big to banish everyone from and just use for myself with one or two kegs in but I can’t afford to keep it online for others if I can’t track and charge the others accordingly so I’m in a bit of a catch 22 situation.

What really sucks is that with 6 taps it’s just cost me over $1200 to put in the flow valves, solenoids, I-button and buy a tablet to do this but now I find it isn’t really of use to me as I can’t operate the solenoids. It’s quite disheartening really but I’m hanging in there in the hope there is a simpler solution available than what you just mentioned.

Anyway, thank you again for replying.

Mark

My thought was if I take pins 2 (Orange +5v) and 5 (Blue/White GND) and connect them to the DC + and - connections on the board,

KBPM is not rated to power an external device this way; we do not recommend doing this.

The spare GPIO on the KegJack will be exposed in a future firmware update. I do not have an ETA yet but expect about a week or two. This would allow you to use the existing “Flow Toggle” support in the app, which is designed for this purpose (enable an output while an authenticated pour is in progress).

mike

OK, great, thank you Mike. I’ll buy an external power supply (or would it be o.k. to use a USB cable from the same powered hub all my KBPM’s are powered by?) to power the relay board.

RE the keg, I can hold off tapping my expensive beer for a week or so until this is working and I’ll put a corney of homebrew on to see us through.

Thanks again
Mark

It’s probably OK to power your relay device from a USB hub – but I don’t know its specifications.

Do remember that this is one of the lesser-used software features of Kegbot which in addition requires you to buy/build hardware that we don’t directly support. I just want your expectations to be set appropriately regarding access-control features; there’s a reason we don’t market valve access control prominently (if at all) on the kegbot site.

Thank You Mike, I understand the relay board isn’t sold/supported by you. What I purchased is supposed to be for the Arduino and can be triggered by a Leonardo which I believe is what one of the unused GP pins in the KBPM will do when activated in firmware,

When working with the toggles, will it require that the I-button remain in the reader during the pour and will turn off when removed, will it turn off when ‘done pouring’ or is it a timed event?

Thanks

Mark

Great – it sounds like you have a good handle on the work you need to do.

It should turn off when the ibutton is removed, but right now only turns off when “done pouring”, which is a bug we’ll fix. (“Done pouring” also has a timeout.)

Actually I don’t think its a big deal working via ‘Done Pouring’ as it allows us to authenticate by touching the ibutton reader (I keep mine on a retracting key holder so I don’t lose it) rather than needing to leave the I-button in. As long as it turns off with the pour timeout it isn’t a big deal if someone forgets to click the ‘done pouring’ button. I could see people forgetting to remove their I-buttons if they have to leave them in place during the pour.

The specs of my relay board are (this is for the 4 relay board but the single one I’ll use requires the same current to trigger & has the same high/low option):
Module description:

  1. Maximum load on normally open pin: AC 250V/10A, DC 30V/10A.
  2. Trigger current 5mA;
  3. Module can be set high level or low level trigger by jumper wire;
  4. Power indicator light (green), relay status indicator light (red);

Module interface specifications:

  1. DC+ : DC power supply positive pole
  2. DC- : DC power supply negative pole
  3. IN1~IN4 : relay signal triggering pin

High or low level trigger option:

  1. S1~S4:They are option switch for relay 1~4;
  2. It is low level trigger if COM pin connect to LOW pin; It is high level trigger if COM connect to High.

Out of curiosity, what is the power rating?

I just found this relay on Amazon for $10 which I think will do what I’m hoping regardless of the power rating of the KBPM, can you please take a quick look and see for me please…
http://www.amazon.com/gp/product/B00M3MDE10/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

It isn’t a great picture on there but it appears that I can remove the 2 little jumpers which connect DC+ & DC- to JD+ & JD- then connect an external power supply to the JD+ and JD- which will power the relay coils without drawing KBPM power and on the terminal block I can connect the 5v+, GND and GPIO from the KBPM which will simply provide the trigger signal but without requiring the power to operate a coil.

Thanks
Mark

Mike,
I finished wiring in my relay (the new one from Amazon shown above) tonight, have it connected to all my solenoids and put my Boddingtons keg in to start cooling so I’m all ready for testing out the new firmware.

Please let me know when it is ready for a trial run so I can tap the keg and see how it works.

Thank You again for all your help so far and in advance on this one.

Mark

Hi Mike,
Are you any closer to an ETA yet? I’m getting pretty desperate to lock my kegerator down now.

Thank You
Mark

I’m also interested in the trigger function for solenoids. Is there any news about this function or have anyone resolved this problem in another way with the existing application and KBPM?

Bjorn

Mike is still working on it - He said last week he’s working on a KBPM firmware for me to test but I still haven’t received it. Hopefully I’ll have it in a day or two and I’ll be able to offer more info then.

Thanks for your patience, gang. Won’t happen tomorrow, but this is the first priority for this nice long holiday weekend. Update soon.