Both n transistors have no base resistor. Take 220 ohm.
Does N stand for NPN or for PNP?
I suggest uou rewire your breadboard with plus on top and gnd on bottom...
Also add a schemayic (pen paper picture is fine).
Why is your motor controlled with a high side and a low side switch?
What is the type number of your transistors?
Are they still alive? The missing bas resistors might have killed them...
You have not defined the part number for the transistors.
You need resistors in the base circuits of the transistors. Transistor base to emitter voltage max's out as about 0.7V Your Arduino will not be able to force it to 5v so one or the other will loose.
You should attempt to keep your breadboard wires short. These solderless breadboards are not good with high currents.
Please state the goal / desired function.
What is the external power supply supplying? 5V or 12V or ??
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
Your Fritzy tells us nothing about the transistor part numbers or characteristics.
Hey everyone, thanks for all the responses. I know this is a really weird circuit but it is meant to be part of a bigger one shown below. I am trying to design a 3-phase h bridge to control a bldc motor I am making.
I want to use 12V to run the motor. I am using 3 dc motors in this diagram to simulate the coils.
In terms of parts, I am using TinkerCad right now to design it so the transistor types don't go further than NPN and PNP and the resistor is just a resistor with no specific value. In the diagram I show, N is NPN and P is PNP. When I actually physically build out the circuit I am planning on using a 2N2222 as the NPN and a 2N3906 as the PNP.
I'm using the NPN connected to the PNP to trigger it since my 5V on the Arduino is too low compared to the 12V.
The circuit I originally posted is just to simulate one phase. I feel that if I can get that working, I can get the circuit below working. But please let me know if I'm wrong. Also, if anyone has an idea of how I can change my h bridge below please let me know.
Without hall sensors, the processor must monitor the unpowered leg to determine where the rotor is. I do not believe the UNO is capable of such a design.
Driving a brushless motor is not for the faint of heart. There is a lot going on to essentially replace what would be the brushes with electronic switching. A hall sensor could monitor the rotor location so you know when to switch to the next phase. In addition you need to PWM the drive signal, else the motor will not be speed controllable.
My goal is to do something similar to what this guy did:
He seems to be using mosfets, which I understand I might have to use. But I don't believe he used a hall sensor and just timed the PMW signals through the coils.
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
That way you can draw correct symbols and label pin and lead names to make your project easier to comprehend.
Especially power flow, as the base signal levels on the BJTs from the controller are 5V and you are trying to turn ON and OFF BJTs connected to 12V.
The YouTube used MOSFETs, which are a better idea.
Unfortunately there is no schematic that I can see.
You could test your physical motor for now using an r/c ESC, which are cheap and work very well. You can get units that handle reasonable voltage and current.
The software for ESCs is also open source in several different r/c ecosystems, I use BLHeli and have looked at the code and suggest to you to do the same. Read that code, that is.
Hi Everyone, I have made some changes since my last post. I have changed my circuit and built it out but it is not working. From my power supply, I can see that current is flowing but the coils do not seem to be magnatized. The coils are 24 gauge wire with 200 turns. The transistors used are:
For NPN - 2N2222A
For PNP - 2N3906
I am using the NPN transistor to activate the PNP for low side swithcing since I am trying to run the motor at 12V and the arduino wouldn't be powerful enough to activate the PNP itself. As shown in the diagram, I have coil pairs wired in series and then the pairs themselves connected to the circuit in parallel.
Attached is the circuit diagram, a photo of the current set up and the code. Please let me know your thoughts and if I should provide any more information.
//Sequence BAC or CBA or ACB
bool active = true; // Assume always active since no potentiometer to deactivate it
unsigned int Delay = 1000; // Initial delay
unsigned int min_delay = 1000; // Minimum delay, starting point
unsigned int max_delay = 3000; // Maximum delay to ramp up to
int delay_increment = 10; // Increment to increase delay
int duty = 110;
int cycle = 420;
unsigned int actual_time, prev_time, prev_time_2, prev_time_3;
int phase = 0;
void setup() {
Serial.begin(9600);
pinMode(4, OUTPUT); // Pin 4 as OUTPUT
pinMode(5, OUTPUT); // Pin 5 as OUTPUT
pinMode(6, OUTPUT); // Pin 6 as OUTPUT
digitalWrite(4, LOW); // Set Pin 4 to LOW
digitalWrite(5, LOW); // Set Pin 5 to LOW
digitalWrite(6, LOW); // Set Pin 6 to LOW
Serial.println("READY");
actual_time = micros();
prev_time = actual_time;
prev_time_2 = actual_time;
prev_time_3 = actual_time;
}
void loop() {
// Continuously increment delay within bounds
Serial.print("Hello");
if (Delay < max_delay) {
Delay += delay_increment;
}
// } else {
// Delay = min_delay; // Reset to minimum once max is reached, if continuous cycling is desired
// }
if(active) { // Active is always true
Serial.print("Ready");
actual_time = micros();
if(actual_time - prev_time >= Delay) {
prev_time += Delay;
phase++;
if(phase > 2) {
phase = 0;
}
}
if(actual_time - prev_time_2 >= cycle) {
prev_time_2 = prev_time_2 + cycle;
switch(phase) {
case 0:
digitalWrite(5, LOW);
digitalWrite(6, LOW);
digitalWrite(4, HIGH);
Serial.print("4 is on");
break;
case 1:
digitalWrite(4, LOW);
digitalWrite(6, LOW);
digitalWrite(5, HIGH);
Serial.print("5 is on");
break;
case 2:
digitalWrite(4, LOW);
digitalWrite(5, LOW);
digitalWrite(6, HIGH);
Serial.print("6 is on");
break;
}
delayMicroseconds(duty);
digitalWrite(4, LOW);
digitalWrite(5, LOW);
digitalWrite(6, LOW);
delay(10); // A short delay to allow for a visible observation of the LED state change
}
}
}
Hi Tom, I have attached some more information including a schematic. I am using bjts since I have them on hand but if this doesn't work, maybe I'll be forced to switch. Thanks for your help!