Creating a Run Back Timer?

TrueDoom

New Member
Heya, i'm doing a project for school, i wonder if any of you fine people could help me. Its a basic run back timer.

I need to make a run back timer that would be used on an immersion system, that heats water. When the button is pressed once it heats the water for a certain time, then turns off, if its pressed twice, it heats it for longer, and if pressed again, it wud take even longer. I'm assuming this is possible?

basically it shud be sumthin like this =>


Start -> input 6 -> LED lights up for five seconds, turns off unless input 6 is pressed again, if it is pressed then another LED becomes lit for 10 seconds then turns off unless Input 6 is pressed yet again and another LED lights up for 15 seconds.

Input ->1 LED, Input again -> 2 LED's, Input Again -> 3 LED's

the problem i have, is that pressing input 6 once, makes it run through all the decisions in the code, instead of stopping at the individual decisions.

I'm very new to this software so i'm very lost =/

also would it be possible to incorparate a temperature sensor into it? so that when it reaches a certain temp it will shut down the program straight away?
 

Dippy

Moderator
Are you talking about a mains powered immersion heater?
Will your school / parents find this acceptable?
Can't you do something safer?
What experience do you have? (Doesn't sound like much if any).

No doubt your thread will start the usual Mains+Newbie Avalanche of Doom. So , do not do this without experienced assistance. Right that's that bit.

I would suggest posting your code as it stands as it sounds like you're not testing to see if the button has been released. However, my crystal ball has clouded over.
So post your code.

Sensors? Yes, of course. The right type in the right place. No problem. Don't forget a failsafe if your sensor fails/drops off.

But do the first bit first and do NOT get ahead of yourself. Get the input right and then you can move on.
So, post your code as you have done it so far.

By the way, how are you going to do your switching?
What components have you highlighted for this project?
How are you going to test this? Are you going straight to pcb?
Is someone with experience going to help you?

Can you also post a proposed schematic?

Please note that if this is a school project that is course-work then people here will NOT do it for you. Or they shouldn't. Life is more than cutting and pasting said Confucius.
 
Last edited:

TrueDoom

New Member
Oh no! hehe its not a real immersion. we have made a small one to connect to, it doesn't actually heat up, and to represent the water being boiled its and LED the comes on. its all powered by the board.
 

Dippy

Moderator
Post your code.
Or do you want someone to write it for you?

Hippy! Wake up! Someone wants their homework done :)
 

manuka

Senior Member
LED version =rather a spoilsport as you've outlined. Maybe use a low voltage filament lamp of a few Watts (perhaps an ex car 12V 6W), with it's glass immersed in a beaker of water as the heater? This will warm things quite nicely, yet be totally safe electrically.

As a marker I'd be concerned about how the setup (even in it's simple LED form) STOPS the heating to save energy,elements & maybe even life. Are you hence including at least a thermistor?
 
Last edited:

Mycroft2152

Senior Member
LED version =rather a spoilsport as you've outlined. Maybe use a low voltage filament lamp of a few Watts (perhaps an ex car 12V 6W), with it's glass immersed in a beaker of water as the heater? This will warm things quite nicely, yet be totally safe electrically.

As a marker I'd be concerned about how the setup (even in it's simple LED form) STOPS the heating to save energy,elements & maybe even life. Are you hence including at least a thermistor?
Hint, hint!
 

Dippy

Moderator
Stan, he did say "also would it be possible to incorparate a temperature sensor into it? so that when it reaches a certain temp it will shut down the program straight away?"
- so... it looks like he's including (or wanting to include) a thermistor or similar.

Saving life? Do you want a built in smoke alarm and fuse on it? :)

eclectic, I hadn't even noticed which part of forum this is on, I just click Quick Links.

But, yes you're right.
 

TrueDoom

New Member
Hello again all, thanks for all the help.

okay, amm thing is i have no clue about code, i'm using Pic-Logicator Software, which is just some programming software for pic-boards.

As it stands, i have some form of timer, which i cant get working, because i cant figure out how to put the processes to start the way i want.

I dont suppose anyone here uses Economatics PIC Logicator Software? I've been trying to figure this out the last 2 weeks or so, and its been driving me crazy.

lol also sorry for posting in the wrong section, didn't know =/
 
Last edited:

hippy

Ex-Staff (retired)
Thread moved for you.

As to programming, you'll want something like -

1) Turn on immersion
2) Initialise timer.
3) If over temperature, abort / goto (7)
4) Wait a while, then decrease timer
5) If boost pushed, increase timer
6) If timer not zero, repeat from (3)
7) Turn immersion off

I've no idea how that would be implemented / represented using Logicator.
 
Top