# Vintage tv conversion

**URL:** <https://forum.arduino.cc/t/vintage-tv-conversion/920037>\
**Category:** Programming\
**Created:** [October 30, 2021, 9:26am UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037 "2021-10-30T09:26:38Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![loggio](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@loggio](https://forum.arduino.cc/u/loggio)\
**Post date:** [October 30, 2021, 9:26am UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/1 "2021-10-30T09:26:38Z")

</div>

Hi guys,

I'm a newb when it comes to arduino.  
Looking for someone to help me out.

I have a 12 position rotary switch that I want to send a SINGLE keypress without repeating when toggled between positions.

Position 1 on rotary switch =  
Send keyboard button number 1 only once without repeat  
Position 2 on rotary switch =  
Send keyboard button number 2 only once without repeat  
Back to position 1 on rotary switch =  
Send keyboard button number 1 only once etc. etc.

Each pin on the rotary switch will connect to a different pin on the arduino

Basically, I need them to act like a momentary rotary dial.

Is this possible?

Does anyone have an example code that I can test?

I appreciate all advice and discussion and thanks in advance!

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [October 30, 2021, 9:30am UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/2 "2021-10-30T09:30:18Z")

</div>

Please, more details of the switch. Does it have only one wafer (set of contacts)? Is it make before break, or break before make, etc.

How about a photo, specification or link to either?

---

<div class="post-metadata">

**Author:** ![loggio](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@loggio](https://forum.arduino.cc/u/loggio)\
**Post date:** [October 30, 2021, 9:37am UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/3 "2021-10-30T09:37:52Z")

</div>

Hey there

Please see ebay link for info:

> **[3 PACK - 1 Pole 2-12 Position PCB Mount Rotary Switch | eBay](https://www.ebay.com.au/itm/3-PACK-1-Pole-2-12-Position-PCB-Mount-Rotary-Switch-/393395795029?mkcid=16&mkevt=1&_trksid=p2349624.m46890.l49286&mkrid=705-154756-20017-0)**
>
> Note: This rotary switch is not compatible with H6020, H6022, H6024, H6028 and H6030 knobs. Shaft Shape: Round with knob location flat. Shaft Length: 30mm.

---

<div class="post-metadata">

**Author:** ![killzone\_kid](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/killzone_kid/32/1098074_2.png) [@killzone\_kid](https://forum.arduino.cc/u/killzone_kid)\
**Post date:** [October 30, 2021, 9:50am UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/4 "2021-10-30T09:50:40Z")

</div>

Why not use rotary encoder and send selected position value on encoder button push?

---

<div class="post-metadata">

**Author:** ![loggio](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@loggio](https://forum.arduino.cc/u/loggio)\
**Post date:** [October 30, 2021, 9:56am UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/5 "2021-10-30T09:56:10Z")

</div>

Just trying to use materials that I have.

I'm convering an old vintage crt tv into a modern tv set with lcd and kodi as interface.

I want to convert the UHF / VHF channels dials into keystrokes that will input numpad keystrokes 1 to 9 that will change channels in kodi.

---

<div class="post-metadata">

**Author:** ![killzone\_kid](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/killzone_kid/32/1098074_2.png) [@killzone\_kid](https://forum.arduino.cc/u/killzone_kid)\
**Post date:** [October 30, 2021, 10:06am UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/6 "2021-10-30T10:06:07Z")

</div>

gotcha!

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [October 30, 2021, 10:22am UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/7 "2021-10-30T10:22:06Z")

</div>

I would not run 12 lines to the MCU. I would have the MCU drive a 1:n decoder with all the outputs connected to the contacts 1-12, and the common return to an input pin. That would be 5 pins in total. Or a shift register, total 3 pins.

The older CB radios had digital encoders built in to the switch - just a 4 pole N position switch with each pole wired to yield one bit. For example  
pole 1 - 0,1,0,1  
pole 2 - 1,1, 0, 0  
...

For clues about how to detect and process key events, see the digital example sketches that ship with the IDE.

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [October 30, 2021, 2:28pm UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/8 "2021-10-30T14:28:37Z")

</div>

> [@loggio](#):
>
> I have a 12 position rotary switch that I want to send a SINGLE keypress without repeating when toggled between positions.

When the switch is moved from position to position, the space between positions means there is NO connection. Your coding must allow for that. Similar to "debounce" on a push button switch.  
Paul

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [October 30, 2021, 2:37pm UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/9 "2021-10-30T14:37:06Z")

</div>

Do you have the switch yet? Probably, there are better switch configurations for this purpose...

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [October 30, 2021, 3:22pm UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/10 "2021-10-30T15:22:12Z")

</div>

Hi,

> [@Paul\_KD7HB](#):
>
> When the switch is moved from position to position, the space between positions means there is NO connection. Your coding must allow for that. Similar to "debounce" on a push button switch.  
> Paul

These "programmable" rotary switches come as "break before make" or "make before break".  
You need to check.

 ![s-l1600t](https://europe1.discourse-cdn.com/arduino/original/4X/0/2/f/02fc793609d7c851d5b58df7b217498c04f4a6a4.jpeg)  
In my experience that brand/type are "make before break" unless specified, so when you switch two adjacent poles will be connected as the switch is rotated from one position to the next.

Tom... 😀 👍 ☕ 🇦🇺

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [October 30, 2021, 3:26pm UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/11 "2021-10-30T15:26:10Z")

</div>

Hi,  
One solution is the 12position switch to select the function and a single press button to activate it.

If you don't want to use 12 I/O pins, have the rotary switch address a diode matrix that output 0 or 1 to 11 or 12 in binary. Thats 4 bits, 4 I/O.

Just my 20cents worth....Tom.... 😀 👍 ☕ 🇦🇺

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [October 30, 2021, 3:45pm UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/12 "2021-10-30T15:45:55Z")

</div>

I think I might connect 11x 1K resistors to the switch and use an analog input to detect the position. Effectively you are turning the switch into a pot, but one with only 12 positions. You might be able to solder the resistors directly to the back of the switch, with only 5V (3.3V?), GND and a wire to the analog pin going back to the Arduino.

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [October 30, 2021, 3:49pm UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/13 "2021-10-30T15:49:22Z")

</div>

Bingo! We have a winner!

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [October 30, 2021, 3:50pm UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/14 "2021-10-30T15:50:27Z")

</div>

> [@TomGeorge](#):
>
> have the rotary switch address a diode matrix that output 0 or 1 to 11 or 12 in binary. Thats 4 bits, 4 I/O

I was going to suggest a priority encoder IC, but it only has 9 inputs.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 28, 2022, 3:51pm UTC](https://forum.arduino.cc/t/vintage-tv-conversion/920037/15 "2022-04-28T15:51:14Z")

</div>

Closed on April 28, 2022, 3:51pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
