Ideas and thoughts about a 2 knob control approach for the PIC oscilloscope

J

Jan Panteltje

Jan 1, 1970
0
But then it would jump to some essentially arbitrary value,
corresponding to the existing angular position of the pot. That would
be very annoying in practise. Imagine shifting, say, the ch1 and ch2
vertical positions a bit. Or changing the timebase. It's hard to
imagine a function that wouldn't be a nightmare in this mode.

So what you are saying is that I should remove the end stop in the pots...
or have a motor set the pot to the right position for each item.

I think I see your objection now, will think about this a bit, till then
one will have to re-set a selected item the first time it is selected and
used.

So if you come from _whatever_, and then go to ch2_gain, and ch2_gain was 100mV/div,
then turning the know will jump to whatever the pot was pointing at (maybe 1V/dev),
and if you selected it because you wanted to go to 20mV, then you will have to simply
have to use those finger muscles a bit more :) and watch the screen what it says.

Not so bad.
 
J

Jan Panteltje

Jan 1, 1970
0
Our new Keithley 2100 DVMs are nightmares. The default setup is almost
unusable, the menus to change things are incredibly obtuse, and the
settings *can't be saved*. I never turn mine off.

All my settings are saved in EEPROM!
:)
 
J

Jan Panteltje

Jan 1, 1970
0
You should test it yourself. I have used a one-knob control of some
AES3/SDI encoder at a clients site and for some people it is very difficult
to use and I don't like it, because it is too slow: you have to skip
serially through many menu items and it has a deep hierarchy (the knob is
pressable to enter a menu branch and to select a setting), which doesn't
help to make it easier.

Yes, but I have no menus, just a list of settings at the bottom of the screen
that you can select.

I think the best is a touch screen, because after some time you know the
images and positions of the virtual buttons and you can touch the right
positions very fast (like I can do it with the railway ticket machine).

OK, but this LCD I already have planned, and touch screen is much more expensive
I suppose (have not used those).

Or simulate a touch screen: Show some buttons on the screen and mount some
real buttons to the side of the screen. Then you can change the meaning of
the buttons, like implemented in my Tek and like I've seen for some Agilent
scopes.

Like those bank tellers, where you press 100 Euro or 200 Euro, and the text
is next to the buttons on the side.
But I want no buttons, unless they come from a Logitech mouse, buttons go duff
here in a few days :)

But don't forget to add some dedicated buttons for functions you need
often, like run/stop, single seq. etc. It would be very unusable to use a
scope with only two potentiometers and every time I need start/stop I have
to turn two knobs. So, please cheat, and use an IO expander :) Or even
better: use a PIC like the PIC18F252, which has 25 IOs and you can get it
for §7.68 for single units at Digikey, which is only twice as much as the
PIC16F690, but you'll get more than twice as much performance, flash, RAM
etc.

Yea, but then why not a fast ARM..... or better some FPGA, maye I will
do one with FPGA too anyways, just cannot stand Xilinx webpack,
that soft is worse then the 'Silversoft C compiler' for the Sinclair Timex.
That could compile exactly 3 instructions, and none of the code I ever
tried with it did run.
 
J

Jan Panteltje

Jan 1, 1970
0
Hi Jan,

I would like to know, how will these two controls will handle the three
channels you have on the left.

I did explain that.

Adding an extra PIC to handle the user interface seems like a simple and
modifiable solution.

I did consider that, but just wanted the challange of doing it with one.


Those are nice encoders, but I see no advantage over pots,
especially as it needs more inputs then just one analog line per control.
 
D

donald

Jan 1, 1970
0
Jan said:
I did explain that.

I guess I need a little more information.

If one pot1 selects the X position on the display, the (..) on your graphic.
What will the other pot do ??

Lets say the pot2 selects the Y position of the currently selected column.

If the X pot is sitting on the first position on the screen.
P2 is rotated fully CW.

When p1 is moved to another position, p2 is now fully CW and this new X
position will change.

This is the part I don't get.
Absolute positions on the pots seems like a poor design.

I just don't get how the positions of each pot will convey enough
information to the selection process.

Thanks for you time.

doanld
 
F

Frank Buss

Jan 1, 1970
0
Jan said:
OK, but this LCD I already have planned, and touch screen is much more expensive
I suppose (have not used those).

"Expensive" depends on how much you want to pay :) There are 128x64
displays with touch screen for $39.95, including a display controller with
integrated display RAM:

http://www.sparkfun.com/commerce/product_info.php?products_id=257
Like those bank tellers, where you press 100 Euro or 200 Euro, and the text
is next to the buttons on the side.
But I want no buttons, unless they come from a Logitech mouse, buttons go duff
here in a few days :)

Then use some high quality buttons. Maybe use a mouse, should be possible
to access it with 2 pins of your PIC. There was an interesting thread some
time ago about mounting a cheap mouse upside-down and use the ball or just
the two axes, which would be more stable than a potentiometer, or an
optical mouse and use a small slat, mounted moveable over the camera.
Yea, but then why not a fast ARM..... or better some FPGA, maye I will
do one with FPGA too anyways, just cannot stand Xilinx webpack,
that soft is worse then the 'Silversoft C compiler' for the Sinclair Timex.
That could compile exactly 3 instructions, and none of the code I ever
tried with it did run.

Yes, a FPGA would be the best for a scope. Like I've started to build for
the opposite function, a signal generator:

http://www.frank-buss.de/SignalGenerator/
 
J

Jan Panteltje

Jan 1, 1970
0
I guess I need a little more information.

If one pot1 selects the X position on the display, the (..) on your graphic.
What will the other pot do ??

Lets say the pot2 selects the Y position of the currently selected column.

If the X pot is sitting on the first position on the screen.
P2 is rotated fully CW.

When p1 is moved to another position, p2 is now fully CW and this new X
position will change.

No, it will not.
It will only change when you turn P2 away from its current position
(any direction).
Just moving P1 (and selecting all items ) does not change any item.

The only limitation is that if you _do_ turn P2 on an item, then you will
have to set the correct value again.
 
J

Jan Panteltje

Jan 1, 1970
0
"Expensive" depends on how much you want to pay :) There are 128x64
displays with touch screen for $39.95, including a display controller with
integrated display RAM:

http://www.sparkfun.com/commerce/product_info.php?products_id=257

Yes that is nice, I use this one:
http://www.voti.nl/winkel/catalog.html?LCD-19
It now also shows some other oscilloscope project with that display and PIC.

15 Euro, that makes 22$ 10 cent
Yes that display you mention is worth considering, add 25$ shipping from teh US,
last time I also had to pay the customs... say 50 Euro?

Yes, a FPGA would be the best for a scope. Like I've started to build for
the opposite function, a signal generator:

http://www.frank-buss.de/SignalGenerator/

Ah, yes, I have a Digilab board with a spartan2 on it...
Did several projects with that.

Xilinx lies about the prices, buying a single FPGA is very expensive,
if you can get them at all.
 
F

Frank Buss

Jan 1, 1970
0
Jan said:
Xilinx lies about the prices, buying a single FPGA is very expensive,
if you can get them at all.

You are right that it is easier to get parts from Altera, because they have
a webshop where you can order even single units. But e.g. Digikey has the
Spartan3E as well and it is not expensive, e.g. the 5500 logic cell
XC3S250E for about §13 and 80 units in stock:

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=122-1525-ND

(the Digikey text for the number of logic elements is wrong, this is the
right page: http://tinyurl.com/2nwqgx )
 
J

Jan Panteltje

Jan 1, 1970
0
You are right that it is easier to get parts from Altera, because they have
a webshop where you can order even single units. But e.g. Digikey has the
Spartan3E as well and it is not expensive, e.g. the 5500 logic cell
XC3S250E for about §13 and 80 units in stock:

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=122-1525-ND

(the Digikey text for the number of logic elements is wrong, this is the
right page: http://tinyurl.com/2nwqgx )

The good thing is the dollar keeps falling :)
Soon those chips will be free.
 
J

Jan Panteltje

Jan 1, 1970
0
I wrote;
The only limitation is that if you _do_ turn P2 on an item, then you will
have to set the correct value again.

In fact the system can be improved even further by providing a software 'lock in'.

This would work somthing like this:
if item X is selected, then the following loop is entered:
/* wait for user to twiddle knob */
while(pot2_value != item_value)
{
if(! item_selected) return OK;
}
/*
now pot2 has been turned by the user and is exactly in the old position
for that item.
Now we follow the pot from this corect position onwards.
*/

while(item_selected)
{
item_value = pot2_value;
}

This sort of assigns to the user, the function of the motor in a motorised pot.
The user will select an item with pot1, nothing will happen.
Once the user starts twiddling pot2, the value for that item will only
be changed if he crosses the correct setting.
Like a mechanical lock in.
 
P

przemek klosowski

Jan 1, 1970
0
Now turning one potentiometer (pot1) selects horizontally either A, B,
C, D, E, etc (possibly highlighted), and you can quickly move between
settings.
[...]
The other potentiometer sets the value for the selected item. So if for

Small complication: the pot2 position can't absolutely set a value (ie,
you can't just read the adc and poke the parameter) because if you did
that, sweeping pot1 across the variables would set them all as you pass
So pot2 action has to be incremental. But a pot, unlike an
encoder, runs out of rotation.

This is a cool idea---pots are ubiquitous and cheap, while encoders are
harder to come by. Let's see we can make it work. Incremental operation
could be accomplished by putting a return spring on the pot. This is
quite neat, actually: a small tweak of the second pot would change the
value a little bit (one step), and the large tweak would go by more. OK,
so how do we distinguish left/down tweak from the right/up tweak, since
in this scheme there's a return move following immediately? Maybe by
timing, i.e. ignoring an opposite move immediately following a move in
each direction?

The spring return could be implemented by a lightly wound piano wire,
attached to the wiper, spiraling around the shaft and attached to the
body.
So I hereby put this idea in the public domain, if anyone wants to
patent it, then you are faced with prior art.

Ditto
 
J

Jan Panteltje

Jan 1, 1970
0
This is a cool idea---pots are ubiquitous and cheap, while encoders are
harder to come by. Let's see we can make it work. Incremental operation
could be accomplished by putting a return spring on the pot. This is
quite neat, actually: a small tweak of the second pot would change the
value a little bit (one step), and the large tweak would go by more. OK,
so how do we distinguish left/down tweak from the right/up tweak, since
in this scheme there's a return move following immediately? Maybe by
timing, i.e. ignoring an opposite move immediately following a move in
each direction?

The spring return could be implemented by a lightly wound piano wire,
attached to the wiper, spiraling around the shaft and attached to the
body.


Ditto

Yes, that would work.
I think I will try this 100% software solution:

This would work something like this:
if item X is selected, then the following loop is entered:
/* wait for user to twiddle knob */
while(pot2_value != item_value)
{
if(! item_selected) return OK;
}
/*
now pot2 has been turned by the user and is exactly in the old position
for that item.
Now we follow the pot from this corect position onwards.
*/

while(item_selected)
{
item_value = pot2_value;
}

This sort of assigns to the user, the function of the motor in a motorised pot.
The user will select an item with pot1, nothing will happen.
Once the user starts twiddling pot2, the value for that item will only
be changed if he crosses the correct setting.
Like a mechanical lock in.
 
J

John Larkin

Jan 1, 1970
0
All my settings are saved in EEPROM!

Every time they're changed, or is there an explicit save command? I
like battery-backed sram for saving a current machine state, because
it's fast and doesn't wear out. EEPROM is good for explicit setup
saves.

What's bizarre about the Keithley 2100 is that it does have a save
function that saves to nv memory, but the most needed settings don't
get saved, and the really obscure ones do. It always powers up at 60
display updates per second, so the rightmost 3 or even 4 digits are an
unreadable blur.

Pity: it's electrically superb, but the user interface wrecks it. Yet
another example of good electrical engineering trashed by clueless
programmers.

Hey google indexer, grab this: Keithley 2100 review

John
 
J

John Larkin

Jan 1, 1970
0
I think this is not a problem John.
The analog channels (pots) are continunously sampled.
If only pot1 is used, and pot2 is not moved (no change in last value
from pot2), then no changes will be made to any settings.
The pseudo code for that is very simple, and you need only 3 vars:

int pot1;
int pot2;
int pot2_old = -1;

set_ch1_gain()
{
if(pot2 != pot2_old)
{
do_something_here(pot2);
pot2_old = pot2
}
}
return OK;


To get the 'ladder' of analog values, first clip at the top:

if(pot1 > 4000)
{
set_ch1_gain();
return OK;
}
else if(pot1 > 3500)
{
set_ch2_gain();
return OK;
}
else ....
etc etc

Or something like that.
I was thinking, that you as perfect embedded ASM programmer, would know those tricks ;-)

It's not a programming problem, it's a user interface problem. I still
think this would be very annoying to use. Pot2 could also be left one
or so lsb's from a transition point, so after you set, say,
time/division, it will jump up or down one step on its own some time
later. So at the least you need more logic.

And I'd do something like this more table-driven and less if-then-else
code driven.

John
 
J

John Larkin

Jan 1, 1970
0
Now turning one potentiometer (pot1) selects horizontally either A, B,
C, D, E, etc (possibly highlighted), and you can quickly move between
settings.
[...]
The other potentiometer sets the value for the selected item. So if for

Small complication: the pot2 position can't absolutely set a value (ie,
you can't just read the adc and poke the parameter) because if you did
that, sweeping pot1 across the variables would set them all as you pass
So pot2 action has to be incremental. But a pot, unlike an
encoder, runs out of rotation.

This is a cool idea---pots are ubiquitous and cheap, while encoders are
harder to come by. Let's see we can make it work. Incremental operation
could be accomplished by putting a return spring on the pot. This is
quite neat, actually: a small tweak of the second pot would change the
value a little bit (one step), and the large tweak would go by more. OK,
so how do we distinguish left/down tweak from the right/up tweak, since
in this scheme there's a return move following immediately? Maybe by
timing, i.e. ignoring an opposite move immediately following a move in
each direction?

The spring return could be implemented by a lightly wound piano wire,
attached to the wiper, spiraling around the shaft and attached to the
body.
So I hereby put this idea in the public domain, if anyone wants to
patent it, then you are faced with prior art.

Ditto

R/C control boxes have a clever spring mechanism that centers the pots
very definitely. A simple spiral spring could be a little vague.

John
 
J

Jan Panteltje

Jan 1, 1970
0
Every time they're changed, or is there an explicit save command?

Basically every time you change something.
I do this in all programs for all variables.
Th effect is, that you can power down, power up, and be right where you were.
I
like battery-backed sram for saving a current machine state, because
it's fast and doesn't wear out. EEPROM is good for explicit setup
saves.

Yes, EEPROM wears out, but it takes a while to do 1 million changes,
and a new PIC costs 3$.
(Microchip specifies a minimum of 1M, and typical 10M read/write cycles to EPROM.
Specification D124 in the 16F690 datasheet).
 
J

Jan Panteltje

Jan 1, 1970
0
It's not a programming problem, it's a user interface problem. I still
think this would be very annoying to use. Pot2 could also be left one
or so lsb's from a transition point, so after you set, say,
time/division, it will jump up or down one step on its own some time
later. So at the least you need more logic.

And I'd do something like this more table-driven and less if-then-else
code driven.

John

I sort of decided to do it this way (pseudo code):
This would work something like this:
if item X is selected, then the following loop is entered:
/* wait for user to twiddle knob */
while(pot2_value != item_value)
{
if(! item_selected) return OK;
}
/*
now pot2 has been turned by the user and is exactly in the old position
for that item.
Now we follow the pot from this corect position onwards.
*/

while(item_selected)
{
item_value = pot2_value;
}

This sort of assigns to the user, the function of the motor in a motorised pot.
The user will select an item with pot1, nothing will happen.
Once the user starts twiddling pot2, the value for that item will only
be changed if he crosses the correct setting.
Like a mechanical lock in.
 
J

Joerg

Jan 1, 1970
0
Phil said:
Joerg said:
Jan said:
On a sunny day (Fri, 11 Jan 2008 15:08:30 -0800) it happened Joerg
<PFShj.13779$6%[email protected]>:

Jan Panteltje wrote:
Ideas and thoughts about a 2 knob control approach for the (PIC)
oscilloscope

Well you know how it goes, I looked, I thought 'It has enough pins
(this PIC)'
so it will drive the graphics (I am talking about a 16F690, and
64x128 LCD),
have 2 analog inputs, a trigger input, huh, but only 20 pins, minus
supply
makes 18.

IO expanders is cheating, and I already have the PICs.

So to find a nice quick system to set the following things, with
only TWO
IO pins left free ;-)

gain ch1, gain ch2, trigger level, trigger polarity, trigger mode,
pos ch 1, pos ch 2, timebase speed, timebase vernier, etc.


Now what I came up with is this (and I will have to use it, so it
better work):

2 potentiometers on 2 analog inputs of the PIC -FOR ALL CONTROLS-.

The list above displayed on the bottom of the graphics LCD like this:

CH1 CH2 tr. level tr. source etc
5mV/div 100mV/div -1 CH1

A B C D E
Now turning one potentiometer (pot1) selects horizontally
either A, B, C, D, E, etc (possibly highlighted),
and you can quickly move between settings.

The other potentiometer sets the value for the selected item.
So if for example A is selected, then turning pot2 switches from
2mV to 10mV to 50mV etc,
Some items are adjusted continuous (like trigger level), and some
in steps (like
trigger polarity).

I have come to the conclusion that this way of controlling is very
very fast,
only requires 2 analog knob turns for every control, one if you
stay with a control.

------------------------------------
| |
| | <-- trace display area
| |
| |
| .. .. .. .. .. .. .. .. .. .. .. | <------- on screen items
------------------------------------
In1 In2 Tr. in P1 P2
^^^^^^^--------- The only 2 controls!
connectors


So I hereby put this idea in the public domain, if anyone wants to
patent it, then
you are faced with prior art.

Copyright (C) Jan Panteltje Fri Jan 11 23:47:15 CET 2008

IIRC there is a scope that does the same, except that it uses rotary
pulse encoders instead of a potmeter. So there might be prior prior
art ;-)

mm, yes, that is possible, in that case you are out of luck if they also
patented potentiometers.
But why pulse encoders? The PIC ADC is 10 bits, there is visual
feedback,
if too many items, then I can perhaps software scroll the list
horizontally.

Potmeters are notoriously unreliable. They are ok for a few years,
then the wiper starts exhibiting the occasional "lift off". Encoders
last a whole lot longer although the one in my lab receiver is totally
short in the bearings now :-(

[...]
The other problem is that pots have a 'memory'--if you have the
horizontal position cranked, when you switch from 'position' to
'sensitivity' mode, your time base just went from 1 us/div to 1 ms/div.
Could get old.

Yeah, that would get old. But with potmeters I am afraid they wouldn't
last very long in the first place.

Encoders, being differential, don't mess up your default position.

Something like an iPhone display would be sort of cool--to change the
horizontal scale, just put two fingers on the screen and move them
further apart or closer together. I'd definitely want knobs, though
(and probably Windex after an hour or so).

Not sure if that screen would survive Windex. OTOH the guy in "My big
fat Greek Wedding" even used it against zits.

Of course, to have the real IPhone feel you need a G-sensor in there so
you can automatically adjust the screen to be upright after the scope
took a tumble.
 
Top