What is good UI for frequency of a generator? I have pots, encoders and buttons. - Page 1
Forum section: electronics / projects

author: dusan
author_rank: Regular Contributor
timestamp: January 19, 2023, 07:28:26 pm
content: I want to build my first square wave generator, nothing fancy, arduino or stm32 blue pill, one level up from blinking demo, 0-99kHz. What is best user interface for setting frequency?- single pot- two pots (coarse and fine)- multiturn pot- pot for each decimal place (5 pots)- two buttons (+1, -1)- +/- buttons for each digit (99999 has 5 digits so 10 buttons)- single encoder- two encoders (coarse and fine)- 1 encoder for each digit (5 encoders)- something else?

author: themadhippy
author_rank: Super Contributor
timestamp: January 19, 2023, 07:37:56 pm
content: my preferred method is a pot for frequency and a switch for range

author: ataradov
author_rank: Super Contributor
timestamp: January 19, 2023, 07:51:28 pm
content: My prefferred UI for setting values with really wide ranges like frequencies is the following. 4 buttons for navigation (up/down/left/right). Left/right select the current digit and up/down increment decrement the value. If the digit goes off range then the value to the left of the cursor changes.So, you have good control over which order of magnitude you want to change and you have control over the whole range past that order of magnitude. The same muscle memory applies to adjustments in 1 Hz increment and in 1 MHz increments. And ability to directly select the digit lets you quickly dial in the initial value.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 19, 2023, 08:01:37 pm
content: Agreed, it''s a lot more effective than rotary encoders. But obviously rotary encoders are more flexible.

author: schmitt trigger
author_rank: Super Contributor
timestamp: January 19, 2023, 08:32:10 pm
content: My personal preference is to have my fingers rotate a button while making an adjustment of any parameters.In the past this meant a potentiometer. However good quality potentiometers are becoming expensive, thus nowadays I would suggest an encoder.But the nice thing about microcontrollers is that your could also do a hybrid, with encoders and push buttons for instance.

author: RoGeorge
author_rank: Super Contributor
timestamp: January 20, 2023, 04:07:07 pm
content: Rigol DG4000 series AWG has buttons to type the frequency number, and yet a few buttons, very useful, for 'Hz', 'kHz', 'MHz'. Pressing the units act as an Enter. Has a rotary encoder, too, but I find the encoder rather annoying in practice.If I were to make an audio generator, I'll probably go for two potentiometers, coarse + fine.As a second option, I might try buttons for digits and 2-3 more buttons 'Hz', 'kHz' as enter.Whatever you will choose, try to have direct access to anything you need. There's nothing more annoying than digging through menus and submenus. Also, don't add unnecessary elements, like unwanted display animations or who knows what other glitter. Unnecessary elements might seem fun or impressing at first, but they will grow old fast and turn into annoyances.

author: dusan
author_rank: Regular Contributor
timestamp: January 23, 2023, 03:07:47 pm
content: I've tested 2 pots (fine and coarse) but it was too hard to use so I went for 5 encoders for frequency, one pot for pulse width and one pot for amplitude.

author: pqass
author_rank: Super Contributor
timestamp: January 23, 2023, 03:54:52 pm
content: You could go with just one encoder that changes the frequency by 10s/100s/1000s when rotated quickly enough and by single hz when rotated slowly. You'll need a display for feedback though. My HP 'scope does this. And that's how I implemented the temperature adjustment on my DIY soldering station.

author: TimFox
author_rank: Super Contributor
timestamp: January 23, 2023, 05:53:33 pm
content: Quote from: ataradov on January 19, 2023, 07:51:28 pmMy favorite UI for varying frequency uses the four buttons described above and a rotary encoder to increment/decrement the digit selected (along with the digit to its left as described) as well as the up/down button.

author: Bud
author_rank: Super Contributor
timestamp: January 23, 2023, 07:10:28 pm
content: A single encoder with a shaft momentary push button. Press the shaft to select a digit position, rotate the encoder to change the value. Simple, fast, convenient.

author: H713
author_rank: Regular Contributor
timestamp: January 27, 2023, 05:31:25 am
content: Well, my favorite way to change device parameters is with big rotary switches. Think 1960s HP or Tektronix equipment.Since people won't accept that now, having a keypad where you enter a number, then buttons for Hz, kHz, MHz, GHz is pretty good. If you then add left/right and up/down buttons for incrementing frequency, it's even better. An encoder is an even better alternative to the up/down buttons.In other words, I just described the HP 3314 and 3325 interface, which is about as good as it gets.If the buttons / switches have a satisfying click and feel, that goes a long way to making the device "feel" nice to use. If it makes a really screechy beep with every button push, that is a huge turn-off and will make people hate it.

author: MarkS
author_rank: Unknown
timestamp: January 27, 2023, 07:00:03 am
content: This is an interesting topic, as I'm thinking about building one myself. What do all of you think about forgoing the manual knobs and switches for a touch screen interface?

author: ataradov
author_rank: Super Contributor
timestamp: January 27, 2023, 07:09:14 am
content: Bad idea, IMO. Touchscreens are tolerable if the UI is extremely well designed. And they are unusable otherwise.Touchscreen is always a compromise. If you don't have enough real estate for the buttons, then you have very few options. But if you can afford the place for physical buttons - always do that.

author: MarkS
author_rank: Unknown
timestamp: January 27, 2023, 07:11:01 am
content: Quote from: ataradov on January 27, 2023, 07:09:14 amFair enough!