Difference between revisions of "Lightswitch"

From Technologia Incognita
Jump to: navigation, search
Line 28: Line 28:
 
</gallery>
 
</gallery>
  
 +
<pre>
 
There are 8 switches used to turn certain devices On and Off. So naively, we can
 
There are 8 switches used to turn certain devices On and Off. So naively, we can
 
have at least 8 "presets". I have a few down already:
 
have at least 8 "presets". I have a few down already:
Line 93: Line 94:
  
 
We'll need an embedded device to control all of this - costs about 40 euro.
 
We'll need an embedded device to control all of this - costs about 40 euro.
 +
</pre>

Revision as of 14:47, 13 June 2015

Projects
Participants Wizzup
Skills soldering, lasercutting, insanity, programming
Status Active
Niche Electronics
Purpose World domination

The most complex lightswitch we can think of, well almost.


Code is work in progress: https://github.com/MerlijnWajer/powerbars/blob/hardware_interface/spacebar.py

  • upper-binary: diameter = 12mm
  • lower-binary: width x height = 24x25mm
  • mode-switch: diameter = 6mm (screw distance= 32mm)
  • info-request: diameter = 15mm
  • Lightswitch-panel0.svg
  • Lightswitch-panel1.svg
There are 8 switches used to turn certain devices On and Off. So naively, we can
have at least 8 "presets". I have a few down already:

0: Turn Off/On everything
1: Turn Off/On (all) lights
2: Turn Off/On audio
3: Turn Off/On west space (power, light)
4: ...
5: ...
6: ...
7: ...

Input on other groups/presets/things to add to this list is very welcome.

Of course, we added some extra switches and it's possible to add a lot more
options. We can add a single switch that allows up to 16 options.

The extreme example is the expert mode, where the 8 switches will act
as "bits" of a single byte. That already gives one 255 possible options for
configuration. We added another switch, to allow one to 'stack' said byte
configuration to add another byte. I expect we don't need more than 65536
options, but it's possible. And the input will be in little endian.

Eventually, it will also feature LEDs to indicate the state of each individual
socket. Other planned "add-ons" are:
* Small display + a two buttons to "scroll" through different options, with two
  buttons to turn said options on and/or off.
* Possibly using a speaker for feedback

This is the layout, in plaintext (design is modular and allows adding more
buttons, etc)

    +------------------------------------------------------------+
    -                                                            -
    -  LED  Switch [0]   [Mode: Normal/Expert]   [Show Status]   -
    -                                                            -
    -  LED  Switch [1]    LED LED LED LED LED LED LED LED LED    -
    -                                                            -
    -  LED  Switch [2]    LED LED LED LED LED LED LED LED LED    -
    -                                                            -
    -  LED  Switch [3]    LED LED LED LED LED LED LED LED LED    -
    -                                                            -
    -  LED  Switch [4]    LED LED LED LED LED LED LED LED LED    -
    -                                                            -
    -  LED  Switch [5]    LED LED LED LED LED LED LED LED LED    -
    -                                                            -
    -  LED  Switch [6]    LED LED LED LED LED LED LED LED LED    -
    -                                                            -
    -  LED  Switch [7]   [ Act/Enf  ] [ Stack ]  [ Mode??? ]     -
    -                                                            -
    +------------------------------------------------------------+

Act(ivate) and Stack work in expert mode, respectively taking the current
bytes as a number and add a byte to the stack.

Enf(orce) will, in normal mode, enforce all the current settings of all the
switches, whereas they will normally only change when turned.

"Mode???" is a switch that can take several different states. These will be used
for possible addons (such as switching endianness), but probably only in
expert mode -- to keep the basic usage sane.

LEDs won't be there for some time.

We'll need an embedded device to control all of this - costs about 40 euro.