#3411850 - 10/17/11 09:38 AM
First Button box - Finished!
|
Joined: Mar 2011
Posts: 75
darkmouse
Junior Member
|
Junior Member
Joined: Mar 2011
Posts: 75
|
Hi Fellas, Just embarking on the build of my first button box, and have a few questions. I've never really touched electronics before and am a little clueless - I've read over all the relevant posts that I can find and am fairly sure I understand how the various types of button need wiring up and configuring, but am not so sure about rotary encoders and LEDS. So, 1. I can't get hold of the type Leo Bodnar recommends (he has none, and digikey want £30 for delivery from the States - my CPL is costing me £3 per minute, every penny counts!), but would this do the same job? - http://uk.rs-online.com/web/p/products/2...7633D4E4F4E4526 - it was the closest match I could find. 2. With an LED built into a switch I believe I have to use a resistor in 'sequence' to stop the LED burning too bright. What does in 'sequence' mean? ie. is it just wired in on the same piece of wire that goes from the 5v to the LED pin? Any help much appreciated - when I'm done I'm going to write an absolute beginners tutorial with pictures etc to help other cretins like me! Cheers, Darkmouse
Last edited by darkmouse; 11/20/11 05:27 PM.
|
|
#3411896 - 10/17/11 11:53 AM
Re: First Button box
[Re: darkmouse]
|
Joined: Dec 2009
Posts: 748
AndyB
Member
|
Member
Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
|
Hi Darkmouse, welcome to the forums. I take it that you have one of Leo's boards. If so, you can get these on ebay: http://www.ebay.co.uk/itm/12mm-Rotary-En...=item3a6b79e34fI just got a set of 10 ( complete with aircraft type knobs ) for £10. So far I've not had any problems with them on his BU0836 board. There are 5 pins: 2 on one side are for the push switch, the other three are the enbcoder. Centre pin goes to a ground on Leo's board and the other two go to consecutive button pins ( hat's important!). You have to be running Leo's encoder program which converts the outputs of the encoders to repeated button presses. Simple .... Only took abouot a week to get here. If you need a copy of the encoder program email me through my website and I'll send it to you. LEDS If you can imagine a stream of water being supplied by a lake in the mountains. It flows out to the sea. OK got the picture ? Water flows from the lake because it's higher than the bed of the stream i.e there is a potential difference between then that causes a pressure on the water and causes it to move. The +ve in a circuit is the lake. The stream is the wiring and/or components. The sea is the -ve of the circuit. The difference between then causes the electricity to FLOW from +ve to -ve. (well, that's how it was explained to me at first!!!) If you had a landslide at some part of the stream and it was partially blocked the flow of water to the bit after the blockage would be reduced. The blockage would be a RESISTOR. The bigger the value the more of a blockage. A diode (or LED) is like a gate that only lets the electricity flow one way. An LED usually needs around 2 volts across it to light but we tend to use 5 volts or 12 volts around our pits. To stop the extra voltage from popping the LED we put a resistor in line with it to cut down the flow to it. SIMPLE ..... In series just means in line. + -----------------/\/\/\/\/\-------------------!>!----------- - The squigly line is the resistor. Diodes are normally drawn as a triangle pointing along the line with a bar across the tip. The base of the triangle is the Anode (or positive) end of the diode and the bar is the Cathode (negative connection). If you're running with a 5 volts supply I'd try a 1K ohm resistor (the coloured bands are brown, black and red) first and see how bright that is. T make it brighter, reduce the value of the resistor. There are lots of sites on the net to get the resistor colour code from. Hope this helps. Cheers, Andy
Last edited by AndyB; 10/17/11 11:53 AM.
|
|
#3412072 - 10/17/11 04:25 PM
Re: First Button box
[Re: AndyB]
|
Joined: Mar 2011
Posts: 75
darkmouse
Junior Member
|
Junior Member
Joined: Mar 2011
Posts: 75
|
A +5 connected to ground? Sorry, I really am a cretin. Does that mean don't run a wire from the +5 on the board to a gnd on the board? Or dont run a wire from a switch terminal that requires +5 to a gnd? (ETA) Or as my cleverer girlfriend just mentioned, make sure that a wire running from the +5 doesn't touch ANY ground ie radiator?
Last edited by darkmouse; 10/17/11 04:32 PM.
|
|
#3412264 - 10/17/11 08:30 PM
Re: First Button box
[Re: darkmouse]
|
Joined: Dec 2009
Posts: 748
AndyB
Member
|
Member
Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
|
You're not a cretin. Problem is that I worked in the electronics for years and make assumptions I shouldn't make. Basically what I should have said was make sure the +5 volts NEVER touches the 0 volts (ground) on Leo's board. It shouldn't really touch any other ground (ie radiator, kitchen taps stuff like that) either. To use the stream analogy again. If you had a dam across the lake in the mountains and it let a small amount of water through constantly, that would be your stream. If the dam burst all the stored water (or electricity) would flow out in an uncontrolled manner and smash up the valley that the stream runs through. Electricity is great, but you have to keep it under control. If you put a switch between the +5 and ground and pushed it there would be lots of smoke from your board and a nasty smell (you will do this by mistake at some point in the future, we all have.....) and your board would be fecked (technical term). That's one of the advantages of resistors. They're the building blocks that allow us to control electricity. I grabbed a bit of the image for your board to show you an example. You can see that the push button switch is connected across terminals B1 and it's ground (GND). The encoders (when you get them) are connected thus: middle pin is connected to the ground of ONE of the two switch terminals. Each of the other pins are connected to TWO CONSECUTIVE switch inputs. It doesn't matter which GND you use as they're all connected together on the board. Once the program is running, when you turn the encoder one way you get repeated switch closures on B2 and when turned the other way you get repeated switch closures on B3. Does that make sense to you ? cheers, Andy
|
|
#3412795 - 10/18/11 12:05 PM
Re: First Button box
[Re: darkmouse]
|
Joined: Mar 2003
Posts: 3,922
Paradaz
Senior Member
|
Senior Member
Joined: Mar 2003
Posts: 3,922
UK
|
Bizarre question here, but what is the name of the little plastic 'things' that for example fit onto the prongs of a mother header.....such as the led+ and led- prongs? I'm looking at buying one of Leo Bodnars SLI-M modules (when back in stock) and adding a few push buttons or rotaries to a custom mod. I know these things are similar to the jumpers found on a board but I also know that's not the correct term for it either as it obviously isn't 'bridging' the connection either. Alternatively, what is the best way of getting hold of this kit in the UK. I've had a quick scour of ebay.co.uk and not really found what I'm looking for and also RS supplies for bit and pieces. Do I have to order from the US to really get the best rotaries and switches? Early impressions are these are like rocking horse #%&*$# to track down! Edit: I'm looking at Molex KK connectors (is this correct, or are they a special type of 'KK' connector) but still can't find much information/suppliers, especially in the UK
Last edited by Paradaz; 10/18/11 12:20 PM. Reason: updated
On the Eighth day God created Paratroopers and the Devil stood to attention.
|
|
#3412973 - 10/18/11 04:27 PM
Re: First Button box
[Re: darkmouse]
|
Joined: Mar 2010
Posts: 128
Rich_Price
Member
|
Member
Joined: Mar 2010
Posts: 128
|
Hi, Is this the sort of thing you are after? You have to make them up yourself or there are pre-crimped wires on the site. This is a great site and really quick delivery and they're in the UK! Technobots BR Rich
|
|
#3413091 - 10/18/11 06:45 PM
Re: First Button box
[Re: darkmouse]
|
Joined: Dec 2009
Posts: 748
AndyB
Member
|
Member
Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
|
Hi again Darkmouse, The wiring I showed for the encoders IS CORRECT as long as you are using Leo's encoder program which converts the stuff Wledzian spoke about in to simple button presses. I was simply trying to keep it simple for you. I thought you might have problems with the toggle switches. A lot of builders (including myself) use biased switches. This means the toggle is held in one position by a spring. You push the toggle to the other position where it makes the circuit and when you release it the spring pulls it back to the original position. A toggle like this works like a push button switch and will work with your board. My opencockpits USBkeys board is exactly the same. They don't like switches that are closed for a while. Does your switch have 3 or 6 connections on the bottom ? if it has 6 then you can wire it as: BTW you should credit Leo for the diagram not me. The original image was his, I just scribbled over it....... I check my email from my simpit site regularly during the day so it you'd like a faster answer use that. Cheers, Andy
Last edited by AndyB; 10/18/11 06:48 PM.
|
|
#3413147 - 10/18/11 07:52 PM
Re: First Button box
[Re: Rich_Price]
|
Joined: Mar 2003
Posts: 3,922
Paradaz
Senior Member
|
Senior Member
Joined: Mar 2003
Posts: 3,922
UK
|
Hi, Is this the sort of thing you are after? You have to make them up yourself or there are pre-crimped wires on the site. This is a great site and really quick delivery and they're in the UK! Technobots BR Rich Perfect....cheers Rich
On the Eighth day God created Paratroopers and the Devil stood to attention.
|
|
#3415383 - 10/21/11 07:24 PM
Re: First Button box
[Re: darkmouse]
|
Joined: Dec 2009
Posts: 748
AndyB
Member
|
Member
Joined: Dec 2009
Posts: 748
Ayrshire, Scotland
|
Hmmm, that's very interesting.
It looks like on your BU0836x board each input has it's own GND.
On my own BU0836 board, provided I don't wan't more than 12 imputs I can use a common GND. If I want to go up to 32 inputs I've got to get in to rows and colums and blocking diodes ( luckily you don't have to..... ).
Glad you got it worked out It's far more satisfying when you manage to get it yourself, but sometimes you need a gentle push in the right direction. Look forward to seeing the pics.
Cheers,
Andy
Last edited by AndyB; 10/21/11 07:25 PM.
|
|
#3437859 - 11/20/11 04:26 PM
Re: First Button box
[Re: darkmouse]
|
Joined: Mar 2011
Posts: 75
darkmouse
Junior Member
|
Junior Member
Joined: Mar 2011
Posts: 75
|
Finito! Better late than never I guess! I doscovered a few design flaws right near the end, such as having no real means of attaching the bodnar board securely in the box enclosure and realsising that any tension on the usb cable may move the board around pulling out wires, but nevermind, it all works! Thanks for all the help, especially AndyB! In the next few weeks I'll try and put together an absolute idiots guide to making a similar one - comprehensive enough that someone with zero experience can just follow the instructions and it'll work. Once again, cheers guys. PS. not sure whats up with the photo, standby
Last edited by darkmouse; 11/20/11 04:34 PM.
|
|
|
|