MrSaLTy
Well-Known Member
On the encoder I need to tie pin C and one of the switch pins to ground right?
[edited 01/16/2014 - added recommended wire type/size)
The second minion is up and running, so I had time to complete the protoshield build documentation.
The basic scheme supports the One-Wire bus and the LCD display.
Refer to the original post in this thread for links to the larger pieces.
There are also these support options:
- Bluetooth/Serial Module
- rotary encoder switch
- cool/heat panel LEDs
Parts: Starting with what's included in the Arduino Protoshield V6 (latest/greatest) the additional parts required for the basic scheme are:
- 20x4 white-on-blue parallel-entry display
- 74HC595D
- 10K 3-lead trim pot
- (2) IN4007 diodes
- 20 to 30 ohm resistor 1/2W
- 4.7K resistor 1/4W
- I recommend using 24-26 gauge solid, insulated wire
- optional but recommended: 16 pin IC socket
- optional but recommended: extra .1 UF >10V ceramic capacitors (2 or more)
- optional: extra header pins
Add for Bluetooth/Serial Module:
- 1K resistor 1/4W
- 2K resistor 1/4W
Add for Rotary Encoder:
- (3) .1UF >10V ceramic capacitors
- (3) 10K resistors 1/4W
Add for panel LED support:
- (2) 220 resistors 1/4W
Also, I've included a schematic of the AC switching scheme I'm using. This provides independent On/Off/Auto control for the Cool and Heat AC outlets. This uses a pair of 20A rated DPDT On-Off-On switches and a pair of LEDs along with the Sainsmart dual relay card. All of that is optional.
Building the base Protoshield: There is a tutorial for assembling the Arduino Protoshield here. Unfortunately it is for an earlier revision PC board, but almost all of the instructions still apply.
The kit comes with the parts shown in the first picture below.
I used all parts but the two 1x5 headers and one of the 1x6 headers.
Caution: Note which side is "UP" before starting.
The only part that is installed from the BOTTOM side of the board is the 2x3 stacking header (shown at the left edge in the second picture).
Completing the Build:
I prefer not to use Dupont wires with male ends as they need more air space above the board and are intrinsically fragile. I've done this layout so all wire connections use female Duponts.
The kit comes with a strip of 36 header pins which is enough - if you install them where they are needed. If you have extra header pins on hand you can go nuts like I did, but if you're stuck with just the 36 pins in the kit, I've highlighted the 32 pins that need to be present. These pins match up with the jumper wire connection points in the diagram at the bottom of this post.
The IC orientation isn't optimal wrt the Protoshield etch (IC power and ground pins are on the "wrong" sides of the two bus strips), but was to keep the switching inputs to the IC as short as possible as HC series logic doesn't take well to input ringing.
So there it is. Hopefully there's enough here to successfully construct a protoshield, but feel free to post any questions/issues/objections/suggestions here...
Cheers!
If you disconnect the AC loads on the relays do you still get display errors?
Do you know if your relay modules have snubber diodes across the coils?
Also, what is the actual 5VDC level at the LCD?
btw, at least one other person has gone through this and I believe eventually solved it.
Hopefully he'll chime in...or you could start digging back through the thread...
Cheers!
Just having a quick look at my wiring against the one you've provided, i.e as i'm not planning on adding bluetooth and the torero encoder i've taken out what i don't think i need, and i've noticed i'm missing he 10k resistor between Pin 10(?) on the shift register and the 5v rail which i guess explains the no power situation.
in terms of the connection diagram, are pins 3,15,16 one hole to far over on the right on your diagram?
[...]Yes, even without load i get display errors, but not when there is no AC on the relay!
[...]The 5V level @ the display is 4.98V if the relay is triggered 4.97V..
I also tried to put some distance between the HV part and everything else. No change..
I tested different kinds of relays and its the same, when there is AC power on the relay the display errors appear.
I also tested driving the relay coil over a seperate power supply like in the picture, it should be isolated from the rest but i still get display errors when the relay with AC on it(just a cable but no load) is switched on and off.
Even when the relay is completely disconnected (swiched on off with a seperate arduino) the display gets scrambled.
So the relay generates some EMV which travels trough the mains phase gets into the power supply and ****s up the shift register?
There seems to be some dark magic going on
[...]also, is there anything that is worth setting via rotary over web interface?[...]
Pin 10 of the shift register is the low-active hardware reset input.
If you leave that unconnected the shift register will likely be stuck in reset forever.
Which means the LCD will never get initialized, never mind have any characters show up.
So add the pull-up resistor - it can be pretty much any value as noted.
Good eye - that error lived for weeks
Here's the updated diagram.
And once again, the original post cannot be edited, so this will have to suffice as the official change notice
Cheers!
added in the resister at pin 10 i get blocks but no text, getting close to throwing in the towel
yep everything is working relay triggers can connect to brew webgui i just can't get the screen to display anything other than 2 lines of white boxes.Ok, with this all in place and powered up, are you able to actually communicate with the Uno from the BrewPi gui? Do the probes read ok? Can you toggle relays?
Basically, is the LCD the only thing not working properly right now?
I'm sure we can get through this. Have faith
Cheers!
added in the resister at pin 10 i get blocks but no text, getting close to throwing in the towel
Yes, and there is not even a load connected. The picture from the last post shows the test setup.
I mean the only physical connection goes from the relay trough the mains phase -> transformator -> dc-dc converter -> shift register -> lcd
But how can it generate noise when there is no arc from switching a load.
I mean it must have something to do with the AC because i can switch the unconnected relay without a problem.
Maybe the wires form the rotary encoder act like an antenna?
I never had any trouble with the bluetooth connection or the arduino tough.
Just ordered some SSR, i think i had it with those relays.
I've only moved the jumper for the pnp relay driver collectors off its default "same as logic voltage" position when I was doing a survey of the currents used by various elements - including the relay coils. Other than that brief period it's been set to use the same (default position) voltage source used by the opto-couplers.
Note that this is one of my protoshield builds. If I need to hook up the breadboard version, that's probably going to sit in the queue for a bit...
Cheers!
Disconnect them from the shield. What happens?
I'd be inclined to look elsewhere as those connections don't go anywhere near LCD or shift register. As you've apparently eliminated the actual relay switching (no AC connected) affecting the 5V power distribution - and it would be way the heck over the top to believe the open-circuit AC switching is getting into the DC power - the order of most likely:
- Shift register SCLK (Uno IO 13, S/R pin 11)
- Shift register RCLK (Uno IO 10, S/R pin 12)
- LCD Clock (LCD pin 6, S/R pin 1)
- LCD Register Select (LCD pin 4, S/R pin 15)
These are all "ones catcher" signals - meaning a glitch on any of them will cause "change" without requiring anything else to happen.
This is opposed to the various data signals - the S/R Data input on pin 14 (Uno IO 11) and the four LCD data inputs on punts 11-14 (S/R output pins 4-7). A glitch on any of those will have no effect as the former needs an SCLK transition to do anything, and the latter need an LCD clock to do anything.
[...]Are those swapped on the diagram?
Bingo. Stupid engineer documentation trick
The grounds versus control signals were swapped at their respective switch inputs. Here's the corrected drawing...
Cheers!
Bingo. Stupid engineer documentation trick
The grounds versus control signals were swapped at their respective switch inputs. Here's the corrected drawing...
Cheers!
Wire the common for the rotary encoder side to either of the two pins on the other side, then connect that to any handy Ground pin on your shield board.
The other three pins connect as shown here.
Don't worry if you can't figure out which of the two encoder pins goes to which AVR pin - just connect them to IO 8 & 9. When you try it out, press the push button and set the Mode to Beer Constant, then when you adjust the Beer Temperature goal you'll see if turning clockwise increases the value or decreases it. If it decreases, swap your connections to IO 8 & 9...
Cheers!
having seen rcm_rx7 post above, does the addition of a push button rotary encoder act as a reset for a scrambled display?
I am now waiting on protoboard number 3 and 4 to arrive so i can have a 3rd/4th attempt i've orders some from Aliexpress so they'll take a month to arrive but they were dirt cheap, although they're the Arduino and not sainsmart style boards, so i'll have to reconfigure the layout slightly.
Enter your email address to join: