I have 2 12v fans cooling my pi, obviously they take power direct from 12v source not the pi. I want to turn them on/off with an external relay controlled by a gpio pin, as this is a battery powered remote rig.
I can code it myself in python or nodejs, but am thinking there must be a console applet someone already created to just allow one to toggle?a pin high/low. Console or xterm preferred as I vnc into the pi, but web interface ok too.
Thanks, Randy KN4YRM
|
Well to answer my own question, the raspbian OS comes with command line "gpio" utility that is pretty cool, except for some weird pin mapping convention.
Was able to easily use webmin (great admin tool I put on every linux machine) to add simple startup and shutdown script so now the pi can control the relay that controls its own 2x12v 40mm fans I put on for cooling (going to use this outside or in a hot vehicle in florida for remote rig control).
|
That sounds amazing - would it enable "hot plug" for the 12V makerpi hat as well I presume?
toggle quoted message
Show quoted text
On 6/3/20, Randon Loeb <randonloeb18@...> wrote: Well to answer my own question, the raspbian OS comes with command line "gpio" utility that is pretty cool, except for some weird pin mapping convention.
Was able to easily use webmin (great admin tool I put on every linux machine) to add simple startup and shutdown script so now the pi can control the relay that controls its own 2x12v 40mm fans I put on for cooling (going to use this outside or in a hot vehicle in florida for remote rig control).
-- G.D. Greenwell C: +1.240.472.3941 grant.d.greenwell@...
|
I'm not familiar with that hat (in full disclosure, more a microcontroller guy than rpi).?
What does it do, or where are its specs online?
toggle quoted message
Show quoted text
That sounds amazing - would it enable "hot plug" for the 12V makerpi
hat as well I presume?
On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
> Well to answer my own question, the raspbian OS comes with command line
> "gpio" utility that is pretty cool, except for some weird pin mapping
> convention.
>
> Was able to easily use webmin (great admin tool I put on every linux
> machine) to add simple startup and shutdown script so now the pi can
> control the relay that controls its own 2x12v 40mm fans I put on for
> cooling (going to use this outside or in a hot vehicle in florida for
> remote rig control).
>
>
>
>
--
G.D. Greenwell
C: +1.240.472.3941
grant.d.greenwell@...
|
toggle quoted message
Show quoted text
On 6/3/20, Randon Loeb <randonloeb18@...> wrote: I'm not familiar with that hat (in full disclosure, more a microcontroller guy than rpi).
What does it do, or where are its specs online?
On Wed, Jun 3, 2020 at 10:16 AM Grant Greenwell <grant.d.greenwell@...> wrote:
That sounds amazing - would it enable "hot plug" for the 12V makerpi hat as well I presume?
On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
Well to answer my own question, the raspbian OS comes with command line "gpio" utility that is pretty cool, except for some weird pin mapping convention.
Was able to easily use webmin (great admin tool I put on every linux machine) to add simple startup and shutdown script so now the pi can control the relay that controls its own 2x12v 40mm fans I put on for cooling (going to use this outside or in a hot vehicle in florida for remote rig control).
-- G.D. Greenwell C: +1.240.472.3941 grant.d.greenwell@...
-- G.D. Greenwell C: +1.240.472.3941 grant.d.greenwell@...
|
What exactly are you trying to accomplish and what do you mean by "hot plug?"
toggle quoted message
Show quoted text
On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
> I'm not familiar with that hat (in full disclosure, more a microcontroller
> guy than rpi).
>
> What does it do, or where are its specs online?
>
> On Wed, Jun 3, 2020 at 10:16 AM Grant Greenwell
> <grant.d.greenwell@...>
> wrote:
>
>> That sounds amazing - would it enable "hot plug" for the 12V makerpi
>> hat as well I presume?
>>
>> On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
>> > Well to answer my own question, the raspbian OS comes with command line
>> > "gpio" utility that is pretty cool, except for some weird pin mapping
>> > convention.
>> >
>> > Was able to easily use webmin (great admin tool I put on every linux
>> > machine) to add simple startup and shutdown script so now the pi can
>> > control the relay that controls its own 2x12v 40mm fans I put on for
>> > cooling (going to use this outside or in a hot vehicle in florida for
>> > remote rig control).
>> >
>> >
>> >
>> >
>>
>>
>> --
>> G.D. Greenwell
>> C: +1.240.472.3941
>> grant.d.greenwell@...
>>
>>
>>
>>
>
>
>
>
--
G.D. Greenwell
C: +1.240.472.3941
grant.d.greenwell@...
|
So right now the pi won't turn on if the 12V plug is energized (no power --> power) like if you were using the 5V port on the actual Pi board. You have to use the button or a IR remote. I was wondering if your GPIO endeavors were able to find a solution to this.
toggle quoted message
Show quoted text
On 6/3/20, Randon Loeb <randonloeb18@...> wrote: What exactly are you trying to accomplish and what do you mean by "hot plug?"
On Wed, Jun 3, 2020 at 1:26 PM Grant Greenwell <grant.d.greenwell@...> wrote:
On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
I'm not familiar with that hat (in full disclosure, more a microcontroller
guy than rpi).
What does it do, or where are its specs online?
On Wed, Jun 3, 2020 at 10:16 AM Grant Greenwell <grant.d.greenwell@...> wrote:
That sounds amazing - would it enable "hot plug" for the 12V makerpi hat as well I presume?
On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
Well to answer my own question, the raspbian OS comes with command line
"gpio" utility that is pretty cool, except for some weird pin mapping convention.
Was able to easily use webmin (great admin tool I put on every linux machine) to add simple startup and shutdown script so now the pi can control the relay that controls its own 2x12v 40mm fans I put on for cooling (going to use this outside or in a hot vehicle in florida for remote rig control).
-- G.D. Greenwell C: +1.240.472.3941 grant.d.greenwell@...
-- G.D. Greenwell C: +1.240.472.3941 grant.d.greenwell@...
-- G.D. Greenwell C: +1.240.472.3941 grant.d.greenwell@...
|
The relay I use needs not just a gpio pin, but also 5v power to function. So the pi can cut its power, but it cannot turn it on (I'm going to use a separate esp module and relay to do that in my project).
That board seems to have everything exposed, can you not just bypass/jumper the switch so it is always closed?
toggle quoted message
Show quoted text
So right now the pi won't turn on if the 12V plug is energized (no
power --> power) like if you were using the 5V port on the actual Pi
board.? You have to use the button or a IR remote.? I was wondering if
your GPIO endeavors were able to find a solution to this.
On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
> What exactly are you trying to accomplish and what do you mean by "hot
> plug?"
>
> On Wed, Jun 3, 2020 at 1:26 PM Grant Greenwell
> <grant.d.greenwell@...>
> wrote:
>
>>
>>
>>
>>
>>
>> On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
>> > I'm not familiar with that hat (in full disclosure, more a
>> microcontroller
>> > guy than rpi).
>> >
>> > What does it do, or where are its specs online?
>> >
>> > On Wed, Jun 3, 2020 at 10:16 AM Grant Greenwell
>> > <grant.d.greenwell@...>
>> > wrote:
>> >
>> >> That sounds amazing - would it enable "hot plug" for the 12V makerpi
>> >> hat as well I presume?
>> >>
>> >> On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
>> >> > Well to answer my own question, the raspbian OS comes with command
>> line
>> >> > "gpio" utility that is pretty cool, except for some weird pin
>> >> > mapping
>> >> > convention.
>> >> >
>> >> > Was able to easily use webmin (great admin tool I put on every linux
>> >> > machine) to add simple startup and shutdown script so now the pi can
>> >> > control the relay that controls its own 2x12v 40mm fans I put on for
>> >> > cooling (going to use this outside or in a hot vehicle in florida
>> >> > for
>> >> > remote rig control).
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> G.D. Greenwell
>> >> C: +1.240.472.3941
>> >> grant.d.greenwell@...
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> >
>>
>>
>> --
>> G.D. Greenwell
>> C: +1.240.472.3941
>> grant.d.greenwell@...
>>
>>
>>
>>
>
>
>
>
--
G.D. Greenwell
C: +1.240.472.3941
grant.d.greenwell@...
|
Interesting thought - it¡¯s a push-button switch. ?I¡¯ve got a spare board so I can certainly try it. ?I¡¯m a noob when it comes to that kind of stuff however.
toggle quoted message
Show quoted text
The relay I use needs not just a gpio pin, but also 5v power to function. So the pi can cut its power, but it cannot turn it on (I'm going to use a separate esp module and relay to do that in my project).
That board seems to have everything exposed, can you not just bypass/jumper the switch so it is always closed? So right now the pi won't turn on if the 12V plug is energized (no
power --> power) like if you were using the 5V port on the actual Pi
board.? You have to use the button or a IR remote.? I was wondering if
your GPIO endeavors were able to find a solution to this.
On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
> What exactly are you trying to accomplish and what do you mean by "hot
> plug?"
>
> On Wed, Jun 3, 2020 at 1:26 PM Grant Greenwell
> <grant.d.greenwell@...>
> wrote:
>
>>
>>
>>
>>
>>
>> On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
>> > I'm not familiar with that hat (in full disclosure, more a
>> microcontroller
>> > guy than rpi).
>> >
>> > What does it do, or where are its specs online?
>> >
>> > On Wed, Jun 3, 2020 at 10:16 AM Grant Greenwell
>> > <grant.d.greenwell@...>
>> > wrote:
>> >
>> >> That sounds amazing - would it enable "hot plug" for the 12V makerpi
>> >> hat as well I presume?
>> >>
>> >> On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
>> >> > Well to answer my own question, the raspbian OS comes with command
>> line
>> >> > "gpio" utility that is pretty cool, except for some weird pin
>> >> > mapping
>> >> > convention.
>> >> >
>> >> > Was able to easily use webmin (great admin tool I put on every linux
>> >> > machine) to add simple startup and shutdown script so now the pi can
>> >> > control the relay that controls its own 2x12v 40mm fans I put on for
>> >> > cooling (going to use this outside or in a hot vehicle in florida
>> >> > for
>> >> > remote rig control).
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> G.D. Greenwell
>> >> C: +1.240.472.3941
>> >> grant.d.greenwell@...
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> >
>>
>>
>> --
>> G.D. Greenwell
>> C: +1.240.472.3941
>> grant.d.greenwell@...
>>
>>
>>
>>
>
>
>
>
--
G.D. Greenwell
C: +1.240.472.3941
grant.d.greenwell@...
|
If it's a momentary switch (i.e. doesn't latch) then jumpering it might not be the answer. I can't speak to the hat and all it's features, but if all you really want is the 12v->5v buck converter, it should be fairly?straightforward to bypass whatever the "real" switch is and just feed the 5v into the pi direct. Or, you could insert a relay of your own so the pi can turn itself off etc.
I'd be surprised if others haven't already modded the hat to behave how you want. Good luck.
For my project I just use separate 12v->5v converter, was like $7 on amazon and handles up to 15A so I can hook other 5v stuff up too besides the pi, and control them all with one relay on a separate microcontroller.
toggle quoted message
Show quoted text
Interesting thought - it¡¯s a push-button switch.? I¡¯ve got a spare board so I can certainly try it.? I¡¯m a noob when it comes to that kind of stuff however.
The relay I use needs not just a gpio pin, but also 5v power to function. So the pi can cut its power, but it cannot turn it on (I'm going to use a separate esp module and relay to do that in my project).
That board seems to have everything exposed, can you not just bypass/jumper the switch so it is always closed? So right now the pi won't turn on if the 12V plug is energized (no
power --> power) like if you were using the 5V port on the actual Pi
board.? You have to use the button or a IR remote.? I was wondering if
your GPIO endeavors were able to find a solution to this.
On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
> What exactly are you trying to accomplish and what do you mean by "hot
> plug?"
>
> On Wed, Jun 3, 2020 at 1:26 PM Grant Greenwell
> <grant.d.greenwell@...>
> wrote:
>
>>
>>
>>
>>
>>
>> On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
>> > I'm not familiar with that hat (in full disclosure, more a
>> microcontroller
>> > guy than rpi).
>> >
>> > What does it do, or where are its specs online?
>> >
>> > On Wed, Jun 3, 2020 at 10:16 AM Grant Greenwell
>> > <grant.d.greenwell@...>
>> > wrote:
>> >
>> >> That sounds amazing - would it enable "hot plug" for the 12V makerpi
>> >> hat as well I presume?
>> >>
>> >> On 6/3/20, Randon Loeb <randonloeb18@...> wrote:
>> >> > Well to answer my own question, the raspbian OS comes with command
>> line
>> >> > "gpio" utility that is pretty cool, except for some weird pin
>> >> > mapping
>> >> > convention.
>> >> >
>> >> > Was able to easily use webmin (great admin tool I put on every linux
>> >> > machine) to add simple startup and shutdown script so now the pi can
>> >> > control the relay that controls its own 2x12v 40mm fans I put on for
>> >> > cooling (going to use this outside or in a hot vehicle in florida
>> >> > for
>> >> > remote rig control).
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> G.D. Greenwell
>> >> C: +1.240.472.3941
>> >> grant.d.greenwell@...
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> >
>>
>>
>> --
>> G.D. Greenwell
>> C: +1.240.472.3941
>> grant.d.greenwell@...
>>
>>
>>
>>
>
>
>
>
--
G.D. Greenwell
C: +1.240.472.3941
grant.d.greenwell@...
|
Great topic. I don't really have a battery back-up system in the shack. But with all the power outages in my area lately, been thinking about a PWRgate with AGM battery. More than operating for EmComm, I really need something for basic power for my work laptop & phone w/ wifi hotspot. Thus, it would be good to build a down converter hub for 12V to 5v USB power to operate all my 5V devices. The laptop battery generally lasts all day.
|
Here's the 12v to 5v converter I'm going to try, not easy to find cheap converters that are rated to handle a raspberry pi or two plus some other microcontrollers using wifi, the amps add up quick:?
Just going to diy a hub with some female usb a connectors I have lying around, 3d print a case.
I don't know if smart phones & other devices can still safely use "naked" 5v sources like this, or need "smart" charging ports. I don't plan on using it for phone charging, just?rpis.
toggle quoted message
Show quoted text
Great topic. I don't really have a battery back-up system in the shack. But with all the power outages in my area lately, been thinking about a PWRgate with AGM battery. More than operating for EmComm, I really need something for basic power for my work laptop & phone w/ wifi hotspot. Thus, it would be good to build a down converter hub for 12V to 5v USB power to operate all my 5V devices. The laptop battery generally lasts all day.
|
That¡¯s the same one I have to build a similar ¡°usb power rail¡±. So far, I haven¡¯t used it.?
toggle quoted message
Show quoted text
On Jun 5, 2020, at 17:16, Randon Loeb <randonloeb18@...> wrote:
? Here's the 12v to 5v converter I'm going to try, not easy to find cheap converters that are rated to handle a raspberry pi or two plus some other microcontrollers using wifi, the amps add up quick:?
Just going to diy a hub with some female usb a connectors I have lying around, 3d print a case.
I don't know if smart phones & other devices can still safely use "naked" 5v sources like this, or need "smart" charging ports. I don't plan on using it for phone charging, just?rpis.
Great topic. I don't really have a battery back-up system in the shack. But with all the power outages in my area lately, been thinking about a PWRgate with AGM battery. More than operating for EmComm, I really need something for basic power for my work laptop & phone w/ wifi hotspot. Thus, it would be good to build a down converter hub for 12V to 5v USB power to operate all my 5V devices. The laptop battery generally lasts all day.
|