Projects:Spacestate: verschil tussen versies

Naar navigatie springen Naar zoeken springen
832 bytes toegevoegd ,  10 jan 2023
geen bewerkingssamenvatting
Geen bewerkingssamenvatting
Geen bewerkingssamenvatting
 
(3 tussenliggende versies door dezelfde gebruiker niet weergegeven)
Regel 8: Regel 8:


=Spacestate Switch=
=Spacestate Switch=
[[Bestand:Spacestate-measure.jpg|miniatuur|267x267px|State measurement wires. Green = GND, connected to the bottom of the state switch. Yellow is where the Arduino measures, connected to the top of the state switch and with an internal pull-up resistor. Also, in the top left of the picture, one of the two LED drivers is visible.]]


The Spacestate Switch was never documented, so this is an attempt to reverse engineer it. The physical device above was donated by SA007 (I think), and the controller was developed by Themba. I don't know whether there are still any copies of the source code.
The Spacestate Switch was never documented, so this is an attempt to reverse engineer it. The physical device above was donated by SA007 (I think), and the controller was developed by Themba. I don't know whether there are still any copies of the source code.
Regel 15: Regel 17:
Originally the Arduino Nano was powered by its USB connection, but it's connected via a very long USB cable and the range extenders are iffy, so it receives only ~3.8V over USB. Therefore, the Arduino is now powered from the LED board (~10V) through its Vin port, where a linear regulator transforms it to 5V (or it should, but it actually seems to produce 6V for some reason).
Originally the Arduino Nano was powered by its USB connection, but it's connected via a very long USB cable and the range extenders are iffy, so it receives only ~3.8V over USB. Therefore, the Arduino is now powered from the LED board (~10V) through its Vin port, where a linear regulator transforms it to 5V (or it should, but it actually seems to produce 6V for some reason).


The state of the switch is measured by pulling the bottom to ground, and then measuring the voltage at the top using the D3 pin with an internal pull-up. This will be ground when the space is OPEN (the two sides connect), and internal pull-up when the space is CLOSED.
The state of the switch is measured by pulling the bottom to ground (green wire in the image to the right), and then measuring the voltage at the top using the D5 pin with an internal pull-up (yellow wire). This will be ground when the space is OPEN (the two sides connect), and internal pull-up when the space is CLOSED.
 
The LED board is powered by a 14V adapter (should be 12V but we didn't have any lying around), +12V (brown) to the 'P' pin of the LED board, and GND (blue) to the 'G' pin. They are connected to the 'in' array of pins, and then the 'out' array of the first LED board connects to the 'in' array of the second LED board.


Then, the D2/D4/D5 control the LEDs in such a way that they switch colors using some nice animation when the state changes.
Then, the Arduino's D2/D4/D5 pins are connected to the first LED board (then through the shift register and onwards to the second LED board) and control the LEDs in such a way that they switch colors using some nice animation when the state changes.


=Spacestate publishing=
=Spacestate publishing=

Navigatiemenu