Maker Pro
Maker Pro

Pt carnet be really that hard can it? Help with unusual request!

Sallyfirbs

Jul 6, 2015
1
Joined
Jul 6, 2015
Messages
1
Hi everyone hope someone can help! I need an electrician or some who maybe good at wiring model trains?? I need to wire computer mouse up to turn some lights on for a fish tank, odd I know. It basically a computer turned into a tank and what is when you click a mouse it puts the light on when you release they go off - simple - not! Racked my brains how to do this, basically a micro switch in the mouse somehow spliced into the cable of the lights? Anyone help!!

Sally
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Hi everyone hope someone can help! I need an electrician or some who maybe good at wiring model trains?? I need to wire computer mouse up to turn some lights on for a fish tank, odd I know. It basically a computer turned into a tank and what is when you click a mouse it puts the light on when you release they go off - simple - not! Racked my brains how to do this, basically a micro switch in the mouse somehow spliced into the cable of the lights? Anyone help!!

Sally
Your best solution will be to keep the mouse almost completely stock...
Open it up and unsolder the wires from the board, and wire them directly to the buttons.
There should be 4 wires, so you can easily take care of the Left-Middle-Right buttons.

From there, you can either cut off the other end of the cable (recommended to prevent you from plugging this device into a real computer) or wire an adaptor onto the end of the cable.
The modified wires will then go to a small custom circuit that you design that will use transistors, and optionally a relay that will switch your lights on and off.

*Note that the buttons in the mouse are 'momentary' and the suggested method will result in the lights only coming on while the mouse button is held down. When the button is released the lights will turn off.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Yes, using a 2 button mouse it would be fairly easy to design a left button ON, right button OFF circuit.

I'm thinking (and this is for people other than Sally as I don't have time right now to draw it) a 555 set up so that there is no charge or discharge path, but the threshold and trigger (6 and 2) pins are tied to a voltage divider made up of a pair of 100k resistors. The switches from the mouse are connected from the voltage divider, one to either supply rail, each via their own 1k resistor. The output can drive a relay. A small cap can be added to one leg of the voltage divider to ensure a consistent state at power on. The circuit acts as the bistable that Gryd3 was alluding that was needed.
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Yes, using a 2 button mouse it would be fairly easy to design a left button ON, right button OFF circuit.

I'm thinking (and this is for people other than Sally as I don't have time right now to draw it) a 555 set up so that there is no charge or discharge path, but the threshold and trigger (6 and 2) pins are tied to a voltage divider made up of a pair of 100k resistors. The switches from the mouse are connected from the voltage divider, one to either supply rail, each via their own 1k resistor. The output can drive a relay. A small cap can be added to one leg of the voltage divider to ensure a consistent state at power on. The circuit acts as the bistable that Gryd3 was alluding that was needed.
;) I didn't actually suggest a latch of any sort... I read the ops request as the lights only being momentarily lit until the mouse was let go.

I do certainly think that Left-click on, and Right-click off, would be a wonderful suggestion though ;)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Looks like I was reading too much into it.

What are the lights? Mains overhead lights or just a LED? Or something else?
 
Top