• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

BruControl: Brewery control & automation software

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
In my case with the precision issues, I am calculating a value and then trying to concatenate that into a string to display on a global. Here is another example where I am reading the value from my current sensor, multiplying it by 240, and concatenating "W" on the end for a power display value that tracks the current.

With this code, no matter what I set the precision value to, it gets lost when I concatenate that onto a string.
Code:
print tempStr1
.........



However, I used the suggestion of sending this to a global value with precision 0, then reading that back and concatenating it onto the 240V Power string before writing it to the global string element. This does the trick, but seems rather clunky.

Code:
new string tempStr1
new value temp1

[PowerLoop]
...

View attachment 675390

This is a general problem with all computing, not just BruControl. For example, a Currency type field has four decimal places although you can only see two. Having the RTD Value retain all its decimals is the same issue. In some cases you would want the values to do that. On the other hand, in these instances, you do not. Therefore clunky. Unfortunately, you would have to re invent Computer Values to suit our needs, but then what about those that want all those trailing decimals? They could not get them back. I will take Clunky.
 
Probably means he is switching one leg via a separate contactor. Not wiring 5 poles to one element. So instead of a combined 3 pole unit, he is using a 2 pole and a 1 pole. In other words, erase the contactor on the right of your drawing, and split the 3 pole into a 2 pole + a 1 pole.
Something like this..? I don't understand how to get the separate 1/3 and 2/3 control without two contactors.

Heat Element Wiring(4).png
 
Last edited:
This is a general problem with all computing, not just BruControl. For example, a Currency type field has four decimal places although you can only see two. Having the RTD Value retain all its decimals is the same issue. In some cases you would want the values to do that. On the other hand, in these instances, you do not. Therefore clunky. Unfortunately, you would have to re invent Computer Values to suit our needs, but then what about those that want all those trailing decimals? They could not get them back. I will take Clunky.

You are missing the forest from the trees. Yes floating point variables will have much higher precision to reduce computational rounding errors and provide maximum range/precision. No need to re invent that. What I am talking about is truncating a number to a certain amount of decimal places for viewing. If I can print the value with a certain precision, why can't I concatenate/cast it into a string with the same precision?
 
Mia cuppa. A CR02 appears "shorted" after having power applied. I assume this is due to the internal capacitor return the valve to closed. Once I powered the Firehose Valve, it appeared "shorted" between both wires when tested with a continuity tester.
I went back and disconnected all wires. Sure enough, I had some wires crossed. I did think it was odd the a CR02 Valve would appear to have continuity between the legs however. Nice to know.

A capacitor will look like a short with transient voltages.

Anyway, this is why we preach "use a schematic". Not sure if you are, and even if you are it can happen... but drawing one then wiring off it makes wiring and debugging thousands times easier. Glad you figured it out!
 
You are missing the forest from the trees. Yes floating point variables will have much higher precision to reduce computational rounding errors and provide maximum range/precision. No need to re invent that. What I am talking about is truncating a number to a certain amount of decimal places for viewing. If I can print the value with a certain precision, why can't I concatenate/cast it into a string with the same precision?

You are right!
 
Yeah, that looks right. Just know you will get 1/3 with the first contactor on, then 3/3 with the second. So you can't get to 2/3.
Can you explain why I won’t get 2/3 with the first on and second off? How is Clearwater achieving this?
 
Can you explain why I won’t get 2/3 with the first on and second off? How is Clearwater achieving this?

If you run the star delta connection on a 12kw element, your element will run at ~3.6Kw (you will have LOW watt density) I run the delta configuration.

First, I think you should consult an electrician familiar with three phase...

To get 2 elements without powering the 3rd element one has to split the connection, as I mentioned. A competent electrician would take one of the connection bars off and run an extra wire, one from each contactor to each separated lead... when they do this, they essentially have a dual element and a single element that happen to share a single wire(they can run 5 wires and have them totally separate.) They will normally use two 3-pole contactors, but they could use a 2-pole and a 3-pole(I wouldn't)

top one is 5 wires to the element, bottom is 4 wires to the element.

upload_2020-4-13_9-48-17.png
 

Attachments

  • upload_2020-4-13_9-47-41.png
    upload_2020-4-13_9-47-41.png
    136 KB
fitting 4 10ga conductors and ground in the housing is a bit tight, and I have had one short one time, so extra care, and willingness to cut off ends and start over to get lengths 'just right' is needed... and you cannot use an off-the shelf plug and receptacle, it has to be hard wired.

Cr1zBZaVv6xzefGmAPt7bTSo9XUtH8G-onrLqAUvyrgztfdEIampmW3XS0rmpPDwQEUFrtPSPssFltBCMxyY7oiKdfXdVuPoMEbLi4RRxuW7670SWr9pnl6qy3xz2gq18aj3f2s94kXxRAPm4ghLPIAG_IomZaRcZ7smjG_EDSWMMFT4ES6eM3Je4dhfANotnKTYTrQ_PS7JRHf3GAq3_XpU_XTYf7In45mIVw_Z8_HUabiDCV7R98TIHjscjB5fPaQB6-Zw9VtbWq7osTTrV-2sjs8wIB37HzbPCJYxRX8UVgaRO5N80h--NHzsvrjBF7laSagoqf_p42REK-47L2Lo8_RiCijn4czWNGLvKxXRXudhHPllchrzNamVhW9imgdV4GStQPASEjsYjKmOLywXm5CCS6Pd-dF-szf0SPZy-rOWFVqE1NMZ6Mb_I1-0XWpT5Ctscqd9_ow-G2v3cjjyihhbHV5xFy70_bdhtJqjVU1jSU2bRvqiqAvDZiq77XcY306ki6FuoIj2Of6v_QwjrA8vxhgJk-htyGkIvj_Roq-yh-MLXGyc-5A2xK7_RBxjRwrpjE97xcivdhBinYzy1rWRJ5K3XEG6KiHANzl-DYPjkhpMVXNxQP6wpCEqdjjGljvLLNDKJNASvGAJ_ia__wQs8jk6aKpgieYTOFrabiRZlccLA-PdD_ndTw=w657-h876-no
 
If you run the star delta connection on a 12kw element, your element will run at ~3.6Kw (you will have LOW watt density) I run the delta configuration.

First, I think you should consult an electrician familiar with three phase...

To get 2 elements without powering the 3rd element one has to split the connection, as I mentioned. A competent electrician would take one of the connection bars off and run an extra wire, one from each contactor to each separated lead... when they do this, they essentially have a dual element and a single element that happen to share a single wire(they can run 5 wires and have them totally separate.) They will normally use two 3-pole contactors, but they could use a 2-pole and a 3-pole(I wouldn't)

top one is 5 wires to the element, bottom is 4 wires to the element.

View attachment 675491
Thankyou for the info. My goal is to learn something and provide the right components in the panel, so that I can wire the low voltage stuff. Ultimately I have our electrical contractors that will perform the wiring to the elements and provide feed to the panel. I appreciate the concern for my safety (and everyone around me) and you taking the time to help.
 
A capacitor will look like a short with transient voltages.

Anyway, this is why we preach "use a schematic". Not sure if you are, and even if you are it can happen... but drawing one then wiring off it makes wiring and debugging thousands times easier. Glad you figured it out!
I do make diagrams and schematics. Only thing is, I sometimes make physical wiring mistakes! Bad eyes and too damn old!
 
You are missing the forest from the trees. Yes floating point variables will have much higher precision to reduce computational rounding errors and provide maximum range/precision. No need to re invent that. What I am talking about is truncating a number to a certain amount of decimal places for viewing. If I can print the value with a certain precision, why can't I concatenate/cast it into a string with the same precision?
Just stating the obvious. The "value" is always whole maximum range/precision. The truncating is a temporary display thing and does not affect the "value" any more than only displaying two decimal places with currency. I had been dealing with the currency issue for years and it is the same issue. Regardless of what you generally do, the maximum range/precision was retained in the value. That how I came up with a conversion to a string. I tried many things with the currency field over the years and the conversion to a string and then back to a true fixed 2 decimal place was the only thing I ever found to work.
 
Looks good. You can actually wire the blue VDD wire to VCC. Also, make sure the control switch #7 and 8 are ON to connect to the base and turn the pull-up on.
I am slightly confused by Dip 8:

DIP 8:
Connects the interface pin 5 to the Base board. In cases where a shield is used and pin 5 is needed for SPI or 1- wire communications, disconnecting this line may ensure proper operation of the SPI or 1-wire bus.

You say it should be "ON". Does "ON" disconnect it from the Base?

Also assume that if you were using PIN 6 for One Wire (Pin 8-3D), you would only need Dip 6 ON. And since you may use additional PINS (2-4, 8, 9 etc) for one wire in the latest Wiring Interface for a Mega, those would need the 4.7K resistor circuit.
 
Wait... I just realized something. Which UniShield do you have (which communications: serial, ethernet, or WiFi)?
I have one with an Ethernet Shield connected that I added myself. I order one without the shield as I had a couple laying around. I flashed it to 45E and set Control Dip switches for Ethernet with one wire for Port 5. I am powering via the VS from a 12 vdc power supply that is down to 5 volts per the instructions.
 
WOW - good catch. Correct. I didn't even see that. Ya... @oakbarn only use D pins for outputs! Sorry I overlooked it.

Let's start over here. Assuming you have a WiFi interface, then you can't use pin 5 at all, per the interface wiring map.
I corrected the diagram in my previous post just in case it confused anyone for the P Pin. I do not have Wifi but wired RJ45 Ethernet.
 
I am slightly confused by Dip 8:

DIP 8:
Connects the interface pin 5 to the Base board. In cases where a shield is used and pin 5 is needed for SPI or 1- wire communications, disconnecting this line may ensure proper operation of the SPI or 1-wire bus.

You say it should be "ON". Does "ON" disconnect it from the Base?

Also assume that if you were using PIN 6 for One Wire (Pin 8-3D), you would only need Dip 6 ON. And since you may use additional PINS (2-4, 8, 9 etc) for one wire in the latest Wiring Interface for a Mega, those would need the 4.7K resistor circuit.
Read the Manual!
or in this case, the notes:

I re-read the notes for UM-1:

If configuring the UniShield for connection to 1-wire devices, switches 6, 7, and 8 may need configuration. No external 4.7k pull-up resistor is needed when configuring using pins 5 or 6. If using on other available pins, an external pull-up resistor is required.

1. For UniShields without a communications shield or with an Ethernet shield, the 1-wire bus can be connected to either pin 5 or 6. If connecting to 5, ensure switches 7 and 8 are ON. If connecting to pin 6, ensure switch 6 is ON.

2. For UniShields with a Wi-Fi communications shield, the 1-wire bus can only be connected to pin 6. Ensure switch 6 is ON in this case.

UNI ONE WIRE.png
 
Designing my first brucontrol system here and have a couple of questions. Do I need to buy a unishield for my mega? Also does this 17" x 14"x 6" enclosure look big enough for a 30A 2 Element System with 2 pumps, 9 Valves and 10 Temp Sensors + room to grow?
 
Wanted to give everyone a heads up on an issue I had with Sunfounder Mega 2560s. I had gotten in two new Sunfounder Megas and noticed that they were slightly different than the original Sunfounders I have been using. The original Rev 3 Sunfounder is white on the back with the blue circle. The 2 new SunFounders I got last week were Rev 3b and the back of the card is blue.

Now on to the issues. One of the new Megas showed up as an Arduino Uno in Windows Device Manager when I went to upload firmware. It took the firmware and allowed me to configure the ethernet shield. The second mega showed up as a Mega 2560 in Device manager and took the firmware and ethernet configuration without issue. Everything seemed fine until I connected two RP3 boards with 8 temp probes. Neither of the new Sunfounders would support more than 1 RP3 with 4 temp probes. If I disconnected the second RP3 board and power cycled the Mega it would connected to BruControl but would not connect with 2 RP3 Boards. My original SunFounders (with the white back on the board) connects to 2 RP3 boards without issue.

I ordered two Elegoo Megas that arrived today. I swapped them with the Rev3b new Sunfounder and they connected to BruControl with no delay and showed all 8 temp probes on both RP-3 boards no problem. Took me 2 days with lots of help from BrunDog to get this figured out. Hopefully this will save someone else some time.


Definitely something going on with the Rev3b Sunfounder boards that are shipping now from Amazon. I have exchanged a few emails with SunFounder but so far they have not offered any ideas or solutions. I will post their reply if I hear anything helpful.
 
Back
Top