NEW StrangeBrew Elsinore Thread | Page 18 | HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Homebrew Talk

Help Support Homebrew Talk by donating:

  1. Dismiss Notice
  2. We have a new forum and it needs your help! Homebrewing Deals is a forum to post whatever deals and specials you find that other homebrewers might value! Includes coupon layering, Craigslist finds, eBay finds, Amazon specials, etc.
    Dismiss Notice

NEW StrangeBrew Elsinore Thread

Discussion in 'Electric Brewing' started by DougEdey, May 18, 2014.

 

  1. jangevaa

    Well-Known Member

    Posted Feb 20, 2015
    There are several autotuning methods available. How difficult do you think it would be to add this sort of utility? Seems like there is a huge demand for it. Obviously you wouldn't want to autotune when mashing, but to do it once to get a ball park to how quickly your system registers temperature changes and the like.
     
  2. DougEdey

    Well-Known Member

    Posted Feb 20, 2015
    The problem I have with autotuning is that I've seen people do it with 1 gallon in their vessel and complain it doesn't work. It's not difficult to understand how to tune it yourself then you can manually set the values depending on what you're doing, i.e. if you want to make a half batch.
     
  3. geneda

    Member

    Posted Feb 21, 2015
    Triggers were a fantastic idea, they work great.

    How about a trigger on a timer that can go out to a LED or Buzzer via GPIO.

    Thanks for the wonderful software, Doug.
     
  4. DougEdey

    Well-Known Member

    Posted Feb 21, 2015
    Sorry, I was on my phone and the HBT app doesn't work well :( I welcome the input, but I am not an Engineer :) I've self taught myself this stuff.
     
  5. DougEdey

    Well-Known Member

    Posted Feb 21, 2015
    Just add it as a pump, the pumps are going to renamed when I get round to it, but they are just dumb GPIO toggles. So you can create one called "LED" or "Buzzer" and have it activate after a timer step.
     
    jangevaa likes this.
  6. geneda

    Member

    Posted Feb 22, 2015
    Perfect! Keep up the GREAT work!

    Wasn't a buddy of yours going to release a board to make GPIO config a little easier? What's the status?
     
  7. zombiekai

    Member

    Posted Feb 22, 2015
    Has anyone else had the triggers not be there when you come back to your system? I have used my set up a few times, but when i logged in last night to set for my brew day today my triggers where gone.
    tried updates and pull nothing worked. New clone and its perfect again.

    Thanks for all your work
     
  8. cank

    Well-Known Member  

    Posted Feb 22, 2015
    Doug,
    I am on a spending hiatus from brewing equipment for a while and was wondering about some modifications to the PH_sensor java file because I don't have a DS2450 converter. However I do have a MCP3008 ADC chip.

    I have it hooked up to the Pi and can read ph values from it and was wondering if you could point me in the right direction to go in order to get Elsinore to read it.

    D-out is on GPIO9 but Elsinore restricts to 7. Would it be possible to select which channel to read from the MCP3008 instead of which DS2450 address?

    Here is the python code that I used to get a reading:
    Code:
    import spidev
    import time
    spi = spidev.SpiDev()
    spi.open(0,0)
    # read SPI data from MSP3008 chip, 8 possible adc's (0-7)
    def readadc(adcnum):
    	offset = .29
    	if ((adcnum > 7) or (adcnum < 0)):
    		return -1
    	r = spi.xfer2([1,(8+adcnum)<<4,0])
    	adcout = ((r[1]&3) << 8) + r[2]
    	#formula to convert voltage into ph value (-.29 is my callibration offset)
    	adcout = float(adcout*5)/1024*3.5-0.29
    	return adcout
    
    while True:
    	#to read all 8 adc inputs 
    	#for adcInput in range(0,8):
    	#to just read channel 0
    	for adcInput in range(0,1):
    		#print "ADC(", adcInput,")=", readadc(adcInput)
    		print readadc(adcInput)
    	time.sleep(1)
    
    
    Some sites I used to get MCP3008 info:
    http://www.raspberrypi-spy.co.uk/2013/10/analogue-sensors-on-the-raspberry-pi-using-an-mcp3008/
    http://raspberrypi-aa.github.io/session3/spi.html

    And let me know if this is too much to ask for. :mug:
     
  9. geneda

    Member

    Posted Feb 22, 2015
    Yes, same thing happens to me - no triggers, until I new clone again.
     
  10. DougEdey

    Well-Known Member

    Posted Feb 22, 2015
    Do either of you two see any error messages on the console when it fails to add? Either the javascript console or the terminal console?

    I haven't done any updates, and the triggers are only stored until Elsinore shuts down. They are not persistent.
     
  11. DougEdey

    Well-Known Member

    Posted Feb 22, 2015
    Possible, but I can't do any coding until the middle of March and I don't have the MCP3008 to test with so it'd be blind.
     
  12. DougEdey

    Well-Known Member

    Posted Feb 25, 2015
    Just so you guys know I am still working on stuff, [​IMG]

    This is the first pass of viewing hop additions and the mash profile (the recipe I'm using is bad and found a load of bugs for this testing), the hop additions here are both for the boil additions and fermentation additions (about to be broken out) and there's obviously no "prettiness" yet.
     
    jangevaa and ArmOnFire like this.
  13. DougEdey

    Well-Known Member

    Posted Feb 25, 2015
    So, I was discussing this project with an engineering friend of mine and he pointed something (which is now immediately obvious to me) out about the beaglebone black.

    It's _Single_ core. So it's slow due to the multithreading that Elsinore uses.

    He has been planning to do a much more slimmed down and specific PID controller for his job and they are using the RaspberryPi 2 because it is multicore.

    So, if you currently use the BeagleBone black and can live with the performance issues, you're fine, but I would recommend people use the RaspberryPi 2 instead.
     
    zombiekai and jangevaa like this.
  14. JayElDubya

    Well-Known Member

    Posted Feb 25, 2015
    Only the newest pi is multi-core. Are you saying that SBE runs better on all pis (including the single-core & slower-clocked versions...not the newest) and that the BBB with its faster processor and more ram isn't advantageous for this specific application? I know its a weighted question with loss of "ifs and ors" based on implementation, but I have to think the bbb would have a leg up on the older versions of the pi.
     
  15. DougEdey

    Well-Known Member

    Posted Feb 25, 2015
    Yes you're right, I thought I'd put the 2 in. Editing
     
  16. DougEdey

    Well-Known Member

    Posted Feb 25, 2015
    So hosehead now uses the RPi2, so anyone using hosehead gets an immediate huge performance boost (I've ordered an RPI2)
     
  17. blitzer

    Active Member

    Posted Feb 25, 2015
    do you see any problem using old raspberry (b+ 512mb)? Slowness apart

    Finalizing the control panel/box for the ebiab 100 liters pot with stainless steel stirrer, should be up and running in march!
     
  18. DougEdey

    Well-Known Member

    Posted Feb 25, 2015
    No, there are some people who have said OWFS doesn't work (or indicated it's not easy to setup) on the newer kernels, but I haven't look yet.
     
  19. zombiekai

    Member

    Posted Feb 25, 2015
    I have no problems running on my RPi b+ when I keep it to 3 temp probes and 3 switches. I had 5 probes and used 6 SSR. I Had some issues with UI freezing up when I would try to do to much. Works great now.
    I already ordered my new RPi 2.
     
  20. DougEdey

    Well-Known Member

    Posted Feb 26, 2015
    [​IMG]

    More progress, this now is a popover (just need to tidy up some widths as you can see), and add the code that actually creates the triggers. Should be ready to push today or tomorrow (as well as a buttload of other changes, my changelog will be scary).
     
    jangevaa likes this.
  21. jangevaa

    Well-Known Member

    Posted Feb 26, 2015
    Looking good. Is the idea that the user will receive notifications for each hop addition? Perhaps a boil timer that starts when boiling temp detected?
     
    KiwiRob likes this.
  22. DougEdey

    Well-Known Member

    Posted Feb 26, 2015
    I'll just leave this here and this too
     
    jangevaa likes this.
  23. JayElDubya

    Well-Known Member

    Posted Feb 27, 2015
    I really love where this is all heading. Looking really great Doug.
     
  24. DougEdey

    Well-Known Member

    Posted Feb 27, 2015
    [​IMG]

    I'm done for the night, a few UI bugs to sort out in the morning then I'll be pushing a boatload of changes........................................
     
    jangevaa and DeadHead_Brewering like this.
  25. DougEdey

    Well-Known Member

    Posted Feb 27, 2015
    Alrighty, so a huge update is pushed to a new branch so it can be tested whilst I fix some fine tuning issues.

    Features
    • BeerXML can be uploaded and used to set mash profiles, boil hop timers, fermentation profiles, and dry hop timers.
    • Pumps have been renamed to "Switches" to more accurately indicate what they do.
    • Convert to intellIJ from Eclipse for development due to much better Git and Maven integration.
    • Started to add tests

    Bug fixes
    • Lots of UI layout fixes/improvements (in my opinion)
    • Errors from the temperature probes are now displayed correctly.
    • When the data recorder is disabled, triggers are now shown correctly.
    • When the UI is locked, the recorder is not disabled
    • Various other minor issues I noticed and can't remember, mainly backend "wtfs"


    If you want to test the changes, run:

    Code:
    git fetch
    git checkout beta
    You will need to recreate the switches, (previously pumps) but everything else should be the same.

    I'll upload videos when I finish fixing the minor layout issues I have left. I'll also get documentation updated over the next few days.
     
    jangevaa and DeadHead_Brewering like this.
  26. noisycm

    Member

    Posted Feb 27, 2015
    Trial and error method starting from common temperature control parameters:
    Kc = 2-10 (Reduce overshoot by decreasing)
    Ti = 2-10 min (Reduce overshoot by increasing)
    Td = 0-5 min (start with 0 especially with a noisy measurement)
    (Proportional Band % = 100 / Gain; Gain of 2 = 50 PB%)
    PI interaction tuning map: P = Kc, I = Ti, D = 0

    Or use the FOPDT model for the scientific approach to tuning (first order plus dead-time model):

    Find Kp, Tp, and Өp for your system while in manual mode.
    Process Gain - Kp - How Far
    Process Time Constant - Tp - How Fast
    Dead time - Өp - How Much Delay

    Use standard Internal Model Control correlations to arrive at the closed loop time constant, Tc.
    Aggressive action: Tc is the larger of 0.1*Tp or 0.8*Өp
    Moderate action: Tc is the larger of 1*Tp or 8*Өp
    Conservative action: Tc is the larger of 10*Tp or 80*Өp

    Plug Tc, Kp, Tp, and Өp into the following tuning parameter equations (setting these up in a spreadsheet will allow adjustments of Tc later).
    Proportional: Kc = 1/Kp * (Tp+0.5*Өp)/(Tc+0.5*Өp)
    Integral: Ti = Tp + 0.5*Өp
    Derivative: Td = Tp*Өp/(2*Tp+Өp)

    Enter Kc, Ti, and Td as P, I, and D tuning parameters. Pay attention to units.

    PID Control of a heat exchanger
     
    jangevaa likes this.
  27. DougEdey

    Well-Known Member

    Posted Feb 28, 2015
    Fixed the lock button not appearing, I'd missed a character out, some browsers fixed it for me, but firefox/IE didn't. The changes are in the beta branch for the moment
     
  28. jangevaa

    Well-Known Member

    Posted Mar 1, 2015
    Checked out the beta version today, looking very sharp!
     
    DougEdey likes this.
  29. jangevaa

    Well-Known Member

    Posted Mar 1, 2015
    I interface my probes with ethernet cables. Will an ethernet switch work in extending the number of probes I can connect?
     
  30. DougEdey

    Well-Known Member

    Posted Mar 1, 2015
    I don't think so, switches normally have chips in them for filtering packet data. If you daisy chain connections, you'll be fine.
     
    jangevaa likes this.
  31. DougEdey

    Well-Known Member

    Posted Mar 1, 2015
    jangevaa likes this.
  32. JayElDubya

    Well-Known Member

    Posted Mar 1, 2015
    No. Ethernet switched are designed to handle Ethernet frames, your sensors speak 1-wire, not Ethernet. However, the beauty with 1-wire is that you can have hundreds of sensors all on one wire. Each sensor will need a +5v and a ground, both of which can be shared like any other DC device and also a data line which can be tied to the data line of all of your other 1-wire devices. My point is, you don't need a switch at all, just add more rj45 ports to your control box, tie the +5v lines together, tie the grounds together, and tie the data lines together. You'll only be using 1 gpio port on your pi/bbb.
     
    jangevaa likes this.
  33. JayElDubya

    Well-Known Member

    Posted Mar 1, 2015
    Dupe.
     
  34. JayElDubya

    Well-Known Member

    Posted Mar 1, 2015
    Dupe.
     
  35. jangevaa

    Well-Known Member

    Posted Mar 1, 2015
    Thanks, I wasn't quite sure how ethernet switches worked. I understand the simplicity of one wire. Basically I was looking for simple external box I could use to do this instead of performing surgery on my control panel. I do have more ports available on my control panel, just wish I wired them up in the first place.

    [​IMG]
     
  36. DougEdey

    Well-Known Member

    Posted Mar 2, 2015
    Jangeeva: can you run: lshw -c bus -xml

    On your system, you have some exceptions which shouldn't happen.
     
  37. jangevaa

    Well-Known Member

    Posted Mar 2, 2015
    Wasn't as tight as I thought it was, was able to make full use of my patch panel... now I can have 7 temp probes.. but who has that many anyways [​IMG]

    I only have 6 :)
    [​IMG]

    Boom. Unnecessary images I know, but I'm excited.
    [​IMG]
     
  38. jangevaa

    Well-Known Member

    Posted Mar 2, 2015
    Oh, thanks Doug... here.

    [email protected]:~/beta_sb# lshw -c bus -xml
    Bus error
     
  39. DougEdey

    Well-Known Member

    Posted Mar 2, 2015
    Hmm, it appears you may have a bad kernel/module/driver combo. Hence why it errors. That's annoying.
     
  40. jangevaa

    Well-Known Member

    Posted Mar 2, 2015
    Interesting. Works if I specify -disable dmi. I have no idea what this is :fro:

    [email protected]:~/beta_sb# lshw -disable dmi -c bus -xml
    <?xml version="1.0" standalone="yes" ?>
    <!-- generated by lshw-B.02.16 -->
    <!-- GCC 4.6.3 -->
    <!-- Linux 3.8.13-bone50 #1 SMP Tue May 13 13:24:52 UTC 2014 armv7l -->
    <!-- GNU libc 2 (glibc 2.13) -->
    <list>
    <node id="core" claimed="true" class="bus" handle="">
    <description>Motherboard</description>
    <physid>0</physid>
    <capabilities>
    <capability id="ti_am335x-bone" />
    <capability id="ti_am33xx" />
    </capabilities>
    </node>
    </list>
    [email protected]:~/beta_sb#
     
Draft saved Draft deleted

Share This Page

Group Builder