Yet another Arduino Based Brewing controller

Australia & New Zealand Homebrewing Forum

Help Support Australia & New Zealand Homebrewing Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
koshari said:
nice, and the pinouts have equivalents in both platforms?

i picked up an encoder but haven't checked it out yet, hope its compatable for this library/code.
Download the Arduino IDE - https://www.arduino.cc/en/main/software

there are some build in libraries, but you will also need to download some.

i have a serial display which uses 4 wires (5V, GND, SDA, SCL) and it requires a LiquidCrystal_I2C library and a quick 'sketch' (program) to find out the specific address on the SDA bus - given you can have multiple I2C devices connected to the same wire.

Libraries are basically references to particular devices, that allow you to call specific functions. you have an #include ___ line at the start of your code, a single call line to a variable (e.g. LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27,20,4); and then things like lcd.print(adsfsdfa) will allow you to put something on the LCD.

The biggest issue I've had is these ******* TERMINALS THAT ARE TOO BIG FOR THE ******* JUMPER LEADS BUT HAVE ZERO RANGE OF MOTION SO CAN ONLY FIT VERY SPECIFIC WIRE SIZES< UUURRRGHGHHGH
 
I finally installed the relay to my pump in my control box and gave it a whirl on the weekend. STILL causes screen freezing issues when I switch the pump or plug in a power cord (even though the power cord may not be connected to anything). I think it's beyond help now, there must be something with the screen that can't handle it. Interestingly I left it to do it's thing and it went through the whole mash cycle with a frozen screen so it appears to be a screen issue only. For the brewing side of things this isn't a concern, but is pretty irritating because I can't see what the current temps are. I might install a switch to the VIN on the screen and see what happens if I cycle it on and off. If this resets it that's a lot better than having to reset the program.
 
Do you have a cap on the power supply terminals for the screen? Every supply needs them.

I assume that your screen print functions are part of the calculation loop?
 
When you say "relay" do you mean solenoid-type relay with an electric-coil?
When these switch-back, they can produce a bit of back-EMF to the circuit.

There's a few ways to fix this. I thought it was always diodes, but some of these links suggest other parts too.
https://progeny.co.uk/back-emf-suppression/ .
http://forum.arduino.cc/index.php?topic=309096.0 .
https://arduino-info.wikispaces.com/RelayIsolation?responseToken=7ee75136fab867114c0305e180abed48 .

Can you upload a photo of the relay in-situ?
 
Yeah good point - the relay modules from Jaycar (5V) already have back EMF protection, are cheap and 10A/240V rated so these are a good pick.
 
Here's the relay in question. Bear in mind I'm not getting the issues now that the relay is installed, I've always had them. The screen would play up simply by plugging in an IEC power cord to one of the heater outputs (even if the cord isn't plugged into the kettle - i.e. open circuit).
I have a cap on the power supply terminals, but not a separate one for the screen. I suppose I could give that a go.
 
TheWiggman said:
Here's the relay in question. Bear in mind I'm not getting the issues now that the relay is installed, I've always had them. The screen would play up simply by plugging in an IEC power cord to one of the heater outputs (even if the cord isn't plugged into the kettle - i.e. open circuit).
I have a cap on the power supply terminals, but not a separate one for the screen. I suppose I could give that a go.
Basically between the 5V and ground wherever you've got something digital.

Any loose data connections to the screen? Does pushing in a plug distort the box or move wires inside?

These are the relay modules:
https://www.jaycar.com.au/arduino-compatible-5v-relay-board/p/XC4419

The other thing is, is the display a parallel or I2C?

And is your power supply regulated? I there heaps on the 5V bus putting too much load on the Arduino, lowering the supply voltage?
 
I'm gonna need help here I think Mr Wibble. I fried my old Uno and have since upgraded my PC to Windows 10. The program you wrote compiles fine but for some reason I keep getting a 'programmer not responding' error regardless of how I try to connect to the unit.
  • Driver has been updated, Windows detects the Uno under port 'USB-SERIAL CH340 (COM5)'
  • Port is recognised in the IDE, correct port (5) is selected
  • Selected board is 'Arduino/Genuino Uno'
  • If I try to update the firmware when I test the connection it says "Programmer not responding"
  • After compiling, I get an error "avrdude: stk500_recv(): programmer is not responding"
  • I've uninstalled then reinstalled the IDE, no change
I don't know if it's a Windows 10 issue with the bootleg driver or what but I'm going mad. Any ideas?

Ed: found it out. Had to select a different board than a Uno. Geez of the web didn't exist I would have killed myself before stumbling across that
 
Last edited:
I've not used windows 10 with arduino.

Ok you got the #1 cause - the "Selected Board" in the IDE.

From what I've read, there are 2x USB drivers - one for genuine Arduino, and one for clone boards.
The "CH340" driver is for for clone boards - you have a clone board right?

There is an excellent "Have I bricked my Arduino" thread here - https://arduino.stackexchange.com/q...-arduino-uno-problems-with-uploading-to-board .
It covers some basic tests to runs to verify your board is OK (the loopback etc.)

FWIW: I have bought some cheap clone boards that were stuffed out-of-the-box and others where a certain pin just didn't work. (But this is very much the exception, 99% of the clone boards are OK).
 
The driver is fine, and yes it is a clone. I have 3 x Unos but it looks like they have the wrong bootloader in them. I needed to select Duemilanove or Diecimila board to upload. I'll burn the correct bootloader on them tonight, only worked it out just before hitting the sack.
 
I'm still getting a heap of hassles with this controller. I changed the sensor which worked during a test run, but as soon as I went to use it for some reason it kept freezing. After a few restarts it came good but then kept freezing until I got a white screen. I gave up and got the STCs out.
The encoder was playing up but I noticed there was a loose pin - fixed. There seems to be some issue with the 5V circuit in my opinion and there is some interference with the 240V system. As soon as I plug it in to a USB everything is fine. From the 12V power supply however... problems. I've bought a 12V to 5V converter so hopefully this will fix the issue. Then it won't be the Arduino powering everything in the circuit (which is 3 x sensors, RTC, screen and 2 x SSR) and I'm hoping this will take the load off the onboard regulator. Otherwise I'm out of ideas and starting the getting pretty frustrated considering all the effort I've put into this.
Ed: I've tried 3 different Unos, all with the same result
 
Good news - converter has brought the unit back to life. Goes straight into the 5V pin on the board. I still get the occasional freeze if things are plugged into the 240V sockets but it looks like all the other niggles have been solved.
Back to brewing!
 
Last edited:
Exactly what sort of power supply are you using?
I don't get these sort of issues, the supply I use is a little one for powering LED light strings (AFAIK - that's what the ad said).
It looks like a mini-PC power supply.
 
Probably the same as you, it's a 2A job from eBay. See this post. That's a fair point though, it could be a power supply issue. I've measured the output voltage and have wound it from 9V - 12V which it seems to put out stably on my multimeter at least.
 
This is what I've done with mine. I'm not sure that it will be perfect but hopefully it will do the job for the following reasons:
- decent quality 15W power suppply, 11-15V at up to 1.3A directly driving the Nano
- A 3A, 5V fixed voltage regulator off this line driving the temp probes, display, relays
- 5V/ground buses with 330nF ceramic caps on each end and also will have 330nF caps on each user of 5V, as close to the user as possible, to absorb any RF/switching interference
control box - PS terms.jpg

My application is a heat/cool predictive on/off controller with data logging.
 
Looks good.
Any chance you could upload a quick circuit diagram of how to wire in the voltage regulator ?

cheers,
-kt
This is the quick version:
Screenshot_2017-09-25-09-43-26.png


The Vin is 14V in my case from the PSU, and then branches off before the regulator to the Nano Vin.

I used 330nF vs 10uF. I think 10uF would be better with ripple, and would also pass more interference current to ground at lower frequencies. 100nF is a common value though so *shrugs*.

In my photo, my Cin cap can be seen right on the regulator, while the Cout is between the other end of the 5V/gnd buses.

Did voltage checks yesterday and all is sweet.
 
There are heaps of voltage regulators around but I chose the 3A low drop out ST Micro LD1085V50.
 

Latest posts

Back
Top