from the specifications it looks OK, but see if there is a datasheet to confirm that.
Bela for 16mm film installation
Yes that looks good. You will need some i2c or uart communication to get it going but it seems fairly straightforward.
yes I was wondering if I could use Bela's analog outputs with this one too?
I did use i2c with a trill in Pd a little bit, is this simular?
Floris was wondering if I could use Bela's analog outputs with this one too?
Doesn't look like it.
Floris did use i2c with a trill in Pd a little bit, is this simular?
It's a bit more involved, but it shouldn't be too bad. I am wondering whether you'll get a decent enough refresh rate that the light oesn't show visible stepping.
By the way, keep in mind that only certain types if light bulbs are suitable to be controlled via a dimmer, as described in the product page of the first link you sent.
Also, please be careful when handling high voltages. Put all parts in an enclosure , safely anchored using standoffs to prevent them from touching the case. If using a metal case, ground it. Also be aware that dimmed lights can be a source of electrical noise so try to keep the cables carrying the dimmed current away from the audio cables and the dimmer itself away from the Bela board.
I'll get started with relay boards, both for switching the projector and room light.
As with other installations I often experienced interference because of dimmed lights.
I also had some visible stepping with the Velleman dimmer board, very annoying.
We'll see if a dimmer is really needed when the relay boards work.
Floris this solid state relay board looks allright, doesn't is?
I've used the 8 channel version of this relay in the past to switch 220V light bulbs with raspberry pi GPIO (3.3V signals). Note that you cannot fade in/out with relays and can only do instantaneous on or off.
If you have the budget you might also want to consider DMX controlled lights or dimmers as those probably have nicer dimming curves.
good idea, I'll look into dmx.
- Edited
here's an update:
It's been great to control the film projector, room light and soundtrack from Bela!
After receiving a trigger from a blinking pushbutton in Pd, a relay board is used to switch off the room light and start the projector. And even better: after receiving a trigger from the optical soundtrack (on the 16mm film strip) in Pd starts the stereo soundtrack beautifully in sync with the projected images.
As the relay switches the room light abruptly, I placed a Velleman VM135 MAGICAL! DIMMER module between the relay and power socket. Then the room light fades in and out but also, "magically" these errors pop up:
PRU interrupt timeout, -1 110 Connection timed out
PRU interrupt timeout, -1 110 Connection timed out
PRU interrupt timeout, -1 110 Connection timed out
PRU interrupt timeout, -1 110 Connection timed out
McASP error, abort
PRU interrupt timeout, -1 110 Connection timed out
Makefile:606: recipe for target 'runide' failed
make: *** [runide] Error 1
Without the dimmer all goes well.
Does this mean I can't use any dimmer with Bela?
In a distant future, I would like to use lights that have internal DMX controls. Will the same thing happen when things like these fade?
There's a picture of my little box on https://florisvanhoof.com/bela.
(The grey multi cable goes to the pushbutton with build in LED.)
Next week I will make a better 19 inch 2U box for the Bela, relay board and power sockets.
Please let me know if you see anything (distances, isolation,...) that can be better.
- Edited
To start the digital stereo soundtrack in sync with my film, I made 1mm small perforations in the otherwise black optical soundtrack.
Thanks @Remork these bursts of optical sound are detected in Pd in the following way:
-one burst per second means it’s just a splice passing the optical head.
-two bursts per second means two perforations and will start the digital soundtrack.
-three bursts per second means three perforations and will end the digital soundtrack and stop the projector
After a lot of finetuning the threshold times and values, I got this working.
That is until light switches or power sockets were used anywhere else in the house.
Pushing switches or (un)plugging power sockets also generate bursts that give false detections and make start/stop the soundtrack etc.
If those bursts come from the circuitry that receives the optical sound in the projector, I might be able to bypass this by tapping straight in the optical sensor.
Or would those bursts come from the optical sound lamp itself? In this last case, I can forget about getting triggers from optical sound and choose between these options:
-Expensive option: the film normally has a black optical soundtrack, but I can ask the lab to print a 440Hz sine wave at the beginning of the film, and a 1000Hz sine wave at the end. This way the pitch can be detected in Pd to control the projector, room lights and soundtrack.
-Stupid option: use the button that visitors push to activate the soundtrack (after few seconds of silence) and shut the projector down at the end of the soundtrack.
The installation will run for 3 months, and as in this case there’s no feedback from the film to the computer, I have no idea if this stays in sync well enough. (There’s no talking, so it can be out of sync a few seconds.)
-I have also seen a system that has a microswitch with tiny wheel rolling along the film that detects the end of the film because of a small piece of film was cut away there, so the microswitch closes. I’m afraid this is hard to make (at least for me) and will put tension on the film loop.
Sorry if this is too far out. But it would be great to make my 50 year old projector interact with Bela. All advice welcome.
Floris PRU interrupt timeout, -1 110 Connection timed out
PRU interrupt timeout, -1 110 Connection timed out
PRU interrupt timeout, -1 110 Connection timed out
PRU interrupt timeout, -1 110 Connection timed out
McASP error, abort
PRU interrupt timeout, -1 110 Connection timed out
Makefile:606: recipe for target 'runide' failed
make: *** [runide] Error 1
these errors may be caused by either noise being injected into Bela's digital I/O or a fluctuation of the power supply. The latter would normally cause the board to shutdown or remount the SD card / eMMC as read-only and require a reboot anyhow, so you'd probably notice that. It would be good to see if you see anything useful when running dmesg | tail
immediately after you get those timeouts.
Floris Without the dimmer all goes well.
Where is the dimmer located? I don't think I see it in the picture.
It may well be that if the dimmed AC line is too close to Bela, it could be the cause of these issues. And/or it could be that the issue is about enabling the dimmer and that things would keep running OK while the dimmer is enabled.
I'd try the following: power Bela from a battery or a power supply that is not connected to the mains earth, even powering from a laptop while it's not connected to its charger should work. Then, separately, enable the dimmer on a set of AC wires powering your lights in a way that is not connected to Bela at all. Start the Bela program and bring the dimmed AC wires close to the running board: does the program stop running at some point? If the answer is no, try the following. Start the Bela program with the dimmer disabled and the wires close to Bela then enable the dimmer: does the program stop?
If the answer to both of these is no, then it would be likely that it's not an issue due to the magnetic emissions of the dimmed AC line, but rather an issue with the wiring and the ground return path of your box. If, instead, you get at least a yes, then electromagnetic emissions are the likely culprit and that can be solved/mitigated by spacing Bela and the dimmed AC line further apart and/or shielding them.
Floris If those bursts come from the circuitry that receives the optical sound in the projector, I might be able to bypass this by tapping straight in the optical sensor.
Or would those bursts come from the optical sound lamp itself? In this last case, I can forget about getting triggers from optical sound and choose between these options:
Hmm hard to tell, I don't know anything about how this optical sensor works. I am wondering if this and your issue with the dimmer both point to an issue with wiring of the grounds and earths in your system.
If this cannot be resolved, another option beyond the ones you highlighted would be to try logging the two types of trigger to file (e.g.: with [writesf~]
), then look at them and see if there is an easy way to differentiate between the bursts you get.
- Edited
thanks!
Dimmer:
Disconnecting Bela from ground helps for the dimmer errors.
The picture was taken right after I removed the dimmer.
It was located between one of the relays and the power socket.
Electrical bursts:
Optical sound looks and works much like grooves on a vinyl record, with light instead of a needle.
The little holes I made just sound like pops.
The holes and bursts from connecting anything to mains sound very much alike.
On the scope it is almost impossible to tell the difference. And I can't differentiate them with low pass filtering.
Also: I'm wondering what's the analogy between the Bela IDE scope scale and the values in the Pd threshold object.
Solution:
These projectors only came with an 8 ohm speaker output and I just found out this one is fine and totally free of bursts.
The unwanted electrical bursts are activated by the extra line output that I soldered on my projector last year.
When any cable (short or long) is connected, the bursts appear.
When nothing or only a jack plug without cable is connected, the bursts are gone.
I opened the projector again, looked at the drawing s in the manual for an hour and found better signal and ground paths, soldered a cap, and it works!
- Edited
Hi, all works fine, except:
when using the relays to switch lights a few times in a row., the "McASP error, abort" appears again.
This is without dimmer, but with relays.
I deleted the little sequence I made with the 3 relays controlling 3 lamps, and just use them simply to turn the lights off when the film starts, this seems to work all of the time.
Those relays are now fed from Bela all well within range, would it help to use an extra 5V adapter for the relay board?
Also: The expo is open 5 days a week for the next 3 months. What would be best?
Leaving Bela run all the time, or unplug the power after every day?
Floris Also: The expo is open 5 days a week for the next 3 months. What would be best?
Leaving Bela run all the time, or unplug the power after every day?
heat won't be a problem, so it could stay on the whole time. It's up to you, really ... considering you have a lot of high voltage stuff in a DIY case maybe it's best not to leave the power circuitry on while unsupervised ...
Floris This is without dimmer, but with relays.
are you driving the relays directly from Bela's gpios? What are the current requirements for those inputs? Bela's GPIO don't provide more than 6 mA, which could explain this intermittent misbehaviour ... you may need to interpose a transistor.
The relay board is directly connected to Bela
here's the specs
Supply voltage: 5V DC
Signal voltage: 3.3-5V
Current per relay (when enabled): ~70mA
Signal current ("IN" pins): ~5mA
Floris Signal current ("IN" pins): ~5mA
That should be fine ... is that the peak current ( when the relay switches) or the current needed to keep it in the on state after it's turned on? It may well be that there are transistors on board already...