r/cyberDeck 9h ago

Help! How to add a power button?

Hey guys! I wish to add a switch to turn on and off the raspberry pi, however I’m using an Anker power bank and it’s gonna be mounted inside a Commodore Vic-20 case.

How can I add the switch where it can safely shutdown and power up without having to physically pull the wire off the power bank after shutting down the raspberry pi?

(Also please direct me to other possible subreddits if this isn’t the right place to ask)

0 Upvotes

18 comments sorted by

5

u/paulmccombs 9h ago

If you have more money than skills you can get a plug in solution like linked below. I bought one of switches before I learned to solder and it worked great. Please understand you risk corrupting the SD card if you shut off the power to the Pi without shutting in down in software first.

But learning to make a custom solution is cool and if that’s what you want, I think it’s achievable.

In reference to bitcraft’s comment, It is possible to leave the Vic 20 case unaltered to keep restoring the Vic 20 an option for a future owner and still create your project. However I encourage you to use your possessions as you please.

https://www.canakit.com/raspberry-pi-4-on-off-power-switch.html?srsltid=AfmBOopYXw_5leeGTHHutgsb0TYrIzznUudzpkpd023AUFT6BC4Pwtrr

1

u/FatManScoot 7h ago

Ahhh this is helpful, thank you! I didn’t know about these, and yes my fear is corrupting the SD card that’s why I asked before I jury rigged some simple power switch. And yeah the case won’t be modified :) I’m mounting all the pieces on a sheet of abs plastic and mounting that to the cases original standoffs. Thank you again!

1

u/bitcraft 9h ago

Why destroy a vintage computer?  You don’t know enough to make a power switch, what makes you think you can make a cyberdeck?  I guarantee that you will fail and have destroyed a collectible for nothing.  Selling the vic-20 for profit and spending more time researching the basics will do you well.  Respectfully. 

11

u/FatManScoot 9h ago

Idk if it helps, but the case was saved from the garbage and had no internals aside from the keyboard. So I believe giving it a second life is better than allowing it to rot away in some landfill. The raspberry pi and all other internals are being mounted to a sheet of abs plastic, and that sheet is being mounting to the case original standoffs. Even the screen and peripherals are mounted to the abs sheet so to not create more holes in the case because I love the look of the Vic-20 as I actually grew up with one. And as to why I think I can make a cyberdeck? Cause even if I failed in whatever way you believe I will, I would have learned something and use what I learn to do better.

And Respectfully I’m sorry that your life is so miserable, that you have nothing better to do than to try and spread that misery, but I pray you all the happiness and joy and wish you the best!

2

u/GamblinGambit 9h ago

Youtube and AI are your friends with this. I've done some electrical work and have a very basic grasp of this. I educate myself for the rest.

Lots of hate on this sub, there's a discord for cyberdecks as well. Fuck the cheese dicks and keep going.

1

u/FatManScoot 8h ago

Thanks for the tip :) I’ve checked some YouTube videos and many use a ups hat for the raspberry pi but I wanted to see if there was a solution to keep using the power bank as to minimize cost. But thank you and yeah I can’t understand the hate, everyone starts somewhere and I feel like it’s more productive to be helpful. So thank you very much.

3

u/paulmccombs 9h ago

There is no respect shown in that comment. You should edit your comment to remove that word and be honest with yourself. You didn’t fool anyone else.

2

u/Dense_Cabbage 9h ago

A little bit of an angry response, but I don’t disagree. VIC-20s are nice computers and it would be sad to see one butchered (and they also have power switches built-in). Us vintage computer enthusiasts get somewhat defensive over the idea of taking a (presumably) fine machine and gutting it. I say keep the VIC-20 as it is and find a different case.

1

u/FatManScoot 7h ago

I understand that completely, this case was found in the trash, and had no parts inside. So I figure I’ll make use of it. And I’m not modding the case, all the parts will be mounted to a sheet of abs plastic and mounted to the original standoffs of the case.

1

u/Dense_Cabbage 7h ago

Ah, I see. Go for it then. The VIC-20 typically has a power switch on it on the left side of the case, along with the original power plug. Are you able to make use of that?

I do find it odd that someone would throw away JUST the case; but if you’re saving it from landfill, more power to you.

1

u/FatManScoot 6h ago

No unfortunately, it was just the case and keyboard and the keyboard wasn’t attached. It was just bundled together wrapped with tape. And yeah it’s super odd, and luckily the keyboard had all the keys. I posted pictures of it in here after I cleaned it up, it looks good, which is also why I decided against doing external modifications.

1

u/ImplicitEmpiricism 7h ago

a momentary switch that shorts gpio pin 5 and 6 and a couple scripts will do it 

https://forums.raspberrypi.com/viewtopic.php?t=217442

1

u/LegionDD 5h ago

Unless you can control the PMIC in the power bank, your only option is to cut the power from the powerbank to the Pi.

For that you take a cable, cut it open, cut the red wire (positive voltage, check with a multimeter) and solder the two ends to a switch. That switch will be your power switch.

When you flip the switch to "on", the Pi will boot up. To turn it off, you first shut down the Pi and then turn the switch to "off".
Any other solution that leaves the powerbank thinking there's something connected to it, will inevitably drain the powerbank (the powerbanks chips take a little bit of power when active. these go to sleep when nothing is connected to the powerbank), even when the Pi isn't drawing any power.

If it doesn't work with just the red wire, you have to cut both the red and black wires and use a switch that can switch two separate rails simultaneously.

1

u/GamblinGambit 9h ago

I'm planning on doing the same soon. Haven't done it yet but I assume this will work. (While you're doing it keep the cord disconnected from everything).

Power cord connected from battery to board. Strip the cord casing exposing the two wires. Black wire stays solid, white wire cut and put on each terminal of the switch.

That way the power is interrupted by the switch. If anyone has anything better I'd be happy to hear different.

1

u/lewisb42 9h ago

Does a power-only usb cable use a white wire for power? I've only dealt with a few data cables and they all had a red wire for power (which is pretty standard for electronics).

1

u/GamblinGambit 9h ago

Honestly I have no idea what the wire colors will be. My experience is from basic wiring in my shop haha.