[arm-allstar] Fan Control

Ron Gilson wa2wwk at gmail.com
Tue Apr 28 21:02:07 EDT 2020


Thanks.  Will try in the morning.
WA2WWK  Ron

On Tue, Apr 28, 2020 at 12:48 PM "Doug Crompton via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:

> Bad morning -  Again one two many X's in the first line!
>
> /etc/asterisk/local/check_fan 1 = s|t|RPT_TXKEYED
> /etc/asterisk/local/check_fan 0 = s|f|RPT_TXKEYED
>
>
> *73 Doug, WA3DSP*
> *http://wa3dsp.org <http://wa3dsp.org>*
> On Tue, Apr 28, 2020 at 12:46 PM Doug Crompton <wa3dsp at gmail.com> wrote:
>
> > Correction - one line was left out in the last email. The events section
> > should have these two lines -
> >
> > /etc/asterisk/local/check_fan 1 = s|t|RPT_TXXKEYED
> > /etc/asterisk/local/check_fan 0 = s|f|RPT_TXKEYED
> >
> > *73 Doug, WA3DSP*
> > *http://wa3dsp.org <http://wa3dsp.org>*
> >
> > On Tue, Apr 28, 2020 at 12:42 PM Doug Crompton <wa3dsp at gmail.com> wrote:
> >
> >> Ron,
> >>
> >>  I l;ooked way back at that original email. While that should work there
> >> is a slightly better way to do it....
> >>
> >> Create this script at the Linux prompt -
> >>
> >> cd /etc/asterisk/local
> >>
> >> nano check_fan
> >>
> >> Then enter this -  Change the 23's to another bit if you want
> >>
> >> #!/bin/bash
> >>
> >> gpio mode 23 out
> >>
> >> if [ "$1" = "1" ]
> >>   then
> >>     gpio write 23 1
> >> else
> >>     gpio write 23 0
> >> fi
> >>
> >> Save it
> >>
> >> Make the script executable
> >>
> >> chmod 750 check_fan
> >>
> >> Edit /etc/asterisk/rpt.conf
> >>
> >> in the [eventsxxxxx] section add
> >>
> >> /etc/asterisk/check_fan 1 = s|t|RPT_TXKEYED
> >>
> >> Make sure in the node section you have
> >>
> >> events=eventsxxxxx
> >>
> >> The xxxxx is your node number
> >>
> >> Restart Asterisk
> >>
> >> astres.sh
> >>
> >> Use  gpio readall   to test.  Example
> >>
> >> unkeyed  - 23 shows 0
> >>
> >> gpio readall
> >>
> >>    5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |
> >>   |
> >>  |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 0 | IN   | GPIO.26 | 26
> |
> >> 12  |
> >>  |  13 |  23 | GPIO.23 |  OUT | 0 | 33 || 34 |   |      | 0v      |
>  |
> >>     |
> >>  |  19 |  24 | GPIO.24 |   IN | 0 | 35 || 36 | 0 | IN   | GPIO.27 | 27
> |
> >> 16  |
> >>  |  26 |  25 | GPIO.25 |   IN | 0 | 37 || 38 | 0 | IN   | GPIO.28 | 28
> |
> >> 20  |
> >>  |     |     |      0v |      |   | 39 || 40 | 0 | IN   | GPIO.29 | 29
> |
> >> 21  |
> >>
> >>
> +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
> >>  | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi
> |
> >> BCM |
> >>  +-----+-----+---------+------+---+---Pi
> >> 3---+---+------+---------+-----+-----+
> >>
> >> Keyed
> >>
> >> |     |     |      0v |      |   | 25 || 26 | 1 | IN   | CE1     | 11  |
> >> 7   |
> >>  |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31
> |
> >> 1   |
> >>  |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |
>  |
> >>     |
> >>  |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 0 | IN   | GPIO.26 | 26
> |
> >> 12  |
> >>  |  13 |  23 | GPIO.23 |  OUT | 1 | 33 || 34 |   |      | 0v      |
>  |
> >>     |
> >>  |  19 |  24 | GPIO.24 |   IN | 0 | 35 || 36 | 0 | IN   | GPIO.27 | 27
> |
> >> 16  |
> >>  |  26 |  25 | GPIO.25 |   IN | 0 | 37 || 38 | 0 | IN   | GPIO.28 | 28
> |
> >> 20  |
> >>  |     |     |      0v |      |   | 39 || 40 | 0 | IN   | GPIO.29 | 29
> |
> >> 21  |
> >>
> >>
> +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
> >>  | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi
> |
> >> BCM |
> >>  +-----+-----+---------+------+---+---Pi
> >> 3---+---+------+---------+-----+-----+
> >>
> >> 23 shows 1
> >>
> >> Then use bit 23 (or the bit you choose) to run the relay.  Remember
> these
> >> bits are 3V high and 0 low and low current. You need to have a relay or
> >> solid state relay that works with that.
> >>
> >> *73 Doug, WA3DSP*
> >> *http://wa3dsp.org <http://wa3dsp.org>*
> >>
> >>
> >>
> >> On Tue, Apr 28, 2020 at 12:06 PM "Ron Gilson via ARM-allstar" <
> >> arm-allstar at hamvoip.org> wrote:
> >>
> >>> The script you wrote 10/2018.  I copied and paste hopefully not making
> >>> any
> >>> goofs ?  If this is not practical I can use a thermostat on the heat
> >>> sink?
> >>> Thanks for all your help.  Ron
> >>>
> >>>
> >>> On Mon, Apr 27, 2020 at 9:22 PM "Doug Crompton via ARM-allstar" <
> >>> arm-allstar at hamvoip.org> wrote:
> >>>
> >>> > Ron,
> >>> >
> >>> >   What info are you using for this? What script?
> >>> >
> >>> > *73 Doug, WA3DSP*
> >>> > *http://wa3dsp.org <http://wa3dsp.org>*
> >>> >
> >>> >
> >>> > On Mon, Apr 27, 2020 at 8:14 PM "Ron Gilson via ARM-allstar" <
> >>> > arm-allstar at hamvoip.org> wrote:
> >>> >
> >>> > > Recently I built a suitcase repeater.  Since this is a battery
> >>> operated
> >>> > > repeater and power is limited, I decided to use the fan script.
> >>> After
> >>> > > adding the fan_control.sh in the /etc/asterisk/local and adding
> >>> > > local/fan_control.sh to rc.local along with the 3 lines to events I
> >>> did a
> >>> > > reboot but pin 33 bit 23 does not change after a ptt???  Have I
> >>> missed
> >>> > > something ?  Thanks
> >>> > > Ron  WA2WWK
> >>> > > _______________________________________________
> >>> > >
> >>> > > ARM-allstar mailing list
> >>> > > ARM-allstar at hamvoip.org
> >>> > > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >>> > >
> >>> > > Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
> >>> > >
> >>> > _______________________________________________
> >>> >
> >>> > ARM-allstar mailing list
> >>> > ARM-allstar at hamvoip.org
> >>> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >>> >
> >>> > Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
> >>> >
> >>> _______________________________________________
> >>>
> >>> ARM-allstar mailing list
> >>> ARM-allstar at hamvoip.org
> >>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >>>
> >>> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
> >>>
> >>
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>


More information about the ARM-allstar mailing list