Does anyone here know about the process of building circuits for wireless RF controllers? I’ve seen a few projects online, but they always seem to be “under construction”- maybe some bugs haven’t been worked out or the controllers just aren’t reliable yet.
It seems like you just need to build the transmitter circuit in the controller and again in a receiver, but the hard part is writing some code that will actually transmit gamepad data reliably.
Why does it have to be RF? Do you want to interface with an existing host or do you just need to send the control commands wirelessly?
I suggest moving to either 435 MHz or 868 MHz (frequently used in home automation) as sender and receiver units are available and they don’t need to regulatory approval.
However, if you just want wireless transmission, look into Bluetooth or Bluetooth Low-Energy (BLE). Chips and pre-made boards are available, less knowledge is required and when transmitting an HID-compliant profile, you don’t need to write a PC driver.
cYa,
Tauwasser
Oh no, doesn’t have to be RF…I guess I assumed that was the only other option haha. Bluetooth would be great too…but some of what you say is over my head. I’ve seen Bluetooth controller kits on Adafruit, they seem fairly straightforward- is this the kind of thing you’re referring to? It sounds like you just connect each button/signal to a pad on the transmitter and wire the receiver correspondingly.
In short, what would be the start-to-finish steps for making such a wireless controller for the…SNES? (Just the wireless circuits, I can figure out the physical modding of stuff :p)
I think Tauwasser’s idea to use the ISM-band radio modules makes the most sense for use on an actual SNES (or VB). AFAIK, there are no cheap BT host modules you can use for the receiving end. BT would be good if you want to play an emulator on a PC or smartphone with an original (but wireless) controller, though.
BTW, Tauwasser, why did you ask “why does it have to be RF?”, and then only offer RF-based solutions? I thought you were going to say something about IR, which is what I’d use if I wanted to make a wireless VB controller, since the distance is short and the line-of-sight angles are already sorta restricted.
As with the RF modules, you’ll need a microcontroller to read the buttons on the transmitter side, and one on the receiver side emulating a shift-register. The two can talk via the aforementioned RF modules, IR light, or even sound if you use ultrasonic transducers (but it might interfere with your Power Glove ;-))
For IR, the transmitter just needs a transistor to blink one or more LEDs at the right rate. Actually, I would use two set up like an AND gate. One input would be the 38KHz (or whatever) carrier generated by one microcontroller pin, and the other would be the actual data coming from another pin.
The receiver is even easier, since you can just use one of those IR receivers they put in consumer electronics (which can be had for pennies or even free if you can scrounge) to demodulate the IR back into a stream of data.
No matter what medium you use, this sounds like a very fun project!
- This reply was modified 9 years ago by RunnerPack.
- This reply was modified 9 years ago by RunnerPack.
RunnerPack wrote:
BTW, Tauwasser, why did you ask “why does it have to be RF?”, and then only offer RF-based solutions?
Sorry, I was making a distinction between RF as in home-automation, where you define the protocol yourself and BT with HID, where the protocol is fixed. I should have been more clear about that.
RunnerPack wrote:
I think Tauwasser’s idea to use the ISM-band radio modules makes the most sense for use on an actual SNES (or VB). AFAIK, there are no cheap BT host modules you can use for the receiving end.
It depends on what you mean by cheap. I’ve used WT12 chips by bluegiga to host the Wiimote before. While it’s true that it doesn’t have an HID host mode, there is very little decoding to do in software, meaning you can just connect using L2CAP. That’s ~30 EUR.
The iWrap stack is documented, but the documentation is a bit wonky in terms of optional arguments, argument lengths or expected formats — but workable. Bluegiga even have their own way of reading/writing GPIOs of the modules.
The WT12 is a bit old and not BLE, but you get the point. Look at the various standard profiles, particularly HID.
For prototyping, you might want to get a breakout board for some device with the right profiles, play around a bit and get it working initially. Also, aren’t there already bluetooth SNES pads available? If so, it might be easier to use one of those and only implement the BT2SNES controller bridge.
As for the actual implementation, you’ll need to know the data format the SNES uses. I think one of your previous forums posts even covered this. Then, choose a microcontroller and have it act like a shift register, i.e. SPI slave.
Bluetooth chips can usually be controlled via UART text commands from the microcontroller. So have a UART connection, a button for pairing and the proper mating connector for the SNES pad and you should get something off the ground.
It might be worth looking into one of the bluetooth SoC solutions out there, possibly saving some components/work, because the SoC would replace the microcontroller and dedicated bluetooth chip.
RunnerPack wrote:For IR, the transmitter just needs a transistor to blink one or more LEDs at the right rate. Actually, I would use two set up like an AND gate. One input would be the 38KHz (or whatever) carrier generated by one microcontroller pin, and the other would be the actual data coming from another pin.
The receiver is even easier, since you can just use one of those IR receivers they put in consumer electronics (which can be had for pennies or even free if you can scrounge) to demodulate the IR back into a stream of data.
No matter what medium you use, this sounds like a very fun project!
Well, and you need analog filters, probably simulate them, and you have the usual IR problems, i.e. lost button presses, noisy environment, other IR sources screwing you, etc.
I’m not saying it’s impossible, but it’s definitely more involved, because you need to know your stuff, the various encoding schemes etc.
cYa,
Tauwasser
A lot of that is still over my head haha. I should do more reading on the subject of Bluetooth setups because it sounds like kits for making your own controllers are fairly straightforward.
I wouldn’t be opposed to IR if it was far easier to set up for someone like me. Lots of forum people online seem to trash IR controllers from the 90s, usually referring to “line of sight” woes. Honestly, I’ve been buying a bunch of them lately and don’t see what the big deal is.
So far I have Doc’s brand wireless controllers for 3DO and Genesis, Naki and official Sega for Saturn, with some Vision brand ones on the way for SNES. The sets I have so far all work, and work very well. No lag, no missed button presses, good range, etc. People over-dramatize the line of sight factor like you literally have to point the IR beam directly at the receiver at all times. As long as there’s open space between my controller and receiver, I can point it any which way that suits me and it works perfectly. For the Doc’s sets, this even includes pointing them behind me or at the ceiling O_o
Anyway…the point is, some third party ones don’t have the best designs so it would still be nice to build custom wireless sets out of OEM controllers.
Oh and RunnerPack, are you sure IR wireless for Virtual Boy is a good idea? Look at all the complaining people already do with “What? It only has red LEDs??”…next thing you know, they’ll be saying “These guys only made infrared wireless?? Why couldn’t they just make it infra-full color?”
HP Lovethrash wrote:
Oh and RunnerPack, are you sure IR wireless for Virtual Boy is a good idea? Look at all the complaining people already do with “What? It only has red LEDs??”…next thing you know, they’ll be saying “These guys only made infrared wireless?? Why couldn’t they just make it infra-full color?”
LOL!
On the subject of Bluetooth, I found this. It is a BT SoC, like Tauwasser mentioned. I don’t think it can do host mode, but the auction listing claims you can connect two of these modules directly in some kind of “Ad-hoc” mode.
The best part is, being an SoC, it has a microcontroller on-board, plus plenty of I/O lines. If it can be reprogrammed, it could be all you need for both ends of a wireless controller solution.
I haven’t yet found a description of how to replace the default firmware – or even a confirmation or denial that it can be replaced – but it only makes sense that it can be. For one, the auction mentions how much Flash it has on-board (1MB, which is far more than you’d need for a wireless controller). Worst-case scenario: you have to add a $2 ATtiny to each one.
I did find out that the HC-06 module is slave-only, whereas the HC-05 can be master or slave, so be careful which module you get. Also, be sure you don’t get this, as it’s only a carrier board containing no actual radio circuitry.
BTW, another option would be to go WiFi using an ESP8266 module. I know for a fact that the processor can be reprogrammed on those. The 80/160MHz 32-bit processor on-board is waaaay more power than you need, but it’s so cheap, there’s no real reason not to.
Tauwasser wrote:
RunnerPack wrote:For IR, the transmitter just needs a transistor to blink one or more LEDs at the right rate. Actually, I would use two set up like an AND gate. One input would be the 38KHz (or whatever) carrier generated by one microcontroller pin, and the other would be the actual data coming from another pin.
The receiver is even easier, since you can just use one of those IR receivers they put in consumer electronics (which can be had for pennies or even free if you can scrounge) to demodulate the IR back into a stream of data.
No matter what medium you use, this sounds like a very fun project!
Well, and you need analog filters, probably simulate them, and you have the usual IR problems, i.e. lost button presses, noisy environment, other IR sources screwing you, etc.
I’m not saying it’s impossible, but it’s definitely more involved, because you need to know your stuff, the various encoding schemes etc.
Actually, the IR filter is a commodity part, as I mentioned. You just get one of these (or, like I said, scavenge one out of an old DVD player, etc.) and whatever binary signal your 38KHz-modulated IR LED is blinking out will show up on the output pin (although usually inverted, as these are almost always open-collector). It’s simple ASK, just like those 433MHz radio modules, but without all the FCC nonsense.
Yes, you do need some kind of protocol to carry the actual button data, but there are plenty to choose from, or you can make up your own (which is part of the “fun” I mentioned, because I’m an engineering nerd :-P) It’s not even hard to incorporate error-detection/-correction to mitigate the problems you mentioned. Reed–Solomon would be a good choice, for example.
Hmm…I guess it does sound pretty easy when you put it that way. If this is really doable, I’d love to start a list of parts to buy, work on drafting up some circuit designs, and finding a self-professed engineering nerd somewhere to help with the firmware side of things 🙂
Would something simple like the NES be a good place to start? I also haven’t seen a ton of great wireless controllers for that system anyway, just those crummy Akklaim (Acclaim?) IR ones…maybe some fancy RF one that came out a few years ago too, but they’re prohibitively expensive.
Now when you say picking an existing protocol, what exactly “is” that? Hopefully that question gives you an idea of how much I know about this stuff haha. I want to understand it and hopefully make a great project out of it. Maybe the other projects out there just over-complicated the process for me.