Transistors are solid state switchers, that is, they don't have any moving parts. MOSFETS are like transistors, but are rated for higher voltages. Relays are more expensive, but they have moving parts.
Transistors and MOSFETS produce a lot of heat. They have 3 pins (usually) called the base, emitter, and collector. More info here
Relays use a magnet to ...
It's a P-channel MOSFET. It's job is to act as a "dropless" diode.
The principle is this:
MOSFETs have a built-in diode across them in reverse bias (an effect of the chemistry)
The P-channel MOSFET is connected backwards in series with the incoming USB power.
The internal diode conducts power when there is +5V in to the USB to give power to the board.
If I understand your writeup correctly, this is what you have built:
simulate this circuit – Schematic created using CircuitLab
What you didn't mention in your question is that you made a connection from Arduino ground to the base of the transistor and the seconds circuit's ground connection. I drew the extra lead 'loose' for illustration only, but ...
I see a couple of issues here, which are related to your questions. I will use numbers here, but these do not necessarily correspond to the numbers you have used when asking.
The first thing you need to do when controlling a motor is to know it maximum stall current. The stall current is the current that will circulate through the motor (and through the ...
Without a common reference (ground) between the Arduino power supply and the external power-supply, again, you have a floating base, as you can't know what the Arduino's 5v output (or local ground) looks like to the external circuit.
Connect the two grounds. That should correct the LED brightness with respect to the Arduino output pin level. Then, if you ...
Is there the only wire from Arduino to the Base of Transistor?
Basically you need something like this:
If you reverse the transistor (E and C), builtin protection diode will be in forward direction, so electro magnet is on.
If you have only one wire to the base, it cannot work as you need current to the base.
If you don't have R1 into the base (about ...
Your amplifier arrangement is fundamentally flawed. At the moment you are "tickling" the top end of the electromagnet in the speaker - that is, you are energising it when the Arduino outputs a HIGH, and leaving it energised to de-energise by itself when the Arduino outputs a LOW. Coupled with that the fact that a PCM file outputs PWM with a carrier ...
First you should consider changing your whole idea so that your LEDs don't draw nearly 10A.
I am assuming that for each segment you have 14-20 LEDs wired in parallel, each with its own current limiting resistor. That is very wasteful.
Instead you should be grouping the LEDs in chains of series LEDs which you then place in parallel.
Assuming you have ...
From your schematics it looks like:
you connected the power supply backwards (on both schematics actually, I wonder how come you did not fry your Arduino)
the external supply and the Arduino do not share a common ground as they should.
Edit: about the orientation of the power supply:
the (−) side of the supply (and GND of the Arduino) should be connected ...
No, you can't vary the voltage with a relay. The only way you could do it with a relay would be to have a selection of different voltages available, and then use multiple relays to select which voltage is used. Less than ideal.
You need to use PWM to create a square wave with varying duty cycle. The duty cycle (the percentage of time the power is on within ...
Under normal operation the + connection of any inductive component (motor, relay, etc) is at a higher potential than the - connection.
During a "back EMF" event (the collapsing of the magnetic field) a large voltage of the opposite potential is generated. That means that the - connection suddenly becomes a much higher potential than the + connection.
The good advice to people asking how to drive a relay to control mains voltage is: don't.
Start with a complete solution such as those from PowerswitchTail.com and sold by many places: Powerswitch Tail
You can get these already built or in kit form. The 20 $ price is small price compared to damage to people or home you might incur with a home built ...
Seeing as you want to use a 12V battery, you should try an external motor controller. You would essentially connect the Arduino to the controller, then the external battery and motor to the controller. Dimension Engineering makes several high quality motor controllers that are compatible with Arduino and can handle the voltage (like this controller). The ...
By sheer luck your lock solenoid looks very similar to this one (similar spec too "Draws 650mA at 12V") and they have a working circuit for it over here so look at that and see what they used to drive it. Apparently it's a TIP120, so the peak/draw current is probably higher than that ballpark figure, which I suspect is for the hold.
Overengineering the ...
That isn't just a relay you are linking to. That's an entire board that, among others, contains a relay (blue box). This board already has a transistor to drive the coil inside the relay. It also has a diode to handle back EMF.
It even has a opto-coupler, thought that isn't that useful as in most cases both sides of the opto-coupler are powered by the same ...
Sounds like you have guessed it: although it's very hard to say from those photos, it doesn't look like you have the circuit grounded.
Connect a ground from the Arduino to the black wire from the battery.
Increasing the power to the LED isn't the best way of increasing the distance. In fact it's the worst way.
The 100mA is only for a small duty cycle. You can power it with 100mA but only for a fraction of the time. The overall average light output won't be any more than at 30mA.
The problem you are actually suffering from is the fact that your receiver can'...
Try using pin 3 (or 11) and lower the prescaler of timer 2 using the following code in your setup;
//move from /64 prescaler to /32 prescaler
TCCR2B |= _BV(CS20);//set bit (remove this line for a /8 prescaler)
TCCR2B |= _BV(CS21);//set bit
TCCR2B &= ~_BV(CS22);//clear bit
Halving the prescaler will double the frequency.
You should have a resistor of a few hundred ohms on the base connection of the transistor - that is, between base and pin 13.
A PNP transistor is somewhat harder to get to grips with than an NPN transistor. Much of it does things backwards.
The operation you see seems to be completely correct when you understand how a PNP works.
With and NPN transistor a ...
Big differences between relays and transistors are:
relays are all-or-nothing (like switches) whereas transistors can transmit more or less current through the collector based on the current present on their base.
relays provide isolation between the command circuit (the one with the electromagnet) and the controlled circuit (the one on the switch side of ...
Using an IR library as mentioned in a previous answer is likely to be about the best approach. However, if you decide to use electronic switches to jumper across the remote's switch contacts, consider using CMOS analog switch chips for the purpose. If each button on the remote connects one contact to a common net, inexpensive chips like 74HC4051 and ...
If you're just running lines to the buttons, you won't need to power the remote from the arduino. You could just let it keep the internal batteries. But it would be possible to wire it up for power as well.
As a learning project, you could just take it apart and see if you can access the button contacts. See if the contacts are split. If so, shorting ...
You simply need to ground the circuit. In row E on your breadboard just under where you connect the - of the battery, connect that to the ground pin on the UNO. This causes the buzzer to start working.
Here is a diagram from Peter Bennett's answer to an Electronics Stackexchange question, How much voltage to give my IR LED?:
As you can see, the current-limiting resistor is in series with the IR LED and the transistor's collector. The base resistor is large relative to the current limiting resistor, because this transistor amplifies base current by a ...
To use an NPN, connect a power rail of 5V to the pump's positive terminal, and from its negative terminal wire it to the transistor's collector pin. Wire emitter to GND, and place a >=220 ohms resistor between your arduino control pin and the transistor base.
If instead using an N-channel MOSFET, wire load to drain, source to GND, and use a 4K7 pull-down ...
There are many bad schematics and pictures online, and these pictures are really bad.
Do not try to make that. You may damage the Arduino board and the transistor.
Even the picture of the BC548 is wrong. The BC548 is always
called "BC548" and never "BC-548".
The BC548 is not a good choice to drive a motor. It can only
do 100 mA continuous.
The DC barrel ...
Please do not upvote this answer.
This is an expansion of @Krol's answer.
Krol may incorporate this material in his answer if he wishes.
The image below shows a typical relay module which is able to be driven by logic level / GPIO signals from typical microcontrollers.
The relays have 5V coils and there are optocouplers and drive transistors between the ...
You can interface with the fog machine's button by:
Use a Relay (this will isolate the fog machine's circuit from your Arduino's)
Use a Servo to physically press the button on the fog machine
I believe those would be the simplest and most generic.
While the motor is being powered the current flows from Vcc to GND as in this circuit:
When the power is disconnected (such as the transistor in the ground connection in your circuit is switched off) amongst other things (including the collapsing of magnetic fields) the spinning of the motor turns it into a generator. The power generated is the opposite of ...