Experiments II: Hacking a Citizens Band Radio Transceiver
For this week, I decided to go for another potentiometer experiment. This time, I wanted to mimic the channel knob on a radio, being able to scrub through different sound files using a potentiometer connected to my Arduino Leonardo.
Like the previous experiment, I mapped the potentiometer values to be from 0 to 360. The video above is slightly out of sync with the Arduino footage, but the movement turned out to be very precise and accurate. I also wanted to make sure that if I would go back to a certain channel, it would still be playing without any interruption since the beginning, and this was one of my main priorities. The way I achieved that was by making all sound files play on Awake, but setting their volumes to 0 as well. I then created conditions based on the rotation values of the channel knob.
Very simple. If the rotation (which is set by the potentiometer) is between such and such values, then such sound’s volume will now be 1, else it will just be muted. As I have 5 sound files to be distributed in 360 degrees, I set the sound to change every 72 degrees.
I only ran into one problem during this experiment – a very weird one. My potentiometer goes totally nuts when I use a program like Quicktime Player or ScreenFlow to make a screen recording. That’s why I have this awful handheld footage up there. I just couldn’t make the potentiometer work when one of these programs was running. I tried different computers, and moving anything that could be interfering with the Arduino … but no success. A mystery to be solved.
For my next experiment, I might try to implement my virtual radio, but this time I will make it look more like a CB radio and add more functions to it. I will also start putting potentiometers and other components together so I have a solid controller, instead of having parts spread around here and there.
Still working on removing the parts I want to use from the CB radio. Most of the components are soldered together, and they’re really not that easy to take apart.
Meanwhile, I thought I’d start playing with potentiometers, since they’re actually the main components I’ll be playing with in the CB radio. My goal for this week was to figure out how to they work and how to send their data from Arduino to Unity.
I spent a lot of time trying to figure out how to transfer the potentiometer values to Unity – and this is the miraculous code that made it all work after hours of frustration and time out errors. I mapped the potentiometer values to be from 0 to 360, so it would be ideal for the camera rotation. Then it was just a matter of reading the serial data from the Arduino and parsing it.
Before GDC madness, I started doing more research on CB radios and their cultural impact in the 1970’s. And this past week I’ve continued my research, and spent some time thinking of a concept for a game using the CB radio as a custom controller.
Here is an overview of the wonderful world of CB radios:
The CB slang is something that really caught my attention, and is, in my opinion, one of the things that really define the CB radio culture. At least in the 70’s.
So I went on and started brainstorming possible ideas for games and how I could incorporate a new hardware interface.
This is really me just brainstorming away … But here is my main idea:
In this game, you’re a truck driver in 1970’s USA – the times are difficult as the 1973 oil crisis imposed a nationwide 55mph speed limit, with fuel shortages and rationing widespread in the country. You have just started the job and this is a brand new route for you, one you never drove through. Your only hope to successfuly deliver your goods in time is your CB radio. Listen to the different channels to avoid the police, speed traps, cattle trucks or maybe sleepy drivers, and collect great bonuses that will help you make it to your final destination in one piece and on time.
I went a little crazy with the brainstorming, even imagining the possibility of a multiplayer version, where you are competing or cooperating with another player to bring a convoy of trucks to their final destination.
However, for the purposes of my class, I need to focus on prototyping the basic interactions and really get the essence and feel for the physical controller I am about to build. This could be the beginning of something great, but for now it’s important to scope realistically and really break down the system to its smallest parts.
On another note, during this research period, I also managed to completely take the CB radio apart with the help of a friend, who taught me quite a bit about breaking apart a radio in a non-destructive way. Kind of.
So next step is to start the experiments with Arduino and the existing radio components …!
I leave you with a song by C.W McCall, an ode to the CB radio golden era.
I am just back from the Pasadena City College Flea Market where I finally found something to play with for this class – a Citizens Band Radio Transceiver!
Not that I knew what it was when I bought it. Anyway.
This particular one seems to be from the 1970’s.
Check out this page from a 1976 Popular Science issue. Oh the glory days for CB transceivers!
I have been doing a lot of research and constantly changing my mind about the type of object I wanted to repurpose and turn into a new interface. I am certainly not an electrical engineer, so my goal was to stay humble and make my life easier.
After bargaining, I managed to get this transceiver for $15, which is a decent price and even cheaper than some of the similar ones I found on eBay. Considering that I am going to (potentially break it) and completely take it apart, it made sense to look for the cheapest, and most useful set-up.
What attracted me about this one was … first of all, the straight-forward knobs and switches, as well as the enclosing case. I think this transceiver has a great set-up for interactivity. There’s even a space in the middle to place a LCD screen, which is great. I particularly like the microphone cable coming out from the front – I could build another component to connect to the Arduino inside, and maybe turn the microphone itself into a speaker? So many creative possibilities! I also like that the top is plain – there’s plenty of space to do something with it, maybe with LED lights and, who knows, a connecting screen that receives input from everything else.
So … I came home and opened up the enclosing case, just to have an idea of how capable I was to do the disassembly on my own.
(Click images to enlarge)
Upon seeing all the soldering inside the case , my reaction was something close to this…
I was, however, happy to see that electrical circuits now make a little more sense to me … look, I know these colorful resistors!
I was tempted to force my way through all this beautiful circuit mess, but upon looking closer at all the wires and components, I realized some of those were actually in pretty good shape. I’m very good at breaking things, so I thought the best thing to do would be to bring the transceiver to class on Tuesday, and get some conscious advice on how to dismount the entire thing in a clever, non-distructive way.
Meanwhile, I am ordering a soldering iron kit, which I’m sure I’ll be needing in the near future.