Ardbir build help please.

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.

aamcle

Well-Known Member
Joined
6/3/13
Messages
233
Reaction score
13
I have a PCB for this project made from the drawings and I'll build it up over the next couple of months.

There a number of things I like to ask about,

What's the best way to mount it all in a enclosure/box?
Are there any pictures?

The small display, do I just cut a matching hole in the enclosure and push the LCD into it?

There seem to be two possible sets of buttons a matrix membrane and real buttons.

How would I mount the matrix membrane so I could press its keys?
Or
If I use real buttons how do I connect them to the arduino?

Many thanks. Aamcle
 
Hi, I am not familiar with the unit you have but I have built a Matho's one. I'll try and help.
aamcle said:
I have a PCB for this project made from the drawings and I'll build it up over the next couple of months.

There a number of things I like to ask about,

What's the best way to mount it all in a enclosure/box?
Are there any pictures?
Mount it on stand-offs and keep it away from the mains voltage parts

The small display, do I just cut a matching hole in the enclosure and push the LCD into it?
I cut an opening the size of the display viewing area then glued a clear piece of plastic on with silicon to form a window to keep it slash/water proof. I used replacement shields for welding helmets for the plastic

There seem to be two possible sets of buttons a matrix membrane and real buttons.

How would I mount the matrix membrane so I could press its keys?
The membranes usually have a sticky backing that you just stick onto outside of the box, the ribbon cable enters the box via a slot which is covered by the switch assembly.

Or
If I use real buttons how do I connect them to the arduino?

Many thanks. Aamcle
 
Buttons can be connected to an arduino quite easily. You basically run 5V/VCC to one side of the button, then out the other side of the button through a 10k resistor to GrouND. Then take a signal wire from the junction of the resistor and the button to an Arduino digital in. Of course there's plenty of alternative ways to do this, but this one is simple.
button_ciruit.png

It's then easy to read the button state with a digitalRead() ~

const int BUTTON_PIN = 4;

void setup()
{
pinMode(BUTTON_PIN, INPUT);
}

void loop()
{
if (digitalRead(BUTTON_PIN) == HIGH)
{
delay(50);
if (digitalRead(BUTTON_PIN) == HIGH)
{
// * do something *
Serial.print("Button pushed");
}
}
}

You read the button state twice because you get "bouncing" in the signal as the button finally comes to rest in contact with the switch terminals. (There's other electrical ways to solve this too)
 
You can also use

void setup()
{
pinMode(BUTTON_PIN, INPUT_PULLUP);
}

and just use the switch to pull the input pin to ground and get rid of the resistor. Saves a bit of wiring but now the pressed button is LOW i.e.

void loop()
{
if (digitalRead(BUTTON_PIN) == 0)

{
delay(50);
if (digitalRead(BUTTON_PIN) == 0)
{
// * do something *
Serial.print("Buttoned");
}
}
}
 
aamcle said:
I have a PCB for this project made from the drawings and I'll build it up over the next couple of months.

There a number of things I like to ask about,

What's the best way to mount it all in a enclosure/box?
Are there any pictures?

The small display, do I just cut a matching hole in the enclosure and push the LCD into it?

There seem to be two possible sets of buttons a matrix membrane and real buttons.

How would I mount the matrix membrane so I could press its keys?
Or
If I use real buttons how do I connect them to the arduino?

Many thanks. Aamcle
All depends on how you want to set it up really! Which version of the ardbir are you using? The one where the arduino is built onto the board, or using a separate UNO/Mega board?

I recently made one that sits on PCB spacers screwed onto a mounting plate inside the enclosure.

My LCD is mounted on top of the PCB to be easily seen from the top (I used a clear cover). You can easily cut a hole on your enclosure lid to mount the LCD using screws. Just make sure you use some silicone around the edges to help prevent any water/wort from spilling inside!

I used real buttons on mine. All you need is 5 wires; connect one pin of the button to the appropriate output on the PCB (up, down, start, enter). The ground wire can then be looped to the second pin on all the buttons.

I58OAmo.jpg
 
You could also be suffering from switch bounce

A small cap across the switch should help
 
^ the ardbir boards already take this into account, so the OP won't have to worry about this.
 

Latest posts

Back
Top