CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Easiest user inteface for a timer?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
notbad



Joined: 10 Jan 2013
Posts: 68

View user's profile Send private message

Easiest user inteface for a timer?
PostPosted: Fri Jul 05, 2013 1:49 pm     Reply with quote

I’m making a timer to turn on a relay after 0-24 hours.
Minute resolution can be 10 or even 30 Mins. (The more resolution, the better).
Accuracy can be 10 Mins.
My goal is to design a user interface that needs less pins, hence a smaller PIC and less external parts.
There is no need to see the current time. I just want to set the time and press “GO”.
Up/down keys plus 7-seg display is way too heavier than what I desire.
Any ideas would be appreciated.
Javad
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Jul 05, 2013 2:03 pm     Reply with quote

Simplest, fewest pin count I can do is 2 pins.

To get 10min target, that's 144 'counts'(6 per hour x 24hrs), so well within an 8bit ADC, so pin 1 is a pot connected to an ADC input.

To 'go' simply press a pushbutton on a digital input pin.

operation as follows...
1) turn pot to desired time delay
2) press 'go' button.


Any 8 pin PIC with adc will work.

hmm...I can do it with 1 pin if 'automatic' mode is OK after the 'setpoint delay' is dialed in.


hth
jay
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Fri Jul 05, 2013 2:12 pm     Reply with quote

i like your pot idea, but it would be difficult to know without any display if the pot/ADC is at the right value... fingers on a pot are not very accurate without any feedback...
_________________
CCS PCM 5.078 & CCS PCH 5.093
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Fri Jul 05, 2013 2:27 pm     Reply with quote

If you only want on/off, this uses one pin.
input to trigger, one more pin.
PIC with internal oscillator, then uses two pins for power.
So an 8pin PIC still gives you four pins available.

Four position DIL switch, gives 16 possibilities.

The one I did, for a similar application, used a 14pin PIC, and an SSR, and you set time in 5 minute steps, on two 16 position rotary switches.

It was cheaper to use a 14pin PIC, than to get involved in extra circuitry to reduce pins....

Best Wishes
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Jul 05, 2013 2:58 pm     Reply with quote

but...
you said you couldn't use a 7 segment display in your OP.
hence no feedback...

and
yes, cheap 270* pots are 'finiky' but I've used great multiturn pots for 30+ years...super accurate, not cheap though.

I've also used linear pots 12" long for 'ball and beam' balancing experiments,pneumatic servo systems,etc.

encoders are easy,cheap,but need 2pins...

you'll have to tell us more what you can use....or not..

hth
jay
notbad



Joined: 10 Jan 2013
Posts: 68

View user's profile Send private message

PostPosted: Fri Jul 05, 2013 3:38 pm     Reply with quote

Thanks guys
The pot sounds good. I can attach a handle(the ones with a pointer) to the pot and put a printed scale on the panel for the feedback.
Is there a kind of pot which turns 360°?
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Fri Jul 05, 2013 4:26 pm     Reply with quote

Yes, there are a number of configurations. For single turn pots with no stop
be aware that going from max resistance to the "zero" resistance position may"open"
for a short distance when the pot transitions from high to low or vice-versa.

Multi-turn pots go 360 degrees for the specified number of turns (i.e 10 turn)
then hit a stop.
_________________
Google and Forum Search are some of your best tools!!!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Sat Jul 06, 2013 12:29 am     Reply with quote

However the little PCB mount decimal or binary switches, have the value they are set to 'displayed'. Solves the 'feedback' in one go.
Remember you can even get thumbwheel versions of these, and that you can scan them like a keyboard matrix to save pins if required. So if you wanted, three BCD thumbwheels, could use four pins for the data 'back', and three pins to scan, and you can just dial in 'minutes', zero, to 999. Uses no power to 'display', dead easy to set, with none of the error problems from the pot.

Best Wishes
notbad



Joined: 10 Jan 2013
Posts: 68

View user's profile Send private message

PostPosted: Sat Jul 06, 2013 12:28 pm     Reply with quote

Dear Ttelmah

About the DIL switches, I thought you mean the user has to set the time in binary.(right?)
I didn't like it because that wouldn't be user friendly.
And to be honest, I didn't completely understand the idea of 16 position rotary switches.
But I googled this "thumbwheel" you mentioned. And it’s very interesting.
I think I'm gonna use it!

Thanks everyone for the ideas
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jul 06, 2013 2:38 pm     Reply with quote

No.. thumbwheels can be any 'flavour', hex, bcd, binary,etc.

I used Cherry thumbwheels for decades.You could use 4 to do 10h,1h:10m,1m as Mr.T said.

However I was under the impression you wanted minimal pins....
..so an 8 pin PIC might not work for you though you might want to check out mchp's 'designing for dollars' handbook as there are lots of clever timers in there.

hth
jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group