Parmeggido, on 10 September 2016 - 01:49 AM, said:
I want a big red alpha button... with an oled screen that plays a short nuke explosion animation every time I push it... In all seriousness though, I think this is pretty cool, and something I wish I had the knowledge and cashflow to do. Tinkering is such a satisfying thing, especially if it works.
this is my bom:
arduino pro micro (atmega32u4) - $8 (these are currently lested at < $5)
rotory encoder - $1.98 (now listed < $1)
missile switch cover - $1.98 (you can get the complete switch + led + cover for < $3)
big red button - $2.31
set of 6 arcade buttons - $14.55 (there are cheaper sets though, i wanted a certain type that could be lit well)
small switch - 5 for a $1
signal diodes - 50 for $1
assorted resistors (values used 10k, 68, 47, 10) - $1
capacitors (10 nf ceramic) - salvaged from trash
large switch and bargraph display - salvage
3d pringed parts (knob, spacer for large button, arduino mounting bracket) - about 10 cents worth of filament
the box - saved from trash
its not terribly cheap, there are a couple places you can save money. the set of arcade buttons for example was because i preferred a special type. ones that are clear and can be backlit, you can get sets of 3 if you dont mind all one color for < $3 , get 2 sets of those and save about $9 bucks. having all one color led simplifies the led circuit.
im using a technique called
charlieplexing this lets me controll all 12 leds with just 4 io pins. if all my leds were the same, then i could have just used 4 reisistors for the whole thing, each one being 1/2 the value needed for the led, instead of giving each led its own value (different colors have different specs). in retrospect i think i should have just used all white leds, for their brightness and to simplify things. live and learn. i actually bought a stand alone led driver ic but turns out i didnt need it.
buttons are configured in 2x5
matrix, which takes 7 i/o pins (i could have got 12 buttons with the same number of pins if i did 3x4, but i only needed 10). each switch has a signal diode. so i can scan the whole thing without ghost buttons (pgi needs to use more diodes). all the button, switches and the select switch on the rotory encoder are all tied in. debounce is done in software.
the only other thing i did was an
r/c filter on the outputs of the rotory encoder (i used 10nf caps and 10k resistors). i opted to debounce this in hardware because debouncing rotory encoders in software tends to suck. there are libraries out there for this but i hate solving problems with the include statement.
Mystere, on 10 September 2016 - 09:56 AM, said:
Impressive.
I myself have no time to wire up hardware from scratch, so instead I am just using something "off the shelf" (
):
That collection of dual and triple-state switches and analog inputs allows for a whole lot of possibilities, like your modes 1, 2, and 3 -- plus a whole lot more. <maniacal
>
Go off-the-shelf and let your imagination and creativity run wild.
been wanting to get a warthog myself, but my ch throttle, stick and pedals refuse to break.