Daily Programmer

Started by gouardopatrick September 20, 2009
Hello,

I like to build a programmer to control 8 valves 24 V with the BasicX.
The idea is to start the opening of the first valve at a set time of the day, open it for a certain time (less than 30 mm), then open the second for the same time, etc.
Only one valve at a time and each valve for a given time.

The start time or duration does not have to be adjusted by the operator.
If I want to change it, I will simply modify the code and download it in the Basicx.

The problem I want to address is how to enter the time of the day
I understood that time management is a problem with the Basicx and very consuming of processor time.
Later, I will insert codes to read the level of water in the tanks with a ultrasound sensor and display the level on an LCD screen.

Would you use an external Clock IC or circuit which will keep track of the time?

What main command would you use for this type of project?

Thanks for your feedbacks and advices.

Best Regards.

Patrick
> ... how to enter the time of the day I understood that time
management is a problem with the Basicx and very consuming of processor
time.

The only problem BasicX has with time of day is setting it at each boot
of the processor. The time is just a count of 512Hz ticks internally,
and that value starts at zero when the processor starts. You'll need to
provide an external clock source to set the processor clock.

There are many real time clock modules that you can use; check
Maxim/Dallas Semiconductor products, like the DS1307 and many others.
Sparkfun has one on a breakout board, although it is not cheap.
http://www.sparkfun.com/commerce/product_info.php?products_id Of
course, you can manually enter the time with a keyboard or take it from
a PC serially, too. If you want to get sophisticated and the operating
possition can see the sky, you can use a GPS module.

I've built many BX-24-based clocks. You can do what you want to do easily.

Tom
Patrick,
What about tying one of the IO to any external plug in timer to start the process at a predetermined time. It should not be hard to hold the valves open for a specific amount of time.

--- On Sun, 9/20/09, gouardopatrick wrote:

From: gouardopatrick
Subject: [BasicX] Daily Programmer
To: b...
Date: Sunday, September 20, 2009, 2:11 AM




Hello,

I like to build a programmer to control 8 valves 24 V with the BasicX.

The idea is to start the opening of the first valve at a set time of the day, open it for a certain time (less than 30 mm), then open the second for the same time, etc.

Only one valve at a time and each valve for a given time.

The start time or duration does not have to be adjusted by the operator.

If I want to change it, I will simply modify the code and download it in the Basicx.

The problem I want to address is how to enter the time of the day

I understood that time management is a problem with the Basicx and very consuming of processor time.

Later, I will insert codes to read the level of water in the tanks with a ultrasound sensor and display the level on an LCD screen.

Would you use an external Clock IC or circuit which will keep track of the time?

What main command would you use for this type of project?

Thanks for your feedbacks and advices.

Best Regards.

Patrick