Maker Pro
Maker Pro

Boosting the Amper and altering the frequency

Hello.

I am using Arduino UNO for a hobby project. I send 5V,1000hz signal through its PWM pin to XL6009E1 voltage regulator to boost the output voltage from 5V to 12-35V. It sends a signal for 2sec and waits for 3sec before sending the signal again. The problem is this voltage regulator has fixed 400KHz Switching Frequency whereas I need 1KHz. Other problem is when I measure the amps by using multimeter, It shows that I have 0.08A whereas I need 0.2-0.8A. How can I manipulate these values without going out of 12-35V range? I just ordered bunch of transistors and capacitors with different specs. I am planning to connect them one by one and measuring the values.

My problem is probably easy to solve but please keep in mind that I have very little understanding of how circuits work.

Thanks in advance!
 

Harald Kapp

Moderator
Moderator
What are you trying to achieve?
Knowing what you want to do will help us much more than a description how you do it without knowing to what end (although the how is the next thing we need to know to analyze possible errors).


I send 5V,1000hz signal through its PWM pin to XL6009E1 voltage regulator to boost the output voltage
A circuit diagram will tell us more than words, Please upload a schematic of your circuit.
The problem is this voltage regulator has fixed 400KHz Switching Frequency whereas I need 1KHz.
This is no problem at all. The switching frequency of the module is an internal parameter. The output is a DC voltage. The 400 kHz will show only as a small ripple on top of the DC voltage. This has nothing to do with your 1 kHz control signal.

Depending how you control the voltage regulator with your signal from the Arduino (we need your schematic to know how you do this), you will, however, observe a comparatively slow rise and fall of the output voltage of the regulator. Possibly nit a hard turn-on / turn-off that you expect.

Other problem is when I measure the amps by using multimeter, It shows that I have 0.08A whereas I need 0.2-0.8A.
What are you doing here? show as a schematic of your test setup. The current at the output of the voltage regulator cannot be measured without a load. Usually you attach a load (resistor) and get I = V / R, which is what you measure. With a given voltage, the current is determined by the load.
How can I manipulate these values without going out of 12-35V range?
By using a higher load, i.e. a smaller load resistor value acc. to above equation.
What is your load, btw.?

Note that when you modulate the voltage with teh 1 kHz signal, the current will also be modulated. The effective voltage and thus the effective current will be lower than the values you see with the regulator permanently on. That is why one uses PWM at all.
 
Last edited:
I send 5V,1000hz signal through its PWM pin to XL6009E1
Doesn't sound right. Which pin? That IC has a single feedback pin. The pin voltage is compared internally with a 1.25V reference for adjusting the output voltage of your DC-DC voltage converter. I doubt the output voltage could be modulated at 1kHz.
Edit: The 100n output cap typically used with that IC may prevent it being enabled/disabled at 1kHz using the EN pin.
 
Last edited:
All sounds rather odd to me.
What are you trying to do...really.

What are you trying to achieve?
Knowing what you want to do will help us much more than a description how you do it without knowing to what end (although the how is the next thing we need to know to analyze possible errors).

Hello.

I am trying to build a bee venom collector for my beehive (5x hive) with almost no electrical knowledge. I try to learn while building. After adding necessary components (to increase amps) to the image I posted in this post, I will connect it to my hive. This won't kill the bees, It just make them try to sting the glass where the venom will be accumlated to scrape later. I need to apply 12 to 35V - 1KHz - 0.2 to 0.6A (Range depends on weather. According to Russian beekeapers, It is better to apply low voltage on rainy days.)

I try to use Arduino:

setup:
pinMode(pin_no, OUTPUT);
//t=1/f > time interval in ms
Timer1.initialize(1000);
//Sends pulse to this pin with 100% duty cycle
Timer1.pwm(pin_no, 100);
loop:
onn/off voltage for specific amount of time

On the manual it says that Arduino output voltage is limited to 5V and current is limited to 0.04A per pin. I measured it 0.0816A at the output of the regulator. I need to triple that. I watched a Youtube video where a guy mentions someting called PNP and NPN transistors to increase current.
I ordered bunch of them: Can I increase current by using them? Because no matter the voltage is I always measure the same 0.08A at the output of the regulator. You mentioned about connecting a load there but I don't know how to. I should do a research on that now.
OrderedTransistors.png

regulator.png

design.png
concept.png
 
Last edited:
Is your "XL6009E1" a regulator module, or just the bare IC? If a module (most likely), can you post a link to it?
Sends pulse to this pin with 100% duty cycle
100% is not really PWM; it's plain DC. If you want pulses, 50% would be better.
 
Last edited:

Harald Kapp

Moderator
Moderator
As shown in your image labeled ARD1: This will not work.
The output of the Arduino can not be used as the power input to the regulator. The Arduino delivers 5 V × 0,04 A = 0.2 W. When you try to boost the voltage to 24 V, the current is reduced to less than 5 V / 24 V × 0.04 A = 0.008 A because the power cannot be increased this way. On the contrary, it will decrease due to losses in the converter.

The video you linked shows the correct way to do it: Use the Arduino's output to control the base of a power transistor (or the gate of a MOSFET). The power transistor in turn will turn the main power (5 - 60 V in the video) on and off.
You can use your step-up module to create 24 V from the input power supply of the Arduino (provided you do not have another 24 V source to power the lamp). Then you can control the transistor with your 1 kHz signal.
 
As shown in your image labeled ARD1: This will not work.
The output of the Arduino can not be used as the power input to the regulator. The Arduino delivers 5 V × 0,04 A = 0.2 W. When you try to boost the voltage to 24 V, the current is reduced to less than 5 V / 24 V × 0.04 A = 0.008 A because the power cannot be increased this way. On the contrary, it will decrease due to losses in the converter.

The video you linked shows the correct way to do it: Use the Arduino's output to control the base of a power transistor (or the gate of a MOSFET). The power transistor in turn will turn the main power (5 - 60 V in the video) on and off.
You can use your step-up module to create 24 V from the input power supply of the Arduino (provided you do not have another 24 V source to power the lamp). Then you can control the transistor with your 1 kHz signal.

Thanks. I am so new to electronics. I hope I succeed. I will learn about what you have mentioned above in the time I wait for the arrival of my transistors.


Is your "XL6009E1" a regulator module, or just the bare IC? If a module (most likely), can you post a link to it?

100% is not really PWM; it's plain DC. If you want pulses, 50% would be better.

Thanks.

I bought it from this website: https://www.robotistan.com/ayarlanabilir-step-up-boost-voltaj-regulator-karti-xl6009-4-a
They sent me xl6009e1 instead of xl6009.
Datasheet: https://www.pollin.de/productdownloads/D351434D.PDF
 
That's useful info.
This won't kill the bees, It just make them try to sting the glass where the venom will be accumlated to scrape later.
Glass isn't conductive. What sort of electrodes will you use? Is the 0.2A-0.6A flowing through the bees? if not (seems unlikely), where is it going?
 
That's useful info.

Glass isn't conductive. What sort of electrodes will you use? Is the 0.2A-0.6A flowing through the bees? if not (seems unlikely), where is it going?

Glass will be surrounded by "resistance wire" (I'm not sure If this is correct translation to English) like in this video:

 
The video you linked shows the correct way to do it: Use the Arduino's output to control the base of a power transistor (or the gate of a MOSFET). The power transistor in turn will turn the main power (5 - 60 V in the video) on and off.You can use your step-up module to create 24 V from the input power supply of the Arduino (provided you do not have another 24 V source to power the lamp). Then you can control the transistor with your 1 kHz signal.

Hi. I have some questions If It is OK:
1. Can you suggest a transistor to use in my project?
https://www.robotistan.com/transistor-1

2. Do I need a diode for using a transistor or a MOSFET? I watched lots of videos related to them. Some uses diodes, some not. The ones who are using diodes say that without them transistors may blow up.

3. I don't understand the part "You can use your step-up module to create 24 V from the input power supply of the Arduino." Did you mean V_in pin on Arduino?
At where can I connect my voltage regulator XL6009 to receive a high current + high voltage? Leg B of a transistor? Like this picture below? But instead of a lamp, It will be connected to a resistence wire which is streched on a wooden socket where the glass is inserted. Or do I even need the XL6009 module? In the Internet It says that transistor increases both current and voltage.
CONNECTion.png
 
Last edited:

Harald Kapp

Moderator
Moderator
Let me answer #2 first:
a) It is up to you whether you use a MOSFET or a BJT. Both can be used.
b) Whether you need a diode or not depends on theload. A resistive load (e.g. a lamp) does not need one. An inductive load (coil, solenoid) will require one.
A MOSFET usually doesn't need the external diode because it has a built-in diode. You will need a so called logic level MOSFET (VGSh << 5 V to work with the Arduino's 5 V output.
A BJT will require an external diode.​

#1: Any transistor with VCE (BJT) or VDS (MOSFET) > 24 V and Ic (BJT) or IDS > 1 A can be used.
This page lists suitable MOSFETs (website is in German, but the table is self-explanatory).

#3: This is how to assemble it:
upload_2022-1-6_8-26-14.png
You can use either the unreguilated input to the Arduino (as indicated) with Vin being somewhere between 9 V and 12 V or you can use 5 V when using USB power.
Note that at 24 V, 0.8 A the load draws 19 W. Accounting for losses in the XL6009 module the power supply (9 V to 12 V or 5 V USB) needs to be able to supply at least 24 W. In the case of a 5 V USB supply this means 5 A (!) and accordingly thick wires.

Btw: The TIP 120 used in your example is a BJT (NPN Darlington type).
 
Let me answer #2 first:
a) It is up to you whether you use a MOSFET or a BJT. Both can be used.
b) Whether you need a diode or not depends on theload. A resistive load (e.g. a lamp) does not need one. An inductive load (coil, solenoid) will require one.
A MOSFET usually doesn't need the external diode because it has a built-in diode. You will need a so called logic level MOSFET (VGSh << 5 V to work with the Arduino's 5 V output.
A BJT will require an external diode.​

#1: Any transistor with VCE (BJT) or VDS (MOSFET) > 24 V and Ic (BJT) or IDS > 1 A can be used.
This page lists suitable MOSFETs (website is in German, but the table is self-explanatory).

#3: This is how to assemble it:
View attachment 53800
You can use either the unreguilated input to the Arduino (as indicated) with Vin being somewhere between 9 V and 12 V or you can use 5 V when using USB power.
Note that at 24 V, 0.8 A the load draws 19 W. Accounting for losses in the XL6009 module the power supply (9 V to 12 V or 5 V USB) needs to be able to supply at least 24 W. In the case of a 5 V USB supply this means 5 A (!) and accordingly thick wires.

Btw: The TIP 120 used in your example is a BJT (NPN Darlington type).

Thanks! I really appreciate your help. I didn't know that I could draw power from dc barrel jack (I am assuming you are indicating this as Vin) of Arduino. Or I totally misunderstood: Do you mean that I should use Arduino's dc barrel jack to power the Arduino and I should also connect the same power supply to the regulator. Like this image in below? I am totally new at electronics, I am sorry If I am being silly.

Untitled.png

If I choose to put a BJT (TIP120 or others), I better put a diode like the image below, right?
One of the transistor I have ordered yesterday is BD 135 NPN Transistor. In the datasheet It says that the maximum readings of Ic = 1.5 and VCE = 45. So I am assuming this one is the way to go.
Datasheet: https://html.alldatasheet.com/html-pdf/2918/MOTOROLA/BD135/256/1/BD135.html
possible_setup.png
Ends of the resistance wires are are connected to the wires above the diode. (Don't worry, I haven't connected it to wood:))
 

Harald Kapp

Moderator
Moderator
Do you mean that I should use Arduino's dc barrel jack to power the Arduino and I should also connect the same power supply to the regulator.
Exactly. You can solder wires to the barrel plug's pins on the underside or simply use the Vin[SUB] pin which actually outputs the power from the barrel plug. See this [URL='https://www.circuito.io/blog/arduino-uno-pinout/']pinout diagram[/URL].
[U]But:[/U] a 3 A (see below) you should [B]not [/B]try to use the barrel jack as input and the V[SUB]in
pin as output. The traces on the pcb are not made to sustain that high current. Instead use Vin as input to the Arduino and as output to the voltage regulator (connect two wires to the Vin pin).

If I choose to put a BJT (TIP120 or others), I better put a diode like the image below, right?
It won't hurt but is definitely not required for a resistive load (you show resistance wire).

One of the transistor I have ordered yesterday is BD 135 NPN Transistor.
The BD135 has a typical current gain of 25, so for 0.8 A output current you will need a base current of 0.8 A / 25 = 0.032 A. Just what the Arduino can drive. The series resistor from the Arduino to the base of the transistor then needs to be R = (5 V - 0.7 V)/ 0.032 A = 135 Ω Next standard values are 133 Ω or 137 Ω. I suggest you use 137 Ω. Or use a TIP120 which has a much higher gain and needs less base current.
The transistor's power dissipation will be VCE × IC = 0.5 V × 0.8 A = 0.04 W. This is low enough to operate the transistor without heat sink.

A note on your setup:
Why do you want to drive the resistance wire by a 1000 Hz signal? Unless you want to control the mean heating of the wire by pwm, it will be useless to apply 1000 Hz to the wire. Due to its thermal inertness the temperature of the wire will not be able to follow the 1000 Hz signal. Instead it will settle to a mean temperature depending on the duty cycle of the signal. You can achieve the same effect by setting the output voltage of the voltage regulator to a convenient value.
 
Last edited:
Why do you want to drive the resistance wire by a 1000 Hz signal?
I think that's to stimulate the bees into ejecting venom. I'm guessing resistance wire (nichrome?) is used mainly for its weather-resistance and the heating effect is a secondary property?
 

Harald Kapp

Moderator
Moderator
Here's how the circuit would look like using a BD135:
upload_2022-1-6_17-57-57.png
Note the power supply connections at the top. These should be physically made in this way: separate wires for input power from the power bank and output power to the voltage regulator, connected at or very near to the Vin pin of the Arduino. This allows power currents to flow separately from the Arduino thus avoiding switching noise in the Arduino which might disturb the Arduino's correct operation.
 
Why do you want to drive the resistance wire by a 1000 Hz signal?
I think that's to stimulate the bees into ejecting venom.
Hello. Yes, It is for stimulate the bees into ejecting venom. Well, It doesn't have to be exactly 1000Hz. There are different values on Russian pdfs related to bee venom production. Range is 0.5KHz-1.2KHz. I am planning to try different values in this range.

I'm guessing resistance wire (nichrome?)
The wire is 25/5 Nr-Al (18.80 Ω/m)

The series resistor from the Arduino to the base of the transistor then needs to be R = (5 V - 0.7 V)/ 0.032 A = 135 Ω Next standard values are 133 Ω or 137 Ω. I suggest you use 137 Ω.

Where does 0.7V come from at the equation above? And I read somewhere that we should put 2.2k Ω resistor between base of the transistor and Arduino to prevent it to break Arduino's pin. I am assuming it is not necesserly to be 2.2k Ω since you tell me to put less Ω there.

Exactly. You can solder wires to the barrel plug's pins on the underside or simply use the Vin pin which actually outputs the power from the barrel plug. See this [URL='https://www.circuito.io/blog/arduino-uno-pinout/']pinout diagram[/URL].
[U]But:[/U] a 3 A (see below) you should [B]not [/B]try to use the barrel jack as input and the V[SUB]in pin as output. The traces on the pcb are not made to sustain that high current. Instead use Vin as input to the Arduino [B]and [/B]as output to the voltage regulator (connect two wires to the Vin pin).

My power source is a 7200mAh jump-starter that has USB port on it. In the manual It says that USB port can supply 5V - 2.1A. Therefore It can supply 10.5 W.
Manual: https://www.monofiyat.com/documents/guide/MF0481-UM-R.pdf (pg. 6)

The maximum output current required for my project is 0.8A. Range is between 0.2-0.8A I am assuming that If I adjust the above resistance values for 0.3A output, I can use jump-starter to run the device at 0.3A-24V, therefore I can use the barrel jack as input right? And then I will connect the Vin pin from Arduino board to the +in of the XL6009. And the rest is up to my Arduino code.

P_draw = 0.3 * 24 = 7.2W
Base current = 0.3 / 25 = 0.012A
R = (5 V - 0.7 V) / 0.012 = 358.3Ω (I will put this between base of the transistor and outputpin_9 of Arduino)

Does it have to be a single resistor or can I put several in series which sums to 360Ω?

Edit: I just saw your new post after posting mine, I will check it now.

Here's how the circuit would look like using a BD135:
View attachment 53804
Note the power supply connections at the top. These should be physically made in this way: separate wires for input power from the power bank and output power to the voltage regulator, connected at or very near to the Vin pin of the Arduino.

Can I connect my jump-starter power bank at Vin pin? I just read that both barrel jack and Vin pin requires 9-12V. Does it have to be 7-12V? Because I don't think there is a power bank that has more than 5V USB output, or I haven't seen any. Or is there a special way to connect it?
 
Last edited:

Harald Kapp

Moderator
Moderator
Yes, It is for stimulate the bees into ejecting venom.
But how? Certainly not through a thermal signal changing at 1 kHz.
Where does 0.7V come from at the equation above?
This is the base-emitter voltage of the BJT.
My power source is a 7200mAh jump-starter that has USB port on it.
You can't use USB power (5 V) on Vin., Vin needs to be at least 7 V because there is an internal 5 V regulator on the Arduino. Use the 5 V pin instead.
Besides, 2.1 A (10.5 W) is insufficient. At 5 V you will need 5 A (25 W), check my post #12.
Does it have to be a single resistor or can I put several in series which sums to 360Ω?
Series is o.k.
 
But how? Certainly not through a thermal signal changing at 1 kHz.
Hello! I am not sure how It works but in the pdfs I read, they refer it as "filling frequency". I will let you know If I find more information related to this.

Besides, 2.1 A (10.5 W) is insufficient.
Even If I reduce the output amperes from 0.8A to 0.3A -24V, still wouldn't be enough?

I found this battery below. It says 12V - 4.5Ah.
Battery: https://www.hepsiburada.com/ttec-12-volt-4-5-amper-bakimsiz-kuru-aku-p-OTKLT927336S
Edit: I also found this one 12V - 2.8Ah: https://www.hepsiburada.com/ortec-kuru-aku-12-v-2-8-ah-kare-tip-p-hbv000005htae

Are these OK? Or can I achieve the required value by connecting some rechargable AA (or similar) batteries?

And I read that using 12V on Vin pin might damage the Arduino. Is this a problem in my case? Link below, post #2
Link: https://forum.arduino.cc/t/powering-uno-via-vin-pin-12v-dc-wall-adapter/686071
 
Last edited:

Harald Kapp

Moderator
Moderator
Even If I reduce the output amperes from 0.8A to 0.3A -24V, still wouldn't be enough?
24 V × 0.3 A = 7.2 W. From a power point of view teh 2.1 A power bank is good, but you need to move the connection from Vin to the 5 V pin.
I found this battery below. It says 12V - 4.5Ah.
That one is certainly good. Do not mix the Ah number (4.5 Ah) with the amperes you can draw. The Ah is the capacity ("Kapasite: 4.5 Ah"), an indication of how much energy is stored within this battery. This battery is a rechargeable lead battery and can supply much more current than you require (no need to worry, your circuit determines how much current is actually drawn.
And I read that using 12V on Vin pin might damage the Arduino. Is this a problem in my case?
Where did you read this? The official Arduino website states:
upload_2022-1-7_10-27-17.png
 
Top