Hi Rob,
see my reply in the text.
2010/2/3 Rob Conway <[email protected]>
> Hi Pascal,
> This opens up more possibilities for us looking at getting a more reliable
> control over 1wire. Distribution of control via the AE in the BAE0910 will
> be great. The weak link I have in my system is obviously the reliance of
> the 1wire master / script running in the host.
>
Reliability was indeed the first concern when I began with this project.
> It just so happens I am currently building another automated aquarium for a
> small reef tank right now. I thought if I explained the application after
> having a skim read of capabilities of the BAE0910 you maybe able to comment
> on the feasibility...
>
> A major advantage I see in 1wire over a PIC is the simple wiring and as
> such want to try and keep the component count down and thus reliance on
> soldering techniques. Don;t get me wrong I have built lots a of "bird nest"
> style controllers in the past and studied electronics however I want to
> create something that isn't too hard for anybody to build within the
> Aquarium World.
>
>
> *DIGITAL CONTROL OF RELAYS*
> Requirements: Generally the digital control is a glorified light timer.
> Currently thoughts are to simply use "cron" to start a simple 1 line script
> to open or close various relays throughout the day. Typically require 8 or
> 12 relays however the relay boards are in groups of 4. I use a futurlec
> board (US$15.00) 10Amp relays, opto isolated and includes all pull up
> resistors etc etc. i.e. currently use a DS2408 direct to relay board.
>
BAE0910 has "only" 5 pin available where counter is input only and out is
output only. if adc is used as input, it remains only 3 pin for output.
however, read later...
> Possible enhancements using a BAE0910.
> Local control. I would like to be able to use 4 push buttons and when
> pushed, toggle the corresponding output.
>
> This means if the host is down I can still walk up to the tank and manually
> control each output. I propose to use 4 switches / resistor network in
> parallel on the ADC line so the wiring to the push buttons is simplified.
>
easy to handle with AE
> Thus the push buttons or host can control the output. The only
> complication maybe that the host would set a parameter to 0 or 1 for on/off
> and the push button is a momentary pulse that needs to toggle the same
> parameter as the host.
>
The various relays activations could be seen as cycles. you define a user
register as cycle command flag, then the master write this register as a
start cycle command. Same for the process who monitor momentary switches
that update the start cycle flag.
>
> Failsafe......A future enhancement, I would like to send a watchdog pulse
> from the 1wire host to the BAE0910, say every minute. If the BAE0910 does
> not see this pulse (leading edge) in say ~30 minutes, it assumes the host is
> down and the outputs go to a pre-configured failsafe position for each of
> the four outputs.
>
possible, two variation:
master decide timeout:
master set periodically an user register that is decremented by AE, on
reaching zero, AE go in failsafe position.
BAE0910 hardcoded timeout:
master clear periodically an user register that is incremented by AE, on
reaching a predefined timeout, AE go in failsafe position.
In this mode the push buttons would work as normal and just toggle the
> corresponding output, manual control. When the host is back, watchdog is
> sensed, the outputs simply stay at there current position waiting for host
> control if required, which is called bumpless transfer.
>
> Timed output....In one case I want to turn a pump off when feeding the
> fish. That means from a push button I want to control an output and turn it
> off for say 15 minutes when the leading edge of the button is sensed.
>
If you think in term of cycle, timed action is common situation.
>
> Questions:
> 1) Is the above feasible ?
>
yes.
> 2) Can I have 1 ADC and 4 DO
>
no. only 1ADC + 3DO+1DI or 4DO+1DI
however, multiplexing functions could solve this if you can live with
compromise and more cabled logic (4 diodes):
-> share ADC with a "less" critical out.
however, two issues:
1. if the relay connected on ADC is intentionally activated, we are no
more reading buttons.
2. pushing a button could activate temporarily this relay.
The first issue could be solved using CNT as an interrupt signal from
buttons. then output is suspended, adc is read and output is put back to
previous state.
For the second issue, some tuning on transisistor trigger level could reduce
the side effect.
with "less critical output" I mean an output that tolerate a short ON when
idle and a short OFF when active...
where "short" is the duration of button press
>
>
> *TEMPERATURE CONTROL*
>
I suppose a second chip for this second part. right?
> Requirements: To control the temperature of the aquarium. A heater with
> inbuilt thermostat is used coupled with a Fan for cooling. On a hot day you
> can get the heater fighting with the fan.
>
> Simplified program
> >27 (degC) Turn Heater OFF
> >27 turn power to Fan ON *
> 26 -28 modulate fan speed via PWM
> <24 turn heater ON
> <25 turn fan OFF*
>
*PWM could work from 0%(OFF) to 100%(ON) -> condition on 26-28 should be
enough...
maybe do you mean chaining the controls for the fan (put in serial a relay
and a pwm)?
> *Auto / Manual*.... From the host I would like to be able to set if the
> temperature control scheme is in auto or manual.
> In manual it means the host can toggle the corresponding outputs for heater
> ON/OFF, Fan ON/OFF and fan speed via PWM value and the BAE0910 is just a
> dumb device with PWM capabilities.
>
ok
> In "Auto" the AE has control of the outputs as per the table above and
> ignores any requests from the host to override the outputs. I have assume
> "Auto/Manual" can be an internal variable within the BAE0910 that can be set
> from the host or internal AE.
>
right, an AE process inspect a user register representing AUTO/MAN setting
and control the output accordingly. an attempt to force an output from the
master will be overwriten by AE if auto in engaged.
>
> *Failsafe*....Again like above with a watchdog pulse however in this case
> set a pre-determined setpoint and force the AE into Auto control.
>
yes the AE watchdog simply change to AUTO if condition is met.
>
> *Timed Deadband*.. Although not for temperature control, if the above was
> used for pH control it is simple on/off control to dose pressurised Co2 into
> the Aquarium.
> example. >6.40pH output =ON <6.35pH output = OFF.
> However the output cannot turn on again even if above setpoint for xx
> minutes. Thus if the output is ON and the pH goes below 6.35 the output
> turns off, even if the pH goes above 6.4 again the output does not go on
> again until an internal timer has elapsed.
>
possible, and also add some logic to avoid ON duration more than xx minutes
...
> Questions:
> 1) Is the above feasible ?
>
yes
> 2) Although I can use an RTD and transmitter to get 1-5VDC representing a
> temperature signal, what I would really like to do is to direct connect a
> single DS18B20 to the PIO pin and read temperature direct into the AE. i.e.
> A single DS18B20 and only retrieve the temperature, no need for ID and all
> that fancy stuff. RTD / Transmitter = $75.00 vers DS18B20=$5.00
>
It is really possible, I should be able to post an testing firmware within 3
weeks.
>
> 2) Can the AE scale the ADC so we work in real engineering units ? or do
> I work in 0-xxx counts. I would like to be able to send to the BAE0910 a
> setpoint in degree's not counts and also read the value back in engineering
> units.
>
On current release, AE don't have DIVIDE instruction implemented, so only
power of two possible by shifting values. This is planned for future
release.
However, using summing/averaging of adc N time per second you could adjust N
to obtain ADCAP equivalent to physical values. with N in range of 16 to
4000, you could closely stick to real units. (without decimals)
> 3) Can I have 2 x DO and 1 x PWM output and 1 x ADC (or future DS18B20
> using a PIO pin :))
>
yes, 2xDO=OUT+PIO, 1xPWM= PWM1, 1xADC=ADC,
if PIO used for temperature, ADC could be reused as DO ( PWM2 0% / 100%)
>
>
> I have more applications however the above two would get me started.
>
you welcome :-)
>
>
> Rob Conway
>
>
>
>
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers