Using an Arduino for safe shutdown?

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
Post Reply
User avatar
muniosi
Posts: 100
Joined: Sun Jan 08, 2017 10:21 pm
Has thanked: 156 times
Been thanked: 31 times

Using an Arduino for safe shutdown?

Post by muniosi » Wed Jun 28, 2017 5:26 pm

Hey everyone, I'm going to be using an Arduino Uno with an ATMega328P to control a status LED in my GBZ build. Since I already have this, could I use it for a safe shutdown circuit as well? I'm new to Arduino stuff so sorry if this is a dumb question. Thanks!

Edit: I just learned that Helder's AIO board has 4 extra analog inputs in addition to the joystick inputs. Is there any way I could use those for my battery LED and for safe shutdown? Again, sorry if this is obvious.
I've just finished my milk.


User avatar
muniosi
Posts: 100
Joined: Sun Jan 08, 2017 10:21 pm
Has thanked: 156 times
Been thanked: 31 times

Re: Using an Arduino for safe shutdown?

Post by muniosi » Thu Jun 29, 2017 1:10 pm

Lphillimore wrote:
Thu Jun 29, 2017 9:13 am
See here for an awesome solution by HoolyHoo

http://www.sudomod.com/forum/viewtopic.php?f=22&t=2970
Sweet, thanks! Any idea how I would get that to output to an RGB LED instead of an on-screen icon?
I've just finished my milk.

User avatar
HoolyHoo
Posts: 766
Joined: Sat Jul 09, 2016 9:34 pm
Has thanked: 206 times
Been thanked: 741 times

Re: Using an Arduino for safe shutdown?

Post by HoolyHoo » Thu Jun 29, 2017 1:36 pm

muniosi wrote:
Thu Jun 29, 2017 1:10 pm
Lphillimore wrote:
Thu Jun 29, 2017 9:13 am
See here for an awesome solution by HoolyHoo

http://www.sudomod.com/forum/viewtopic.php?f=22&t=2970
Sweet, thanks! Any idea how I would get that to output to an RGB LED instead of an on-screen icon?
You could have the arduino read the analog input of the battery status and then control the led through another pin. Or you can control the led through a gpio of the pi with the information from the arduino. Either way you need to rewrite the code for both to make it do exactly what you want.

User avatar
muniosi
Posts: 100
Joined: Sun Jan 08, 2017 10:21 pm
Has thanked: 156 times
Been thanked: 31 times

Re: Using an Arduino for safe shutdown?

Post by muniosi » Thu Jun 29, 2017 3:48 pm

Thanks for the help guys. This still leaves the question though: is it possible to use an Arduino (or the chip on Helder's board) for a safe shutdown circuit? If so, how would that be done?
I've just finished my milk.

User avatar
HoolyHoo
Posts: 766
Joined: Sat Jul 09, 2016 9:34 pm
Has thanked: 206 times
Been thanked: 741 times

Re: Using an Arduino for safe shutdown?

Post by HoolyHoo » Thu Jun 29, 2017 3:59 pm

muniosi wrote:
Thu Jun 29, 2017 3:48 pm
Thanks for the help guys. This still leaves the question though: is it possible to use an Arduino (or the chip on Helder's board) for a safe shutdown circuit? If so, how would that be done?
Not if your thinking of one that shuts down automatically when you flip the switch like Kite has in his SAIO or with Camble's circuit. That requires extra components. You can use the arduino to provide information on battery status so it performs a safe shutdown in software before battery goes dead. That is done in software with the information from the analog pins of the arduino. If you want a hardware safe shutdown, you will need other components to make that happen.

User avatar
muniosi
Posts: 100
Joined: Sun Jan 08, 2017 10:21 pm
Has thanked: 156 times
Been thanked: 31 times

Re: Using an Arduino for safe shutdown?

Post by muniosi » Thu Jun 29, 2017 4:16 pm

Great, thanks HoolyHoo! I'll look into it some more.
I've just finished my milk.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest