PC Light Gun - Page 1
Forum section: electronics / beginners

author: wallmachine
author_rank: Newbie
timestamp: April 23, 2020, 02:47:17 am
content: Is someone able to confirm I am wiring the components correctly or can be done better, see thediagramof how I have wired the components so far.For the solenoid, button and micro switch I am following theseinstructionsHow can I determine I am using the correct resistor value for the LEDs?Is the 36v PSU too much for the 24v solenoid?Does the solenoid require a fuse? if yes in-between which components would it be best connected?With the vibration motor to work on trigger is it correct for the wire to go to the 24v and 5v point on the terminal block or does it require to go to 24v and GND?Does the vibration motor require a diode, if yes in-between which components would it be best connected?Does the 5 Core cable need to be shielded or can it be un-shieldedThanks.

author: KMoffett
author_rank: Regular Contributor
timestamp: April 23, 2020, 03:28:01 pm
content: No diagram in your post.

author: wallmachine
author_rank: Newbie
timestamp: April 23, 2020, 10:22:01 pm
content: Quote from: KMoffett on April 23, 2020, 03:28:01 pmDo you mean an actual schematic? As in the first line I included a 'diagram' of how I have wired it.

author: Manul
author_rank: Super Contributor
timestamp: April 23, 2020, 10:57:09 pm
content: To be honest, that diagram is really hard to follow...I will answer some questions.LED resistor. Let's say you want 10mA LED current. If power source is 5V and LED forward voltage is ~2V, you need voltage drop of 3V. By Ohm's law then 3V / 0.01A = 300 Ohms resistor. Calculate for your needs, but there is a limit, because you drive directly from MCU. I would not go above 10mA.36V PSU is most likely too much for 24V solenoid.Put fuse on the power input of your unit not on a solenoid.Edit: I saw you have two LED's in series, so you need to use double forward voltage in your calculation.

author: wallmachine
author_rank: Newbie
timestamp: April 24, 2020, 12:28:50 am
content: Quote from: Manul on April 23, 2020, 10:57:09 pmSorry about that never drew an actual schematic I will try and draw one up.Quote from: Manul on April 23, 2020, 10:57:09 pmI was thinking would the Power Supply fuse be enough?

author: Manul
author_rank: Super Contributor
timestamp: April 24, 2020, 12:48:47 am
content: It is good practice to divide a design into separate blocks, each having some specific function. That way it is easier to think, solve problems separately and when all building blocks works as intended, join them together.Normally you select a fuse based on maximum current your device will use. So if it uses max 0.5A, select like a 1A fuse. Power supply fuse is ok, but if it is too high current, for example 5A, it will not be as good for protection as a fuse optimized for a particular case.

author: wallmachine
author_rank: Newbie
timestamp: May 04, 2020, 10:07:09 am
content: Quote from: Manul on April 24, 2020, 12:48:47 amFinally finished thenew diagram, hope its easier to follow (note I didn't know how to draw the components on the Arduino and leds so I left as image). Does the connections look okay?Questions I have.- With the R260 - Strong Vibration Mini Motor (DC 12V-24V) does it connect to 24v or 5v? Also is a diode required, if yes where should I connect it in-between?Thanks

author: Manul
author_rank: Super Contributor
timestamp: May 04, 2020, 11:57:27 am
content: What is switching your vibration motor? Or is it ON all the time? Do not connect it to 5V. Use 12 or 24V as written on your part. You can add diode like in the picture (so it clamps backwards voltages). Especialy if something is switching this motor.

author: Mp3
author_rank: Frequent Contributor
timestamp: May 05, 2020, 10:40:07 am
content: I would use a potentiometer in place of the LED resistors and dial in the brightness you like, then pick resistors from there.That's how i've been doing it any time i run into a build without specified LED resistance values.