Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

In this Discussion

BrewPi Arduino Shield: Ready for approval!

edited December 2012 in Hardware

Hi Guys,

It took a bit longer than expected, but I have finally finished routing a shield for BrewPi.
I have tried to make the shield compatible with both the Uno and Leonardo, while maintaining expandability.
The Arduino shield has a 10 pin connector to the LCD board and the LCD board has a 4 pin connector to the rotary encoder board.

On the LCD board is a shift register to save some Arduino pins. 7 pins of the shift register are in use, the 8th is routed to a header. There is also one free pin on the 10 pin connector. This pin is also available on the LCD board, together with GND and 5V.

I have settled on the following pin mapping:

image

As you can see, the Leonardo pin mapping is way different from the UNO, which makes backwards compatibility a bitch. I tried my best to make the shield compatible with both, without sacrificing expandability and hackability.

This mapping results in:
- RX/TX free
- HEAT/COOL and BUZZER on a PWM port
- JTAG available on the Leonardo
- I2C (SCL/SDA) is available on the Leonardo by moving two 0 OHM jumper resistors.

There is a big proto pad in the middle to enable hackers to use the free pins.
All Arduino pins have a double header row. One is for the shield connectors, the other makes it easy create connections to the proto pad.

The HEAT and COOL output are compatible with relays and SSR's. There is a schottky diode between 5V and the + pin of the outputs. This allows you to use a higher voltage for relays. The - pin is an open drain pin, about 300mA.

The output pins of the shift registers are: RS, E, Backlight, free (header), D4, D5, D6, D7. Reading from the LCD has been sacrificed. The latest version of brewpi-avr already keeps a copy of the LCD contents in avr memory, so reading is only used to check the busy pin. This will be replaced by a simple delay.
The backlight has a 10 ohm resistor, which can be bridged by a solder jumper.

Enough explanation, here is the schematic:

image

And the board layout:

image


Please comment on anything and everything. I don't want more delays, so I will probably order these in bulk right away.

I plan to make them available as bare PCB, with SMT components soldered and fully soldered.
I will start sourcing parts now, to be able to offer a complete kit.

Tagged:
«13

Comments

  • 61 Comments sorted by
  • Vote Up1Vote Down
    Posts: 1,061

    Yep, in the end I put in all your requests ;)

    You shouldn't underestimate the role the Pi is playing. It runs python scripts, not just a web interface.
    If you want to change settings remotely or want to be able to use profile mode, you need the Pi.

    Boards are ordered by the way :)

  • Vote Up1Vote Down
    Posts: 1,061

    Goddamnit palitu, you scared me!

    I was playing cards with my friends and got a notification e-mail of your message, but could not properly check the files. Pin 9 is not connected to anything, pin 8 is connected to the ground plane.

  • Vote Up0Vote Down

    Elco,

    Thanks for taking on this work. I haven't had a chance to do a through review however two points, one is probably quibbling. Typically I pad out the gates of MOSFETS with some series resistance to prevent ringing that can occur with the trace inductance interacting with the gate capacitance; I believe in general it's a good practice.

    The second thing and correct me if I'm wrong. Did you experience issues with the NewHaven OLED display which required tacking on a fairly sizable amount of capacitance to stabilize the input voltage? I see a couple of your de-facto sort of 100nF ceramic bypass but nothing on the order of 10uF or whatever it was seen soldered directly to the pins of the display. Did you find this wasn't necessary at some point down the line?

    Regards,

    James R.

  • Vote Up0Vote Down

    Hi Elco,


    Thanks for this, it looks like a very intelligent design, I like the way you are creating compatibility for Uno and Leonardo and also scrimping on pins and offering proto space and other outputs, its very nice...

    Its obviously incompatible with the previous shield design and current AVR software

    so i guess you'll make a new branch of the software to support this design...

    John
  • Vote Up0Vote Down
    edited December 2012 Posts: 1,061

    @James
    The input capacitance of the 2N7002 is 30 pF, so in this case I think a series resistor is just an additional component that is really not needed.

    About the capacitor: I choose 100nF, because it is the only value on the board so far. I changed some of the initialization code of the display, so it might not be needed. If I ran into problems, I can always put a 10uF cap on the 0805 footprint.

    The displays have pretty big capacitors on their board themselves, so actually an external capacitor should not be needed.

    @John
    Yes, I will make a new branch for the shield. Well, likely this will become the master branch and I l'll branch the old DIY shield code.

  • Vote Up0Vote Down
    edited December 2012 Posts: 1,061

    Some small updates, LCD connector pin numbers, moved to bottom for clarity.
    Changed 0805 jumpers to solder jumpers from the SparkFun library.

    image

  • Vote Up0Vote Down
    Posts: 1,061

    Added indicator LED's for heat and cool:
    image

    Had to move a lot of things to fit that in, but really helpful when debugging.

    New schematic:
    image

  • Vote Up0Vote Down
    edited December 2012 Posts: 1,061

    I could swap the molex connectors for flat ones, so they connect to the side, just like the screw terminals.
    Goes for the rotary encoder connector as well. Opinions?

    Another thing I was wondering: is the turn direction of the contrast pot ok? I have relabeled it constrast btw.

  • Vote Up0Vote Down

    Elco

    looking good , on the board layout is the ground plane a bit bumpy (ie protruding ends of fill in tracks) and too close to the track that comes from 3 (d2?)  round under the display connector mounting hole ?
    cheers
    Richard P
  • Vote Up0Vote Down
    edited December 2012 Posts: 1,061

    ah those are just rendering issues. Here is a higher resolution:
    It still doesn't appear straight, but it is.
    image

  • Vote Up0Vote Down
    Posts: 1,061

    Alternative layout, with 90 degree flat connectors for onewire.
    I kinda like this one, because all fridge connections will exit on the same edge in the same direction.
    image

  • Vote Up0Vote Down

    well i am excited.  My Leonardo just arrived today (never DX again).  so looking forward to starting up my foray into micro controllers and beer.

  • Vote Up0Vote Down

    My Leonardo is also waiting to do some work! It looks really nice!

  • Vote Up0Vote Down
    Posts: 1,061

    I have printed out the layout and checked alignment with some of the components.
    Some points of concern:

    • The 10 pin connector with lever is huge! It is 2,7 cm high. I can image a lot of people want a lower profile connector to be able to fit this in a box.
    • The USB connector of the Arduino Uno is high. It will touch the underside of the PCB at the screw terminals. Arduino Uno users probably need to stack some extra headers in between. I don't see how I can move the screw terminals to prevent this.

    @palitu: I stopped ordering for dealextreme a long time ago. You can get the same stuff on eBay and it ships immediately. DX is not what it used to be.


    image

  • Vote Up0Vote Down
    Posts: 1,061

    Now with fancy logo:
    image

  • Vote Up0Vote Down

    Looks fantastic. I'm most of the way through making my own DIY shield, but I'll definitely get one of these once they're available. I don't suppose you have any idea of what the cost and shipping will be?

  • Vote Up0Vote Down
    Posts: 1,061

    Not yet, I will find that out after this weekend.
    Shipping, by regular mail will be cheap, 3-5 dollar probably.

  • Vote Up0Vote Down

    I'm all for the lower profile connector without the lever, too. I don't think the added security for the cable is worth the added height or cost. Even if it is only a few cents.

  • Vote Up0Vote Down

    Elco,

    I would ditch the lever locks they're massive. The only real benefit is their ability to easily eject the cable; the whole notion of positive retention on a stationary device is a bit silly. They're not going to shake loose and assume they did; there's really no consequence. There are shrouded headers which will receive clip that snaps over the top if you absolutely need retention that badly and the clips are dirt cheap. That or you can just use a little glue, that's actually what we do in production for most of our products.

    As for the screw down terminals, not a huge fan of them...they're so bulky. I like the addition of the LED's Blue for cold and Red for heat? Inside the same LED? :-)

    Regards,

    James R.

  • Vote Up0Vote Down
    edited December 2012 Posts: 1,061

    The screw terminals are just an easy, solder free way of connecting things. Could be two pin headers, too, but screw terminals are a bit more sturdy. The SSR's often have kinda big screw clamps, which makes it easier to use a thicker wire. A screw terminal on the board makes that possible.

    I could even use mini screw terminals for the temperature sensors, so you don't have to solder a connector to the sensors. These are expensive though and require a mini screw driver.

    I will use a red and blue LED.

    I have swapped the big connectors for smaller, normal ones. This allowed me to give the JTAG header a bit more space. It also made space for a screw hole on the LCD board.
    The screw holes on the LCD board probably will not be used, because it is a backpack, but its nice to have them. The rotary encoder will be mounted through a panel, so it does not need the holes.

    Here is the new layout. If I get enough feedback, I could send them to the fab house on Monday.

    image

  • Vote Up0Vote Down
    edited December 2012 Posts: 0

    @Elco: I'm curous how or if all of these boards and shields (excluding the pi) might stack up together (e.g. http://forum.brewpi.com/discussion/9/show-your-setup#Item_9).

    @James: FYI, I was targeting the vacant exterior area of the chest freezer just above the control dial for the pi display and knob.  The interior of the compressor compartment is spacious, and I was hoping to stack the boards (again, excluding the pi) right behind the display to keep things tidy.  Just an idea for an "enclosure"...

  • Vote Up0Vote Down

    Elco,
    Great work!
    a.) LCD module back light current
    The spec for my chosen 4x40 blue LCD back light current is:- 150mA max with forward voltage 3.2 volts
    For power dissipation reasons change R2 for two 33R 0805 resistors in parallel. (use 1206's if room)
    b.) IC1 pull up resistors
    Consider adding 10K pull up resistors to the IC1  LCD_CLK  and  LCD_CLK  signal inputs.
    This will help with longer 10 way cables. (>1m)
    c.) LCD board decoupling caps
    1 x 10uF and 2 x 100nF ceramic suggested.

    Pleased to see the Q2 and Q3 Fet's are now 2N7002.

  • Vote Up0Vote Down
    Posts: 1,061

    Thanks for your excellent suggestions.

    a. You are right about the power dissipation. It will be about 300 mW. Replaced with 2 1206 resistors in parallel. Why 33? For your specs it should be 24, maybe 27 to be safe.

    b. Added pullup on CLK and DATA. Changed Latch pull down to pull up too.

    c. Why use 100nF AND 10uF when using MLCC's? Having a big and small cap is from the electrolyte days I believe. The 100nF and 10uF are also so close to each other that I basically already have a small and big cap. I changed the LCD cap to 1206 too.

    image

    image

  • Vote Up0Vote Down
    Posts: 1,061

    By the way, I am also looking into selling complete kits:

    This board + LCD + SSR's + cables + DIN connectors + DS18B20 sensors. You just have to get the fridge and thermowell yourself.

  • Vote Up0Vote Down

    If it helps to gauge interest, I would would prefer to purchase a complete kit.

    Charlie

  • Vote Up0Vote Down
    edited December 2012 Posts: 1,061

    Hey Guys,

    Hopefully this will be the latest update.

    It kept bugging me that the HEAT and COOL outputs did not have a proper ground connection.
    I still rather had a GND and 0/5V pin, so I decided last minute to change circuit to a P-Channel MOSFET equivalent.

    The open drain setup with NFET's wasn't really suitable for use with higher voltages, because when you are not using the 5V line, what is your reference voltage?

    This P-Channel MOSFET setup is easier to understand and can source 180mA at 5V. So it is able to drive relays and can be used as a true digital output. If you want to use actuators with a higher voltage, just add a transistor circuit yourself after these outputs, using GND as a reference.

    I changed the backlight setup to use the same P-Channel MOSFET. Any comments on the resistance for the backlight?


    image
    image

    Holes at the top are to align the solder paste stencil.

  • Vote Up0Vote Down

    Hi there,

    I did two things today that I thought I should share as they might have a bearing on the board design.

    1) I started hacking a fridge.  This one does not have much space to get a wire inside it, and there are 3 things that need to go inside the fridge : power to 'heater' (light), sensor one and sensor two. This made me think - perhaps the things going into the fridge proper could all be in one cable - even if they are being split into seperate connections within the fridge (e.g. 2xDIN connectors for sensors) - this *could* mean putting, or having the option to put, both sensors, and also perhaps the heater circuit into a SINGLE connection leading a single cable into the fridge (5/6 core) ....

    2) I've started playing with cosm.com (used to be pachube) - an online service for capturing data from sensors (I thought an idea place to 'push' temperature data from brewpi.   Then it occurred to me, if the shield was compatible with the ethernet version of arduino (i.e. no pin conflicts, and no conflict with connectors etc.) then it could potentially run without the Rasbberry PI and push its data feeds direct to cosm.com...  it seems pins 10,11,12 and 13 are needed for the on-board ethernet controller...
    would also need to look at physical size to make sure it doesnt clash with the ethernet socket...
  • Vote Up0Vote Down
    edited December 2012 Posts: 0
    <style type="text/css">p { margin-bottom: 0.21cm; }tt.cjk { font-family: "DejaVu Sans",monospace; }</style>
    

    Hi Elco,
    1.) I would have kept Q4 and Q5 as 2N7002, but no real objection to
    you using the P-Channel BSS84 Fets. (I will use SSR's)
    Are pull up resistors required on the Gate pins of Q4 and Q5? During
    Power On Reset (Or Reset) of the Arduino Leonardo ATmega32U4 the PC6 and
    PD7 pins (Or Uno ATmega328P PD5 and PD6) go tri-state, according to the
    data sheet. Without pull ups Q4 and Q5 might randomly turn on during a
    processor reset. Not ideal. I have not previously used ATmega processors
    before - so this may not be an issue.
    2.) I will probably change the values of R4 and R5 to suit the chosen
    LCD display optimum back light level. 33R just seemed a good 'middle of
    the road' starting value.

    3.) Decoupling Caps. Yes your choice of decoupling caps look OK.
    4.) R14 value. Changing R14 to 4K7 is a good idea. Making R14 1K - better still?
    I hope this helps.

  • Vote Up0Vote Down

    Hey Elco, do you ahve a timeframe for when this will be done?  I am trying to work out whether i build one, then get the kit, or wait for this to come out.


    cheers,
  • Vote Up0Vote Down
    Posts: 1,061

    @JohnCass
    1. With the current layout it is possible to connect a 6 strand cable to the connectors. This is easier to use and to understand for most people I think. You can have just one ground wire, which you split when in the fridge, but for most people this will only make it harder.

    2. This is also something that would not be used that much probably.
    To keep SPI usable, I would only have to relocate pin 10. A SPI device only communicates when SS is active. But there are no pins to move to, while maintaining compatibility with both the UNO and the Leonardo. 1-2: keep free on the UNO to not mess with serial communication, 2: SDA on the Leonardo. A0-A3: JTAG on the Leonardo.
    The best candidate would be 2, so I would have to swap 10 and 2. This would free the default SS pin. I used it because it makes sense to use it, but so does everybody else.

    @Georgech1
    1. If there is room, I'll add them. Especially with the Leonardo, which is in bootload mode for 6 seconds, it makes sense.
    2. Ok, I'll play it safe and use 33. The visible difference between 100 and 150 will be small.
    4. With 4K7 the current will be 1mA. I think increasing it further is not needed. Some fridge door switches conduct when the door is closed, so this current will flow continuously.

    @palitu
    I want to order the boards this week, but I am going snowboarding in 12 days. I don't think it is realistic to promise assembled boards before Christmas. But I think the first week of January I can ship them.

Sign In or Register to comment.