Making a new project, need a bit of help...

Hi all,

So recently I had the idea of making a project where I have an IR remote and I can press one of the buttons and it turns on my computer. I was thinking of making this more fun by having an IR remote send a signal to an IR detector, which then turns on a piston/solenoid type thing to press the on button on my computer.

The part I’m currently stuck on is figuring out how to make an efficient circuit with good power usage, but I don’t know how to figure all that out. I don’t know if I should use a Nano to make it more compact, or an Uno for more power for the button presser or something. The second problem I’m having is figuring out how to get the button pressed. I did a bit of research online and found that a solenoid would possibly be a good pick to use for this. Should I use a solenoid or something else?

Sorry if this is complicated, I’ll gladly try my best to explain it to anyone that needs help.
Thanks so much!

So much depends on the shape and mounting of the switch you need to push and how long it needs to be pushed and how much force is needed.

Paul

It’s just a simple circle shaped button, and it just needs to be pressed for like half a second and with a small amount of force and then it turns on.

i guess whether you can use a solenoid or a servo actually depend on the geometry of the button you have , but i think a combination of a PIR and a Servo like this might work :

Would using a servo be a better option? The main reason I want to use a solenoid here is just because I’ve never used one before, and I’m curious as to how they work. The button is just a circle on a flat surface that you press down. And do you think like a Nano would be able to handle this type of output or should I use something more like an Uno?

Do you have access to the switch electrical terminals. You could put a relay in parallel with the switch.

Whether you use a nano or a UNO makes no difference to driving a servo or solenoid - in both cases you should use an external
Power supply to power it .

I would go with the relay option. Mount the relay inside the PC and bring the wires to the coil out to a front panel socket and plug whatever you design into that . The relay contacts connected across the PC switch .

ProDCG:
I don't know if I should use a Nano to make it more compact, or an Uno for more power for the button presser or something.

So you really have no idea at all what a microcontroller is then? :roll_eyes:

I do know what a microcontroller is, I'm just still learning all the electrical parts about it.

So just for clarification, and correct me if I'm wrong, I have say a Nano, I hook up a 5v relay or whatever relay that I need to that, and then I attach the solenoid/servo to the relay? And then what would the external power source be? Something powered by like batteries or something or like a wall plug type thing?

Sorry for all the questions, I'm just still learning how to plan all these things out and I'm just making sure I make a circuit that doesn't have any major problems when I make it.

Servos and solenoids are different things!

And switching on a PC is another matter again.

A servo (common "hobby" servo) requires a 6 Volt power supply with at least 1 Amp rating. On the other hand, it requires only a control signal which the Nano (which is for all intents and purposes, functionally identical to a UNO but in a smaller and more practical package, generally cheaper) can directly provide. You connect the chosen Nano output pin to the servo control pin and the Nano ground to the servo negative supply.

If you were to use a relay, the Arduino cannot supply sufficient current to operate the relay coil so you need a transistor to switch the necessary current. In practice, you use a relay module (generally a 5 V version) which incorporates the transistor and requires a suitable power supply to provide that current. If you have a 5 V power supply such as a USB "phone charger" to power the relay module and the Nano (via the "5V" pin) that would be fine.

If you were to use a solenoid, it would require substantially more current again and of course, you would need a transistor - nowadays a "logic-level" MOSFET - to control it. These again are available as ready-assembled modules

Now if you only want to switch the PC on and off without the pyrotechnics, then you only need to connect a switching device across the terminals of the power button inside the PC - and inside the PC you also have a"pilot" 5 V supply to power the Arduino itself. The switching device could be a relay but it is simpler just to use a transistor which is - again - controlled by an Arduino output pin.

Turning power on and off to a PC is not a great idea. Thats why windows has "shutdown" and "sleep" functions.

You would find it easier to "sleep" and "wake" the computer and if you wanted to be really clever could use a NODEmcu and turn on and off from any wifi conencted device such as a smartphone.

Here is an example that turns LEDs on and off but you could use it with the serial output to issue sleep and wake commands to the PC.