Giter VIP home page Giter VIP logo

raspi_stage_intercom's Introduction

RasPi stage intercom

RasPi stage intercom is a wired and wireless stage intercom system. It used a headless Raspberry Pi in a 3d printed enclosure as a belt pack, communicates via wired Ethernet (ability to power the Pi via Power Over Ethernet) and/or regular Wifi with a local mumble server. The Mumble client is written in Go. The project is based on the talkiepi, a walkie talkie style use off the Pi. Both use GPIO pins for push to talk and LED status. The Mumble client is a fork of barnard, which was a great jump off point for me to learn golang and have something that worked relatively quickly.

3D printable enclosure

In the stl directory are the stl files for an enclosure for the Raspberry Pi 3 Model B You will also need a a random USB sound card (to have a microphone input) and a headset + power supply. (PoE to micro USB extractors exist to only require the one Ethernet cable and no local power supply or power bank)

On the top side are 3 holes for 3mm LEDs in LED-fittings or 5mm LEDs without. The big hole is for a 19mm illuminated Push-To-Talk button.

I do recomment Dupont connectors and the proper pliers instead of soldering the cables to a single connector. This way all wires can be removed in case you want to rehouse the electronics into an improved enclosure.

Generation 1:

Next to it is a 2.5mm TRS connector for an external Push-To-Talk button. You can use an M6 thread-cutter in the 3D printed plastic to make it screw in perfectly.

Generation 2: (in development)

On the underside, there is a hole for a round 6 pin mini-DIN socket. It is less prone to false signals compare to TRS. Each function uses 2 pins. 1+2=GND 3+4=INPUT 5+6=VCC

There is a square hole in the side for volume +/- controls. I used Marquard model 1838.1402
https://www.marquardt-shop.com/de/produkte/schalter/wippschalter/1830/1838.1402/zeichnungen.html

Other changes:

There is enough space for a battery-hat on top of the Raspberry. The Power over Ethernet -extractor no longer blocks the internal sound card. (unused here but can be used e.g. to output an LTC timecode for cameras.) Emergency access to the power-socket is easier. (In case som other power source needs to be connected RIGH NOW.) The audio output of the raspberry sound card (that has no microphone input) is accessible. The LEDs are labeled. The Pins to connect each LED and button to are also labeled on the inside.

Installing

Because Github as a file size limit and because I could not keep it updated, I do not offer an SD-card image. When building your own image (Also see the Talkipi readme.md about that. It should be based on at least raspbian-stretch-lite), try to keep everything that is device-specific (IP-address, mumble user name, server-ip+password,...) in /boot, so it can be accessed from any random computer that can read and write FAT. You should have the filesystem read-only by default, so the box can be switched off in any state.

For the manual installation onto an existing Raspberry Pi, there is an install guide here. There is a script INSTALL_INTERCOM that does nearly all of these steps.

In addition you can use GPIO 14+15 (pin 8+10) for volume+/volume- keys. Just copy VOLUMEKEYS_SERVER.txt and INTALL_VOLUME_KEYS into /boot (the root of the FAT-partition) and execute INTALL_VOLUME_KEYS as root.

GPIO and LEDs

Pins used: (single row only, so no dual-row connectors are needed)

  • 2 = (unused +5V)
  • 4 = (unused +5V)
  • 6 = GND (for volume)
  • 8 = GPIO 14 RESERVED for "Volume+" button
  • 10 = GPIO 15 RESERVED for "Volume-" button
  • 12 = GPIO 18 = +3.3V for "Online" LED
  • 14 = GND (for LEDs)
  • 16 = GPIO 23 = +3.3V for "Participants" LED
  • 18 = GPIO 24 = +3.3V for "Transmit" LED
  • 20 = GND (for PTT)
  • 22 = GPIO 25 = Push To Talk (PTT) Button input with pull-up
  • 24 = (unused GPIO 8)
  • 26 GPIO 7 = +3.3V for a second "Transmit" LED (PTT buttons with build-in LEDs)
  • 28 = (unused I2C)
  • 30 = GND (for external "Transmit" LED)
  • 32 = GPIO 12 = +3.3V for a second "Transmit" LED (PTT buttons with build-in LEDs)

You can edit your pin assignments in talkiepi.go

const (
	OnlineLEDPin       uint = 18
	ParticipantsLEDPin uint = 23
	TransmitLEDPin     uint = 24
	ButtonPin          uint = 25
)

You can find the pinout for a Raspberry Pi 3 here: https://www.element14.com/community/servlet/JiveServlet/previewBody/73950-102-11-339300/pi3_gpio.png

Here is a basic schematic of how I am currently controlling the LEDs and pushbutton:

schematic

A red LED needs 1.8V, so we need 330Ω. 2x 634Ω in parallel are 317Ω. This is close enough. (317Ω * 0.005A = 1.585V; 3.3V - 1.585V = 1.715V)

A green LED needs 2.4V, so we need 220Ω. 2x 440Ω in parallel are obviously perfect.

A yellow LED needs 2.1V, so we need 270Ω. 2x 130Ω in series are close enough.

A blue or white LED needs 3.0V. This needs only a very small resistor (3.3V-3.0V=0.3V => X * 0.005A = 0.3V => X=0.3V/0.005A=60Ω).

Remember, the long side on an LED is +. That's the side that faces VCC=+3.3V on the GPIO pin. The short side faces GND with the resistor in between.

The Push-To-Talk button can also trigger an LED via a chain "3.3V---LED---Led resistor---gpio as input --- button --- GND"

So for a push button with embedded LED we connect: (+) to 3.3V (-) via LED-resistor to (N.O.=Normally Open) and to the GPIO pin (C=Common) to GND

Pi Zero Fixes

I have compiled libopenal without ARM NEON support so that it works on the Pi Zero. The packages can be found in the workarounds. directory of this repo, install the libopenal1 package over your existing libopenal install.

License

MPL 2.0

Author

raspi_stage_intercom's People

Contributors

dchote avatar marcuswolschon avatar sregister avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

sundance-kid

raspi_stage_intercom's Issues

babyphone mode

I'd like to modify the talkiepi as a babyphone with voice activation. Therefore no GPIO LEDs and buttons are required.

As far I understood "client.go" and "talkiepi.go" needs to be modified in a way that no "gpio.go" are needed and the button function needs to be replaced by the voice activation.

Could you give me a hint how I could realize this mod? Or is it a simple adjustment of configs?

"fatal error: runtime: stack growth during syscall" when pressing PTT button

After doing an "apt-get dist upgrade" on Raspian (still using an ancient Go 1.3),
every press of the Push To Talk button produces:

`Connected to 192.168.1.1:64738 (0)
Welcome message:
Welcome to this server running Murmur.
Enjoy your stay!

Unable to find channel: talkiepi
Channel 'Root' has 2 participants
Button is pressed
fatal error: runtime: stack growth during syscall

runtime stack:
runtime.throw(0x4375a0)
/usr/lib/go/src/pkg/runtime/panic.c:520 +0x5c
runtime.newstack()
/usr/lib/go/src/pkg/runtime/stack.c:739 +0x6d0
runtime.morestack()
/usr/lib/go/src/pkg/runtime/asm_arm.s:210 +0x44

goroutine 25 [stack growth]:
runtime.cgocall(0x14960, 0x461a2ee8)
/usr/lib/go/src/pkg/runtime/cgocall.c:142 +0xdc fp=0x461a2ed8 sp=0x461a2eac
github.com/dchote/go-openal/openal._Cfunc_alcCaptureSamples(0x0, 0x56d05000, 0x1e0)
github.com/dchote/go-openal/openal/_obj/_cgo_defun.c:297 +0x34 fp=0x461a2ee4 sp=0x461a2ed8
github.com/dchote/go-openal/openal.(*CaptureDevice).CaptureTo(0x56cc42a0, 0x56d05000, 0x3c0, 0x3c0)
/home/mumble/gocode/src/github.com/dchote/go-openal/openal/alcCore.go:172 +0x80 fp=0x461a2ef4 sp=0x461a2ee4
github.com/dchote/go-openal/openal.(*CaptureDevice).CaptureSamples(0x56cc42a0, 0x1e0, 0x56d05000, 0x3c0, 0x3c0)
/home/mumble/gocode/src/github.com/dchote/go-openal/openal/alcCore.go:197 +0xa4 fp=0x461a2f20 sp=0x461a2ef4
github.com/dchote/gumble/gumbleopenal.(*Stream).sourceRoutine(0x56d7e1e0)
/home/mumble/gocode/src/github.com/dchote/gumble/gumbleopenal/stream.go:140 +0x22c fp=0x461a2fc4 sp=0x461a2f20
runtime.goexit()
/usr/lib/go/src/pkg/runtime/proc.c:1445 fp=0x461a2fc4 sp=0x461a2fc4
created by github.com/dchote/gumble/gumbleopenal.(*Stream).StartSource
/home/mumble/gocode/src/github.com/dchote/gumble/gumbleopenal/stream.go:66 +0xb0

goroutine 16 [chan receive]:
github.com/dchote/talkiepi.(*Talkiepi).Init(0x56d8e000)
/home/mumble/gocode/src/github.com/dchote/talkiepi/client.go:28 +0xfc
main.main()
/home/mumble/gocode/src/github.com/MarcusWolschon/RasPi_stage_intercom/cmd/talkiepi/main.go:62 +0x9b8

goroutine 19 [finalizer wait]:
runtime.park(0x2b2f0, 0x44a318, 0x4382a9)
/usr/lib/go/src/pkg/runtime/proc.c:1369 +0x5c
runtime.parkunlock(0x44a318, 0x4382a9)
/usr/lib/go/src/pkg/runtime/proc.c:1385 +0x40
runfinq()
/usr/lib/go/src/pkg/runtime/mgc0.c:2644 +0xa0
runtime.goexit()
/usr/lib/go/src/pkg/runtime/proc.c:1445

goroutine 21 [sleep]:
time.Sleep(0x1dcd6500, 0x0)
/usr/lib/go/src/pkg/runtime/time.goc:39 +0x3c
github.com/dchote/talkiepi.func·002()
/home/mumble/gocode/src/github.com/dchote/talkiepi/gpio.go:47 +0x110
created by github.com/dchote/talkiepi.(*Talkiepi).initGPIO
/home/mumble/gocode/src/github.com/dchote/talkiepi/gpio.go:49 +0x1a4

goroutine 22 [IO wait]:
net.runtime_pollWait(0x46b94918, 0x72, 0x0)
/usr/lib/go/src/pkg/runtime/netpoll.goc:146 +0x6c
net.(*pollDesc).Wait(0x56cf54f8, 0x72, 0x0, 0x0)
/usr/lib/go/src/pkg/net/fd_poll_runtime.go:84 +0x44
net.(*pollDesc).WaitRead(0x56cf54f8, 0x0, 0x0)
/usr/lib/go/src/pkg/net/fd_poll_runtime.go:89 +0x40
net.(*netFD).Read(0x56cf54c0, 0x56d04c00, 0x400, 0x400, 0x0, 0x46b93248, 0xb)
/usr/lib/go/src/pkg/net/fd_unix.go:242 +0x320
net.(*conn).Read(0x56cc44c8, 0x56d04c00, 0x400, 0x400, 0x0, 0x0, 0x0)
/usr/lib/go/src/pkg/net/net.go:122 +0xd4
crypto/tls.(*block).readFromUntil(0x56ce7620, 0x46b949a0, 0x56cc44c8, 0x5, 0x0, 0x0)
/usr/lib/go/src/pkg/crypto/tls/conn.go:451 +0xdc
crypto/tls.(*Conn).readRecord(0x56d5e300, 0x17, 0x0, 0x0)
/usr/lib/go/src/pkg/crypto/tls/conn.go:536 +0x1b4
crypto/tls.(*Conn).Read(0x56d5e300, 0x56d00900, 0x6, 0x6, 0x0, 0x0, 0x0)
/usr/lib/go/src/pkg/crypto/tls/conn.go:901 +0x16c
io.ReadAtLeast(0x46b94d68, 0x56d5e300, 0x56d00900, 0x6, 0x6, 0x6, 0x0, 0x0, 0x0)
/usr/lib/go/src/pkg/io/io.go:289 +0xf4
io.ReadFull(0x46b94d68, 0x56d5e300, 0x56d00900, 0x6, 0x6, 0x0, 0x0, 0x0)
/usr/lib/go/src/pkg/io/io.go:307 +0x6c
github.com/dchote/gumble/gumble.(*Conn).ReadPacket(0x56cd2960, 0x56cc9020, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/mumble/gocode/src/github.com/dchote/gumble/gumble/conn.go:46 +0x15c
github.com/dchote/gumble/gumble.(*Client).readRoutine(0x56d4a380)
/home/mumble/gocode/src/github.com/dchote/gumble/gumble/client.go:220 +0x5c
created by github.com/dchote/gumble/gumble.DialWithDialer
/home/mumble/gocode/src/github.com/dchote/gumble/gumble/client.go:113 +0x298

goroutine 23 [select]:
github.com/dchote/gumble/gumble.(*Client).pingRoutine(0x56d4a380)
/home/mumble/gocode/src/github.com/dchote/gumble/gumble/client.go:202 +0x218
created by github.com/dchote/gumble/gumble.DialWithDialer
/home/mumble/gocode/src/github.com/dchote/gumble/gumble/client.go:114 +0x2c0

goroutine 17 [syscall]:
runtime.goexit()
/usr/lib/go/src/pkg/runtime/proc.c:1445

goroutine 26 [chan receive]:
github.com/dchote/gumble/gumble.func·001()
/home/mumble/gocode/src/github.com/dchote/gumble/gumble/client.go:178 +0x6c
created by github.com/dchote/gumble/gumble.(*Client).AudioOutgoing
/home/mumble/gocode/src/github.com/dchote/gumble/gumble/client.go:187 +0xc0
`

Design beltpack enclosure

Design the 3D CAD model of the intercom belt pack that contains the Raspberry Pi and USB sound card.

Can listen but not talk?

Using Mumble/murmur 1.3.0 as a server this may happen.
The current workaround is to use Mumble 1.2.19 as a server.
(1.2.3 does not work anymore because a certificate times out. 1.2.3a has no sound because opus was not yet supported.)

For some reason this did not work right after uninstalling 1.3.0 and installiung 1.2.19 but later it worked.
No cause known.

UPDATE DOCUMENTATION

Update the documentation to reflect the "RasPi_stage_intercom" project name.
Remove files of TalkiePi not relevant for this project

enhancement: USV battery

Provide enough space for a Raspberry Pi USV-hat.
So the Ethernet-cable with Power-over-Ethernet can be pulled out and the user can continue via Wifi for a while.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.