Connecting the Spectrum to the maker community

Hello everyone!!

Since you guys were talking about open source firmware, I wanted to shed some light on alternative ways to connect the Spectrum to the creative people out there like e.g. the maker community. Namely, by allowing automatic control of the Spectrum, to control features which are already controllable through the on-screen menu anyway, but allow to do it through a port or an API.

The maker community might seem like a niche, but all the gadgets and tools that will be created around the Spectrum will be potentially available to the people outside of the maker community, which in turn increases the value of the Spectrum for all community members who want customizations. The Spectrum might even be used as a teaching tool. It’s a win-win for everyone, and it would make the Spectrum a very unique community oriented product, which nicely integrates with the common theme here I think :thinking:.

Let’s start with the “Why”. Possible use cases. Projects that might use this port are for example all sorts of macro keyboard functions to switch modes with a single press of a button, for example:

  • To switch picture-in-picture modes and position, allowing you to quickly check another video source while in game. Or to move the inner picture out-of-the-way.
  • To quickly switch between two PCs you might have plugged into the Spectrum, similar to a KVM switch, without having reach for the monitor every time.
  • To switch the scaling algorithm for low-resolution video input, or turn off scaling entirely to see how something looks like from afar. (Useful for developers)

Some non macro-keyboard related project ideas:

  • Adjusting the brightness and tint of the screen based on the lighting in the room. (like Apple’s “True Tone”)
  • Shutting down the Spectrum into standby and waking it up again based on events like whether you’re sitting in front of your PC.
  • Creating a wake-up alarm where the monitor turns on in the morning to wake you up softly.
  • Automatically switching interpolation modes to linear when you’re watching a movie.

These are all potential features that the community potentially gets for free, if such a port existed.

Let’s talk about “How” such a port might be implemented. Here are some thoughts:

  1. An honorable mention is a UART/SPI/I2C port. They might be industry standards but they expose the spectrum to external voltages and electrostatic discharges (ESD) that might fry the electronics of the spectrum. Not a good idea to expose something like this to the maker community on an expensive device like the Spectrum, it’s basically an accident waiting for a place to happen. UNLESS you add some galvanic separation into the port, which in turn will increase the production cost of the spectrum, considering it’s a feature that most people won’t use anyway.

  2. API support. Offer a .dll exposing an API which allows us to control the firmware from our PC. The good thing is it’s an all-software solution. The bad thing is, the manufacturer will have to integrate the API into the drivers for at least windows and linux for this to be worth it… and the API will always be restricted to the operating system for which such drivers were implemented. This is a LOT more work (read: cost) than the feature is worth.

And why should the ability to control the Spectrum depend on the operating system anyway? Your on-screen display is independent of the operating system, and so should be this. Also, if the firmware goes open-source, this option might actually be implemented at some point by the community. Moving on.

  1. Infrared port. Solves both of the above problems and then some. An infrared diode does not require an electrical connection to third party electronics, so there is no danger. And it does not depend on the operating system you have installed on your PC. It just works, it’s cheap, and easy to control even by an Arduino if the protocol is slow and easy to understand. (E.g. UART over infrared + a long checksum to filter out the noise. Implementing that in firmware should be child’s play for Spectrum’s manufacturer.)

The additional production cost is ridiculously low, the infrared diode and the few extra components are as cheap as is the hole in the housing to let the light through to the diode. And the documentation doesn’t need to be long to be understandable. Sounds perfect.

Let’s get the placement of the diode out of the way. There’s the option to place the diode in the back, or in the front.
infrared-explanation2
The only reason why I mention the front is the maker community might be able to create all sorts of remotes for the Spectrum. But the front diode will also need to be tested in the QA stage of production of the Spectrum. This just unnecessarily complicates things, so unless you are actually planning to release your own remote, let’s keep it simple. Also, that community is resourceful enough and will be able to create a remote extension if they need it, regardless of where you place the port.

In the back, the diode can be directly placed on the mainboard at no additional cost. The good thing about the back is that you don’t need to cut the plastic and to cover it with a transparent shield. It can be literally just a hole in the metal where the diode will be looking out from, right next to one of the other ports. This way, the community can attach extensions to the Spectrum without these extensions being an eye-sore (DIY, afterall), hidden behind the device.

This resulting feature is easy to test in the QA stage of your production pipeline. All the manufacturer has to test is that the signal reaches the processor. You don’t even need to insert any connectors since it’s infrared, all you have to do is place an infrared LED in the correct position on your test stand and the test should be done in less than a second.

Implementing this feature in the firmware should also be very easy, since most of what needs to be implemented should already have been implemented. Conceptually speaking:
IR port additional software component

Disclaimer:
I’m not pushing for this feature, especially at this late stage in the game. I want my Spectrum to ship on time :kissing_heart:. This might be something for the Spectrum v2. I don’t know. I was just always wondering… if this is so easy to do, why hasn’t anyone done it? Simply to boost the popularity and flexibility of a product? I’m just calling it as I see it. And if there’s one monitor in the whole world that might be interested in having this sort of community oriented feature, it might be a community driven monitor like the Spectrum.

8 Likes

I would suggest using USB. USB is now commonly supported on a lot of MCUs so it shouldn’t be that much more difficult. USB CDC can be used as UART or SPI replacement. No extra ports need to be added and the ports should already be ESD and OC protected. It also prevents having to worry about different voltage levels.

There will already be USB ports on the monitor. Would it be possible to have a “smart USB hub” that exposes some functionality over additional USB profiles to the host? This would already make the “Macro” style features easy to implement.

To support the other functionality, the USB HUB could act as the USB host for certain devices. This could be e.g a MCU with USB interface and light sensor for brightness control. EVE could release some example code for e.g the Teensy to get people started quicker.

I would also really like to get access to the USB PD protocol of the USB C charger. One of the thing I would like to look into is using it to charge a PD battery pack and exposing the charge state to a USB host using e.g a USB UPS HID. This would allow Windows to monitor and display the charge state of the battery pack.

2 Likes

USB is an interesting idea… if it’s possible using the existing hardware, might be worth pitching to the manufacturer. Then we might get this feature on the current Spectrum already! Or if the firmware goes open-source, we might be able to figure out how to add this feature ourselves.

On the other hand, if the hardware of the Spectrum would have to be modified to support what you’re saying, or for the Spectrum v2, then it would be much better to just add that one diode instead. The infrared diode is not only cheaper, but also lowers the learning curve for hobby developers by a gigantic amount.

It’s true that MCUs exist with a USB client built-in. It’s true that example code exists. But it’s not something an entry level hobbyists have fun trying to figure out. (I mean, before their frustration levels overwhelm them and they decide that it’s too complicated, it’s painful to watch). Examples are not really satisfying because people like to understand what’s going on, and not just copy paste code and hope it works. At the beginner level, the USB stack is waaay over their head. Some versions of the RaspberryPi don’t even have a USB device/client interface, they only have USB hosts. It’s not fun explaining to them why they can’t connect their favorite Pi to the Spectrum. USB doesn’t make the Spectrum feel friendly. And some people have a (justified) phobia connecting anything DIY to normal electronics, which will go double for such an expensive product like the Spectrum. You can tell them that “the USB is protected” but that won’t work, it’s a matter of feeling, not reason.

Compare that to a IR port: connecting an ATtiny’s UART to an IR diode is an afternoon project, literally. And the port works with any MCU, RaspberryPi, even a simple audio recorder. It’s so simple it’s ridiculous:
image

Additionally, the Spectrum firmware would be much simpler, and therefore less buggy, if DIY stuff is kept out of the consumer-oriented USB part of the code.

4 Likes

If USB / electrical connection is that much of an issue, the IR system could be implemented with an external USB dongle and e.g USB CDC. More advanced users can use USB directly while less experienced people could use the dongle. This could be a custom designed dongle (custom hardware would be required anyway) or an off-the-shelf USB IrDA dongle. Bonus point is that this could even allow the monitor OSD to be controlled using universal remotes. The downside of IR is that it only allows a single direction of communication, so there is no way to get information from the screen.
I understand your argument of not wanting to mess with expensive hardware, but IMO “it’s a matter of feeling, not reason” is not really a strong foundation of engineering, even when it comes to hobbyists.

I don’t know what USB hub is planned to be used, but simple USB hub controller ICs will probably not support any “Host” operation needed to get this to work. I wonder how they are planning to implement the USB port switching on the USB HUB though.

My idea on how to get this to work would be to have 2 internal USB hubs: one of them is connected to a USB host that is the MCU / processor of the screen. When a USB device get’s connected, the internal USB host checks if it is a “spectrum compatible” device, e.g based on VID/PID or some special device descriptor. If it is not a “Spectrum compatible” device the device get’s disconnected from the “internal USB hub” and connected to the second USB hub where the PC is the host. The screen would also be connected as device on the second USB hub to allow the PC to control monitor settings over USB.

This might all be a bit to complicated though, I’m assuming the electronic design will be outsourced to some company making the actual screen, so I don’t expect this level of control from Eve. Even then, getting this designed, tested and manufactured before Q4 will be tricky, especially if it relies on massive email threads with an external designer XD.

Just having the MCU/processor controlling the on-screen display connected to the USB hub would not be that big of an effort. Having a UART CDC interface to the OSD controller would allow even less experienced programmers to get on board, it would just appear as a COM port e.g ASCII commands could be sent to. Having the firmware of this OSD controller open-source would allow for more advanced USB functionality to be added (e.g HID) and for allowing more advanced screen quality / refresh settings tuning the likes of @BlurBusters might be interested in.

3 Likes

Don’t get me wrong, if the Spectrum implements support for an off-the shelf USB-to-UART plug&play converter for that exact same negligible price increase (as an IR diode) and implements a properly unit-tested two way protocol, this would be a dream. If not, and you said it yourself, this might get complicated, then I wonder whether EVE will even deem this worth it, for a feature that is not even part of the core feature set of the product… I have the feeling that most of the community here would rather chose the cheaper price tag. A delayed shipping date would also be not cool, especially for this kind of secondary feature. At the end of the year, I would rather get an IR diode port than nothing :wink: hence I want EVE to have these options to chose from.

And anyway, since when did “simplicity” stop being a sound engineering practice? :nerd_face:

Learning is what the hobby community is all about. Feeling is a strong foundation for learning because learning begins with awe and enthusiasm. Enthusiasm begins when you see the four steps depicted above in a YouTube video and tell yourself “Really? That’s all I have to do? Even I could do this without messing up, I’m sure”. :laughing:

3 Likes

Would it be possible to integrate the monitor with Alexa/Google Home, I´m thinking crazy ideas right now like:

  • Alexa, turn on/off my monitor!
  • Alexa, make my monitor “Warmer” / “Colder”.
  • Hey Google, change my monitor input to DP2.
  • Hey Google, make my monitor experience great again! :wink:

Seriously, maybe there are some functions that could be controlled simply by voice.

Please, no. It’s difficult enough to make Google home set a timer.

I’m a real beginner in the maker community and if it’s not possible without code I generally don’t touch it since I can’t wrap my head around the fundamentals of how code is being interpreted… Which is weird since I’m not a bad coder, but when it comes to coding on an Arduino my mind just blocks since I want to know the entire way on how code goes from A to B and all the translations along the line. This is also the reason I haven’t touched any ARGB strips.

BUT I would love the idea to implement user made add-ons to the Spectrum monitors. Automatic brightness/colortone adjustment based on the ambient light, time of day or even the weather would be amazing. If we’re able to add communication with an Arduino or Raspberry Pi it’s possible to add voice commands as well. Maybe even by using the hardware on the connected PC? My mind is starting to meld again.

Anyway: I’m not the one who has the contact with our manufacturers for these kinds of stuff, but I do support it and would love it it’s possible in some way.

Btw, if an API would be provided, we could essentially just connect an arduino or pi to any of the USB ports (of the Spectrum or the PC) and use those as the connection for Spectrum right? Like you said it will be OS depended but if Linux is supported any Pi could do it right?

I’m a beginner like I said :stuck_out_tongue:

2 Likes

Not exactly, traditionally a monitor API would allow us to control the monitor through the video cable, e.g. HDMI. If your Spectrum is connected as RaspberryPi’s monitor, this should be possible.

A few days ago this post revealed to me that a monitor standard API already exists, and it even worked on one of my monitors:

A standard API would probably lack the ability to control some more Spectrum specific functions like e.g. (I’m guessing) control over the up-scaling algorithm, control over backlight strobing, but it’s better than nothing.

An Arduino is sadly out of the question here, it’s a micro-controller so it doesn’t support video or even any traditional linux distro, so it wouldn’t have access to the linux driver or API. Even though in principle, it’s much better suited for this task because a RaspberryPi is really overkill for this task on all fronts: cost, power-consumption, computational-power, mechanical sensitivity, longevity, time it takes to setup or understand what’s going on. I would prefer not to use a raspberry to do something as trivial as adjust colortone of my Spectrum. As the saying goes: “to crack a walnut with a sledgehammer” :smile: . With in IR port, a DIY colortone adjustment extension can be built for a couple of bucks based on an ATtiny85.

1 Like

I think you misunderstood me a bit, or I misunderstood you :stuck_out_tongue:

But if I have my PC connected to my Spectrum, the USB ports on the back are linked to my computer. So I could use the Arduino to read out sensor data and report back to my computer. Then the computer could read it out back to the Spectrum.

Essentially you could do the same with the Pi. But understand the issues with that a bit better now, since it won’t be the Pi driving the screen but the computer and the hub probably won’t be able to be split in groups unless we physically split it in USB hubs… right?

2 Likes

LULW, I have ARGB strop at Home, i ordered a ARGB led circle and I programmated it. I also made same effects like breathing…
Do not forget to check spectrum unveiled, I had some question there, and also there is some poll. Looks like people want bloxy stand

Oh you mean the Arduino would be just filling the role of a DIY sensor for the PC in this scenario. Yep, this would work.

image

I don’t know… But somehow I doubt USB is a feasible alternative to a much simpler API/DDC support which already covers most of the use-cases for the Spectrum. By “most of the use-cases” I mean that the Spectrum’s primary intention is to be used for gaming. One could argue that most of the time, a PC will be standing next to a Spectrum anyway, offering access to the API/DDC, so why avoid the PC?

image

1 Like

There will be a lot of people that will use Spectrum for stuff other then gaming. As well as people with laptops and 2-in-1’s who just connect the USB-C. For those it would benificial if it would just be added to the spectrum itself, in one way or another.

I have absolutely no clue how to send information over via IR tbh, so no clue how we would program it

2 Likes

A standard API would probably lack the ability to control some more Spectrum specific functions like e.g. (I’m guessing) control over the up-scaling algorithm, control over backlight strobing, but it’s better than nothing.

Correct, what i was trying to suggest is the use of desktop software is possible and can be done at least as step 1 via the DDC, and then update the firmware to allow open access via USB or similar methods and control via custom eve software to allow access to all functions, or implement just DDC as user interface, and allow the more advanced settings via firmware updating/patching :slight_smile:

3 Likes

I’m assuming USB-C supports DDC aswell.

IR is no different from serial communication. You got the basics down if you can send+receive a couple of bytes using a serial port, AVR-AVR or AVR-PC (google UART or RS232 if you haven’t done this before). Now just plug in an IR diode as output and voila, the LED is blinking extremely fast, which LEDs can do, and transmitting the signal wirelessly. Don’t worry I will add a tutorial with tested AVR code to this forum if Spectrum ever adds an IR port.

@NikolaSivkov yeah that sounds great. :slight_smile:

3 Likes