Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Arduino 9V to 5V or better yet some other way of dealing with this issue

Go to solution Solved by Gokuofuin,
12 minutes ago, r4tch3t said:

Yes but make sure the 5v goes to the USB port, it won't work in the barrel jack. 

You champ of man! It works perfectly now, I even have a power off switch now cus of the 5V pack. :D Thanks so much!

IMG_20181024_114044.thumb.jpg.e7e60f092f757d724e2fb0dec29b7a3c.jpg

Hey there guys

 

So I am doing some fun little project for my one work and I need to have a servo motor running along with my arduino, however this currently requires me to run two separate battery packs (one for the servo which is 5V and one for the Arduino which is 9V) which is a pain to manage.

 

Is there some way I can make my life easier? I am not very good when it comes to electrical engineering as such and therefore have issues or make things more complex than they need to be in this area.

 

Picture below for ref:

IMG_20181024_103633.thumb.jpg.875b21c98eb4cf4d8de35b686c31785c.jpg

Sometimes I fill in the signature field..... other times I don't.

Link to comment
Share on other sites

Link to post
Share on other sites

you can use a buck converter (or multiple of them, don't know your power draw) to get 9V down to 5V

CPU: i7-2600K 4751MHz 1.44V (software) --> 1.47V at the back of the socket Motherboard: Asrock Z77 Extreme4 (BCLK: 103.3MHz) CPU Cooler: Noctua NH-D15 RAM: Adata XPG 2x8GB DDR3 (XMP: 2133MHz 10-11-11-30 CR2, custom: 2203MHz 10-11-10-26 CR1 tRFC:230 tREFI:14000) GPU: Asus GTX 1070 Dual (Super Jetstream vbios, +70(2025-2088MHz)/+400(8.8Gbps)) SSD: Samsung 840 Pro 256GB (main boot drive), Transcend SSD370 128GB PSU: Seasonic X-660 80+ Gold Case: Antec P110 Silent, 5 intakes 1 exhaust Monitor: AOC G2460PF 1080p 144Hz (150Hz max w/ DP, 121Hz max w/ HDMI) TN panel Keyboard: Logitech G610 Orion (Cherry MX Blue) with SteelSeries Apex M260 keycaps Mouse: BenQ Zowie FK1

 

Model: HP Omen 17 17-an110ca CPU: i7-8750H (0.125V core & cache, 50mV SA undervolt) GPU: GTX 1060 6GB Mobile (+80/+450, 1650MHz~1750MHz 0.78V~0.85V) RAM: 8+8GB DDR4-2400 18-17-17-39 2T Storage: 1TB HP EX920 PCIe x4 M.2 SSD + 1TB Seagate 7200RPM 2.5" HDD (ST1000LM049-2GH172), 128GB Toshiba PCIe x2 M.2 SSD (KBG30ZMV128G) gone cooking externally Monitor: 1080p 126Hz IPS G-sync

 

Desktop benching:

Cinebench R15 Single thread:168 Multi-thread: 833 

SuperPi (v1.5 from Techpowerup, PI value output) 16K: 0.100s 1M: 8.255s 32M: 7m 45.93s

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, Jurrunio said:

buck converter

Will something like this do the job?

Sometimes I fill in the signature field..... other times I don't.

Link to comment
Share on other sites

Link to post
Share on other sites

I'm not convinced the solution would be any less complex than running two power supplies tbh.

 

As suggested above you'd need a step down converter (possibly multiple) but this would require making a separate circuit to split the 9v input and send the full 9v off to a 9v rail while also sending 9v off to the step down circuit which does the transformation and sends the 5v off to a 5v rail.

 

I'm wondering if you can buy a PSU with a seperate 9v & 5v output?

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Master Disaster said:

any less complex

The main issue I suppose I have here is that I need to run two separate battery packs which means two separate things to worry about. As opposed to one 12V battery which can run the whole thing. I suppose your right its more 'tech work' to get the other thing working but if it works and allows me to only worry about 1 running issue (the main batt) then that would be nice?

Sometimes I fill in the signature field..... other times I don't.

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, Gokuofuin said:

The main issue I suppose I have here is that I need to run two separate battery packs which means two separate things to worry about. As opposed to one 12V battery which can run the whole thing. I suppose your right its more 'tech work' to get the other thing working but if it works and allows me to only worry about 1 running issue (the main batt) then that would be nice?

Oh yeah, of course it would.

 

I found something that should help...

http://www.gadgetronicx.com/multiple-voltage-power-supply-circuit/

 

Sorry that's not for simultaneous multi output, you need this one

https://www.instructables.com/id/Build-a-Multi-Voltage-Portable-Power-Supply-You-Ca/

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, Master Disaster said:

something

So that one works with the LM317 to produce the thing the other thing does that I linked using multiple resistors of varying resistance?

 

Would that (I take it yes) require me to build that setup on my own? I mean can I buy something which is basically that in a nutshell for not a bank breaking amount? Because I am not exactly sure of how well I would be able to setup a compact version of the schematic on that website. I am not very skilled when it comes to electronics.

Edited by Gokuofuin
typo error

Sometimes I fill in the signature field..... other times I don't.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Gokuofuin said:

So that one works with the LM317 to produce the thing the other thing does that I linked using multiple resistors or varying resistance?

 

Would that (I take it yes) require me to build that setup on my own? I mean can I buy something which is basically that in a nutshell for not a bank breaking amount? Because I am not exactly sure of how well I would be able to setup a compact version of the schematic on that website. I am not very skilled when it comes to electronics.

Surprisingly it doesn't seem like you can.

 

Check AliExpress, search for power supplies and look through. I had a quick look but couldn't find anything that does simultaneous multi out however there are 12,000 results.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

Just power the arduino off the 5v pack. Arduino is a 5v system and it has a built in voltage regulator to reduce the voltage to 5v.

Just get a usb cable cut it in half and wire the red and black wires to 5 and ground. 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, r4tch3t said:

Just power the arduino off the 5v pack

I cannot do that for this one because the Arduino cannot power itself and the motor at the same time, it dies as soon as a load is placed on the motor.

 

3 minutes ago, Master Disaster said:

Check AliExpress

Thanks ill do that, though I may try looking closer to home, cus in SA its really hard to get stuff from overseas. The post office is backed up till Christmas at this point.

Sometimes I fill in the signature field..... other times I don't.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Gokuofuin said:

I cannot do that for this one because the Arduino cannot power itself and the motor at the same time, it dies as soon as a load is placed on the motor.

 

Thanks ill do that, though I may try looking closer to home, cus in SA its really hard to get stuff from overseas. The post office is backed up till Christmas at this point.

https://m.alibaba.com/showroom/5v-9v-dual-output-power-supply.html

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Gokuofuin said:

I cannot do that for this one because the Arduino cannot power itself and the motor at the same time, it dies as soon as a load is placed on the motor.

Yes that would happen if you connected the servo to the 5v rail on the Arduino when it's powered from 9v.

You need to plug the servo board into the 5V pack and and arduino into the 5V pack also.

Believe me these guys are over engineering the situation a bit. I have made many arduino projects and I am 2 years into an electrical engineering degree.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, r4tch3t said:

servo board into the 5V pack and and arduino into the 5V pack

Ohhh sorry I didn't understand what you meant, so the board and servo can both run off of the 5V? Awesome ill try it now and get back to you! Thanks :)

Sometimes I fill in the signature field..... other times I don't.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Gokuofuin said:

Ohhh sorry I didn't understand what you meant, so the board and servo can both run off of the 5V? Awesome ill try it now and get back to you! Thanks :)

Yes but make sure the 5v goes to the USB port, it won't work in the barrel jack. 

Link to comment
Share on other sites

Link to post
Share on other sites

the 5V can also go to the 5Vin port on the pinheaders but not to Vin or the barrel jack

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, r4tch3t said:

Yes but make sure the 5v goes to the USB port, it won't work in the barrel jack. 

You champ of man! It works perfectly now, I even have a power off switch now cus of the 5V pack. :D Thanks so much!

IMG_20181024_114044.thumb.jpg.e7e60f092f757d724e2fb0dec29b7a3c.jpg

Sometimes I fill in the signature field..... other times I don't.

Link to comment
Share on other sites

Link to post
Share on other sites

29 minutes ago, Gokuofuin said:

You champ of man! It works perfectly now

Mate, that's a big ol' motor to have on a supposedly "clean" 5v supply. If the motor control circuitry takes care of this then fine, if you are not sure then google flyback from inductive loads.

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Ralphred said:

big ol' motor

Is it really that large?

IMG_20181024_122938.jpg.f3d6f4c4097e865249daca18892f5e76.jpg

Sometimes I fill in the signature field..... other times I don't.

Link to comment
Share on other sites

Link to post
Share on other sites

Well, it stores about 50 joules of energy at max load, 100 will stop a human heart, how much to kill your 5v microprocessor?

But like I said, if your controller takes care of this, no worries.

Link to comment
Share on other sites

Link to post
Share on other sites

A 9v battery is almost never a good way to power something.

 

Your Arduino chip can work with a wide range of input voltages, from as low as 2v to as much as around 5.5v - but, if the voltage is too low, you may not be able to run the Arduino at high frequencies (for example, it may need at least 4v to run at 16 Mhz but may only need 3v to run at 8 Mhz.

Basically, what I'm trying to say is that the input voltage is not that critical, as long as it's above some threshold (let's say 4.5v) and below the maximum the chip can handle which is 5.5v

Because of this USB is perfect for such Arduino boards: the voltage allowed on USB is 5v +/- 0.25v, so you could have any voltage between 4.75v and 5.25v and your Arduino board will run just fine.

The DC In connector on your Arduino board is there to be used with power adapters, not batteries. It doesn't care about efficiency, about using the most energy that's received. Directly after this DC In jack, there's a linear regulator which converts the input voltage (9v in your case) into 5v, a value safe for your Arduino.  Linear regulators are simple and don't care about efficiency, they simply "throw" away the difference between input voltage and output voltage in the form of heat. So basically, if you connect your 9v battery to the DC In jack, your efficiency will be 100% x 5v / 9v = 55.55 % - basically 45% of battery's energy gets converted to heat on the regulator chip and 55% goes to the arduino chip and other components.

Now, even ignoring this, 9v batteries aren't designed to provide a lot of power, they're meant to be used with devices like smoke sensors which consume very little power and work for a few milliseconds then don't work for a few second and repeat, basically low "duty cycle" (work for a bit, don't work for a longer time).

You don't want to take more than... let's say 50mA continuously from a 9v battery, or it will discharge fast... 50mA is enough for the Arduino chip (which will use maybe 5-10mA on its own) and a few leds, but it's definitely not enough to power a motor.

So the 9v batteries are lousy, they only hold around 550-650mAh of energy, and they can only output 50-100mA if you want them to last. If it's plugged in the DC In jack, you basically have a 5v battery with a 550mAh - 650mAh capacity.

 

In comparison, AA alkaline batteries hold up to 2800mAh at 1.5v - 1.65v and rechargeable AA batteries go up to 2500mAh with a voltage of 1.2v...1.35v and these batteries can output even 1A of current for long periods of time. Even smaller AAA batteries have a typical capacity of around 1000mAh for alkaline batteries and around 800mAh for rechargeable ones.

So, if you connect 4 batteries in series, you have a battery that's 6v.. 6.6v if you use alkaline batteries, or 4.8...5.4v if you use rechargeable batteries.

With rechargeable batteries, you're right there in the perfectly acceptable range of voltage, and your Arduino will work just fine if you wire these batteries into the USB port or on the input voltage pins.

And you get a 2500..2800mAh battery versus a 550-650mAh 9v battery ... that's at least 4 times as much life out of your batteries compared to a 9v battery.

 

However, with regular alkaline batteries (non-rechargeable) the voltage of 4 batteries can be too much and you need to reduce it a bit, to safe levels, so you need to use a voltage regulator to reduce that to something below 5.5v ..

There is a linear regulator right after the DC In jack but that regulator may not be good enough to output a stable 5v with voltage as low as 6v - most linear regulators only work well if the input voltage is above the output voltage by some amount, and in the case of the cheapest regulators that value is around 1v..1.5v 

However, you can simply buy a better linear regulator and use that instead, and connect the 5v output of the linear regulator the Input voltage pins on your arduino or in your usb connector

For example, here's what Digikey has for linear regulators that can take at least 7v on input, and current output between 100mA and 500mA (because you don't need more to power only your Arduino board): https://www.digikey.com/short/jd0mqf

You can then check "in stock", then specify the minimum quantity (enter 10 for example, you don't want prices for rolls of 3000 chips) , and then you can sort by dropout voltage (that's the amount of voltage that must be above the output voltage). The ones with the lowest dropout voltage can be very expensive but you don't need the lowest, you only need a reasonable value that's below 1v, because you want your 6v battery (1.5v x 4 batteries) to be changed to 5v. 

 

For example, if you go down a few pages, you'll find in that list Microchip's MCP1802 which can output up to 300mA , with 0.25v dropout voltage at 100mA.. the one I linked to is also fixed output at 5v but there's versions that have adjustable output. The fixed output ones only need a couple of ceramic capacitors, one at input and one at output, and they're very easy to connect in your circuit , they're small but you can bend the leads if needed to solder wires to them or solder them on the back of prototyping boards

 

Ok, so that sorts out power to the arduino board.. You can use the same battery pack to power the motor as well, because now the batteries can give enough current to power the motor, these alkaline and rechargeable batteries like I said can give 1A+ of current continuously and for brief moments even more.

However, you have to be aware that your motor when it starts up, it may pull a bit more current because it has to beat friction and built magnetic field inside itself to work and that's only for a few milliseconds but still for that brief period of time the batteries are worked hard and their output voltage could drop a bit in that small time and then they recover. So to counteract this drop of voltage which could make your Arduino reset itself or go glitchy, the solution is to add a bit of capacitance at the input of the regulator (or at input voltage pins if you connect battery pack directly, if you use rechargeable batteries for example)

A simple electrolytic capacitor rated for at least 6.3v would do, and as for capacitance value something like 470uF or higher (up to something reasonable like 1000-1500uF) would be plenty.

 

Now your motor is 5v ... it will work connected directly to rechargeable batteries (4 x 1.2v..1.35v)  but if you're gonna use alkaline batteries you'll want to reduce the voltage a bit ... so you'll have to use either another linear regulator (but this time one that can output the amount of current the motor wants, which may be more than 50-100mA the Arduino board will use), or you could simply resort to tricks like connecting a diode or two in series  with the motor. A plain 1n4001..1n4007 (only maximum voltages change ith last digit) diode will have a voltage drop of around 1v at 1A , so your 6v from alkaline batteries is now suddenly only 5v at the motor. The 1n400x diodes are good for 1A of current, but there's other diodes that can do more, like 1N5408, 1N5820 (these have 1v drop at 3A) , MUR420 (0.9v at 4A), SB5100 (0.8v at 5A) etc etc

 

You could basically always have the diode in circuit between batteries and your stepper motor but simply add a jumper that would short the diode leads when you use rechargeable batteries.

Link to comment
Share on other sites

Link to post
Share on other sites

Phew that is a lot of info to absorb, im going to take a while to read this all through and then relook and the project, but thank you @Ralphred and @mariushm (dunno why its not linking your name)

 

But ya Ill have to go read up more about what both of you have pointed out and hopefully will become a smarter dude for it! :D

Sometimes I fill in the signature field..... other times I don't.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×