polyatail / multiverse Goto Github PK
View Code? Open in Web Editor NEWMulti-verse, a Burning Man 2020 honorarium project
Multi-verse, a Burning Man 2020 honorarium project
The system will be controlled by two RPis: one user-facing, and one controlling the characters.
Character controller
This RPi will run a small Flask API that receives complete 40-character verses over HTTP. It will have an RS485 shield with its transmission screw terminals connected to the character board. A single RS485 run will snake from PCB-to-PCB for a maximum run of <100 ft, easily within max spec for this protocol.
The 40-character verse will be chopped up into 5-character segments and assigned a binary number referring to its position in e.g., the top row. For example:
verse = "THE QUICK BROWN FOX JUMPED OVER THE DOG"
chopped_verse = {
0b000000: "THE Q",
0b000001: "UICK ",
0b000010: "BROWN",
0b000011: "FOX J",
0b000100: "UMPED",
0b000101: "OVER ",
0b000110: "THE D",
0b000111: "OG ",
}
Each combination (above) of binary DIP-switch values and 5-letter piece of the verse will be sent over the wire one at a time as a 32-bit integer.
User-facing controller
Some distance away, a second RPi with a USB keyboard will accept up to 40 characters at a time. When the user either 1) presses RETURN
or 2) types 40 characters, the verse will be sent over WiFi to the character controller RPi, via HTTP. We should probably bring a WiFi router that they both connect to rather than trying to get them to connect directly to one another.
Each PCB will have a simple firmware the does something like this:
def setup():
# determine where in the 200-character sequence this 5-character PCB is
my_position = read_from_dip_switches()
def loop():
while True:
signal = read_from_rs485()
# the first few bits of the signal matched this PCB, so perform the action
if signal.startswith(my_position):
for letter_num in range(5):
action, desired_letter = get_action(signal, letter_num)
if action == "reset":
start_reset(letter_num)
else:
rotate_to_letter(letter_num, letter)
# if there is a motor step to send to a character, send it
do_motor_steps()
# when the reset switch fires on a letter, stop rotating that letter's stepper motor
def respond_to_interrupt(register):
for letter_num in range(5):
if read_interrupt(register) == letter_num:
stop_reset(letter_num)
Basically, we're always reading what comes in on RS485. We're looking for bits that look like this:
6 bits | 5 bits | 5 bits | 5 bits | 5 bits | 5 bits |
---|---|---|---|---|---|
DIP switch | Letter 1 | Letter 2 | Letter 3 | Letter 4 | Letter 5 |
There are no more than 30 letters in a character's carousel, so 5 bits is enough to enumerate them all. There are 5 rows * 8 PCBs (controlling five characters each) = 40 PCBs, so 6 bits is enough to specify which PCB is being spoken to (2^6 = 64
). A single 32-bit int is enough to tell 5 letters what to do. Forty of these 32-bit ints, or 160 bytes, can reset the entire board.
If the six DIP switches on the PCB are ON-ON-OFF-ON-OFF-OFF
then we will only perform actions when the first 6 bits of data coming in over the wire are 110100
. Non-matching data will be ignored. If the 5 bits specifying a letter are 11111
(i.e., the number 31 in base 10), that's the signal to reset the character.
There are 200 letters in total: five rows of 40 characters. Each character is driven by a 5-wire unipolar stepper motor which will be run as a 4-wire bipolar stepper motor, leaving the center taps unconnected (and possibly cut). In addition, each character has an SPST switch which is triggered when a carousel reaches its "reset" position.
One of the PCBs for this project will drive five characters, and so there must be a total of 40 such boards. They must:
The BOM is going to be something like:
I think we probably need one 120V AC -> 12V DC power supply per 40 character rail, providing a total of 10A. That'll give them each about 3W of power while turning--that really should be enough!
Datasheets
28-BYJ48 (5-wire unipolar stepper motor)
http://robocraft.ru/files/datasheet/28BYJ-48.pdf
A4988 (bipolar stepper motor driver)
https://www.pololu.com/file/0J450/a4988_DMOS_microstepping_driver_with_translator.pdf
DRV8825 (another bipolar stepper motor driver)
https://www.ti.com/lit/ds/symlink/drv8825.pdf
https://www.pololu.com/file/0J603/drv8824-drv8825-stepper-motor-driver-carrier-schematic-diagram.pdf
SN75176A (RS485 transceiver)
https://www.ti.com/lit/ds/symlink/sn75176a.pdf
B5B-XH-A-LF-SN (JST connector for stepper motor)
https://www.digikey.com/product-detail/en/jst-sales-america-inc/B5B-XH-A-LF-SN/455-2270-ND/1530483
S8BYJ48 (stepper motor)
https://components101.com/sites/default/files/component_datasheet/28byj48-step-motor-datasheet.pdf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.