Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: Powering ATMega328 in project safely without UNO board? on: November 19, 2013, 04:24:00 pm
Cheers CrossRoads, appreciate the help.  I know programming quite well, but still learning the hardware side of things.

At the risk of revealing my amateur knowledge level of electronics, can I confirm the screenshot attached is how I should add those components to the power portion of the circuit (I just made it a simple LED circuit for the sake of example).  I'll probably buy a pack of zener diodes from ebay, so I'll have plenty to hand and I'll one to input power to be safe.

Thanks again
2  Using Arduino / Project Guidance / Powering ATMega328 in project safely without UNO board? on: November 19, 2013, 01:51:25 pm
Hi all,

Background spiel
I've been working on a arduino project involving a servo, some LEDs and an LCD module.  For the development I've been using the Arduino UNO board and a breadboard for all the components.  Now I'm ready to make the project more permanent, however I don't want to put the entire UNO board in the project as it 's a bit of a waste putting the entire thing in when I only need a few pins.  So I went on and used the "bareduino" schematic and managed to get the ATMega328 chip working on there without the UNO board.  However I want to further shrink the components needed in the permanent project.

Currently I'm using a 4x AA batteries (6V total) to power the ATMega328 using a 7805 regulator with some capacitors to reduce the voltage to 5V for the ATMega328 and the servo power is plugged in before the regulator so it can use higher current (7805 will cap to 1A max).

Instead of using batteries I wanted to instead use a 5V DC mains supply (one used for a phone where it outputs 5V DC and 2.5A max current).  As I'm using a 5V DC plug, I want to remove the 7805 portion of the circuit.  I've attached a basic strip board of what I'm trying to do minus the LEDs and LCD.

1) As I'm using a DC mains supply that is already capped to outputting 5V and 2.5A max, can I remove the 7805 regulator?
As the mains supply is 5V DC it doesn't need to reduce the voltage further, but I wasn't sure if having a 7805 regulator between the mains and IC added some other layer of protection I'm overlooking.

2) As the servo is being plugged into the same "power rails" do I need to add anything like a rectifier diode (1N4007) to protect the ATMega328 at all (as I hear people saying motors can cause reverse power spikes that can damage ICs)? 
If so, where should I put it or is it unnecessary?

Thanks for your time and advice!
3  Using Arduino / Motors, Mechanics, and Power / Re: 2 questions: Boosting current and step down converters on: August 14, 2013, 03:37:06 pm
Responses much appreciated.  I knew I was probably thinking things over wrongly.

My search results never turned up 5V 4A plugs, but now they are.  Must have been having a blind moment!

One of those should be enough (only if all motors and servos are under heavy load would each one draw 1A+ simaltaneously, so this should cover things I hope as most of the time they should only draw somewhere around 500mA-750mA each).

If it's not enough, I'll go down the DC-DC converter route with a 12V 6A power supply (though I'll probably need a large heatsink on the DC-DC converter to take it from 12V to 5A I assume?).

Thanks again!
4  Using Arduino / Motors, Mechanics, and Power / 2 questions: Boosting current and step down converters on: August 14, 2013, 01:30:57 pm

Revisiting an old project as I'm going to have a few days off work.
First off, I'm a bit of a hardware noob, so apologies on this if it sounds stupid or is completely wrong.

I wanted to try and build a robotic arm that uses 2 stepper motors and 2 servos.  The arduino will run off a battery, but the servos/motors will need some more power and should also not be connected up to the same battery (apart from where you share the common ground).  So the plan is to run the motors off the AC mains so I don't have to connect 15 batteries or an expensive RC battery to run all of this.

So, I was thinking about getting a wall wart that supplies 5V and 3A, but I realised the 3A may not be enough for all the motors as they can (depending on the load) drain up to 1A each.

Is there a way to boost the current when I have a 5V DC 3A wall wart?  Will connecting capacitors in some way boost current or do they only store voltage?

Altenatively, I could get a different Wall wart that provides 12V and 5A, but then I need to step down the 12V power without generating lots of heat or needing large heatsinks.  So can I connect two of these DC-DC converters in parallel (so I would then have 2 rails supplying 5V at 2.5A which then each power 2 motors)?

I'd like to avoid work bench power supplies if possible so I can have it as a permanent completed project.

Thanks in advance to anyone who can help or takes the time to read this!
5  Using Arduino / Motors, Mechanics, and Power / Re: Daisy chaining buck converters = bad idea? on: November 19, 2012, 06:02:20 am
Thanks for your input guys.  Looks like I'll go buy a batch of these buck converters (pretty cheap off ebay, they actually work out to be even cheaper than a linear regulator from a electronics store here in the UK!).

@Runaway Pancake
PS - So, that ATX supply is looking better and better all the time, Bobu?  (:
It certainly is.  The only reason I don't want to use an ATX power supply is because of the physical size of it.  It would be great to use as a lab power supply, but for the final project where I want to make everything permanent, it's just too big for my liking smiley-sad
6  Using Arduino / Motors, Mechanics, and Power / Daisy chaining buck converters = bad idea? on: November 18, 2012, 06:04:31 pm
Hi Arduino community!

Hope I'm posting this in the right section.

The background spiel

I'll be needing 3 different voltages in my project for various components; 5v for the AtMega328 chip, 3.3v for a display module and finally 6v for some servos.  I also want to run everything of 1 singular power supply so I plan to use a mains supply/wall wart as it's not something that requires mobility.

I plan to remove the ATMega328 chip from the board and have it permanently fixed into my project at the end (this way I can re-use the board for a future project), so I can't really rely on anything that's already built into the board to achieve this.

My plan was to have a 12V 3A AC-DC power supply (a laptop charger) connected to a buck converter to step the voltage down to 6V 3A.  This will provide power to the servos.  I would then daisy chain a second buck converter to this to bring the voltage down further to 5V which would then power the ATMega328 + it's components (crystal etc...).  From here I would then daisy chain a third buck converter to bring the 5V down to 3.3V for the display module (I may substitute this for a linear regulator as the current I need for the 3.3V part is very low; 20mA).

I was thinking of daisy chaining them in this manner, rather than having all 3 connected to the laptop chrager directly. I thought by doing this, the buck converters would have less voltage they need to drop when it gets to the 5V and 3.3V regulation (meaning less heat would be generated so I won't need to add any heat sinks or anything).  From what I understand buck converters are very efficient and will not generate lots of heat like linear regulators can, but I thought this still may be worth doing.

  • By daisy chaining buck converters, does this cause any problems?  For instance, current issues, heat issues or hazards? Is it better to have all 3 connected directly to the AC-DC plug, if so is there a reason?
  • This one may sound completely silly.  If the buck converter was rated for 3A max and the power supply says it can only provide 3A max, is there anyway to boost the current that is available after the buck converter?  For instance for powering the servos I have 6V and 3A max after it's gone through the converter, but ideally I would like 6A to be available if the servos need to lift any heavy loads as each servo can potentially try to draw up to 1A each on very heavy loads.
  • Slightly off the main topic here but, if I wanted to protect part of my circuit so it can never draw more than 2A, is there anything I can use to do this?  I'm just concerned in very heavy loads where the servos may potentially try and draw the full 3A, this leaves nothing for the rest of the circuit (ATMega328 for instance) and will cause resets or other issues.  So I was wondering if there was a way to limit this part of the circuit so it can draw between 0A-2A but no more than that, leaving 1A available for the rest of the circuit.

In case you need to know, the buck converter I planned on using has a LM2596 regulator.

Thanks you very much for your time and reading this, I look forward to your responses smiley

7  Using Arduino / Motors, Mechanics, and Power / Re: Controlling the parallax standard servo on: November 11, 2012, 04:29:39 pm
Tried powering it from a 9V battery... then from two 9V batteries in series.. (probably blew it at that point) to no avail.

Yep, that's probably what's happened.  The servo was rated for 6V max, so if you connected it directly to a 9V supply, it probably damaged it in someway.  If that didn't do it then it more than likely would have gotten damaged when 2x 9V in series (as that would come to 18V).

If you power it from something higher than what it's rated for, you'll need to use a regulator to bring the voltage down.
8  Using Arduino / Motors, Mechanics, and Power / Re: Controlling the parallax standard servo on: November 11, 2012, 04:15:24 pm
The only way I can think of to test those pins to power some LEDs with them (this won't test any PWM functions obviously, but it will check if the pins work). 

There's the standard LED blink example sketch you can use and then modify in order to test the specific pins  Don't forget to add a resistor so the LED doesn't burn out.
9  Using Arduino / Motors, Mechanics, and Power / Re: Controlling the parallax standard servo on: November 11, 2012, 03:08:13 pm
The sweep example is pretty much definitive working code, so if that's not working I can only assume you have some sort of hardware issue.
I'm sure you've already done this, but I would double check all the connections again.  In fact, as it's only 3 cables, I would actually pull them all out and set this up from scratch again just to be sure.

I'm not sure if this is the same servo you're using, but going by the picture on this link:-
  • The Black cable on the outer connection should go to the ground pin on the Uno board
  • The center red cable is the power.  Connect this to the 5v pin on the Uno board
  • The white cable is the signal, and should be plugged into pin 9

Rather than using Parallax's code, stick to "sweep" for the moment.  I'm also assuming that the only power source you have is the USB connected to the Uno board, there are no other components connected (LEDs etc...), there is no load on the servo and you're using the Uno board directly and not a breadboard in anyway?

So it should look like my attached picture.

If it still doesn't work after this, I can only assume something's wrong with the servo, the Uno board/microprocessor or the servo has a voltage requirement above 5V (unlikely).  The datasheet or website you purchased this from should tell you this.
10  Using Arduino / Motors, Mechanics, and Power / Re: Controlling the parallax standard servo on: November 11, 2012, 10:20:14 am
I've been asking a lot of questions here on the forum, so it's probably time I tried to answer someone else's questions smiley

I haven't got my Uno in front of me to try this, but the code looks fine to me from what I can see so it may be a hardware set up issue.  Could you confirm the white signal cable is connected to pin 3 and not to pin 9?
(The code says the servo should be connected to pin 3 but the comment says pin 9).

If it's definitely connected up correctly, I would try using the "sweep" sketch example that comes with the arduino IDE.  That sketch uses pin 9 for the PWM signal.
11  Using Arduino / Motors, Mechanics, and Power / Re: Affordable wall wart that provides more than 3A? on: November 11, 2012, 10:06:01 am
Thanks everyone for your suggestions and responses, I appreciate you all taking the time to respond.

The responses certainly clear up why I haven't been having much luck finding a 6v wall wart with this ampage; they simply don't really make these at these voltage and current levels  smiley

ATX power supplies are pretty much a no-go for me as that's far too bulky for my liking on this particular project. I appreciate the suggestion none the less.

Ideally the wall wart or mains supply I use will have a voltage of 6V or higher, for the reason zoomkat raised; that I would get better performance out of the servos.  I have no problem adding a DC-DC regulator to bring the voltage down if need be as these modules look fairly cheap on ebay (for instance a 12v wall wart with a high current rating is fine as I can use a DC-DC regulator with that).

I would prefer keeping it as 1 power supply if possible, but thanks for the suggestion Runaway pancake.  It's a suggestion that I could use in a future project possibly as it's something I've never really considered using in this way before.

The closest match I guess is the laptop power supply; 17v at 5A.  Though I was hoping there was a way I could use something smaller, but you can't have everything!

Even if I go with a laptop power supply and have the voltage/current I need from there, when I use a buck converter to step down the voltage, it bottlenecks the current down to 2A or 3A.  I may have to just bite the bullet on this one and have to live with the current bottleneck.

Question Time!

  • I'll certainly look into a UBEC's, but from what I've briefly read on this, it sounds just like a DC-DC regulator or buck converter (example to one is in the original post).  Is that the case or is there a difference between the 2?
  • I'm also glad to hear the battery won't explode!  If I wanted to remove the 9V battery also and have the mains also power the atmega328 chip, would it be safer to use a completely discreet DC-DC regulator coming from the mains supply to step down the voltage to 5v (so there would be 2 DC-DC converters in the circuit at this point; 1 providing 6V to the servos and 1 providing 5V to the atmega328), or do you think having the voltage stepped down to 6V (which is then run off to the servos) and then using a resistor to drop the voltage further run off to the chip (a linear regulator wouldn't work here as it's voltage drop is 2V, so it would go to 4V if I put one here)?
    My assumption is a discreet DC-DC converter may be better as the current draw may change depending on what the chip is doing, which would fluctuate the voltage and potentially cause damage to it.

As always, thanks again for taking the time to read this.  Any responses is always greatly appreciated!
12  Using Arduino / Motors, Mechanics, and Power / Affordable wall wart that provides more than 3A? on: November 10, 2012, 08:56:31 am

I've currently made an arduino project that powers 4 servos (this will expand to 6 servos and include a display modeule however in the future) that works off of 1x 9V battery (powers AtMega328) and 4x AA batteries (powers the servos).  This all works fine, however I wanted to make changes so that I can power the servos off the mains electricity so I don't have to maintain the AA batteries (as it means I need 4x AA alkaline batteries or 6x AA NiMH batteries to power this many servos with adequate current).

(I've attached what I believe my circuit should resemble at the end of getting the circuit changed for using with a wall wart.  Please note, I've moved the AtMega328 chip from the Uno board to the breadboard as in theory I'll be doing this at the end of the project).

So I begun looking into how to do this and I figured I could get a wallwart that could provide 5A-6A of current (this is because the servos can draw up to 1A each depending on the load; unlikely to need that much but of course you should try to budget for this eventuality) and 6V.  

I also looked into DC-DC switch converters to step down the voltage if need be from the wall wart (link below to one of those I found).  Introducing a DC-DC converter seems to add a bottleneck where I can only draw 2A at most without a heatsink, so this raises an issue I'll probably put in another post.

Unfortunatly, I've not had uch luck in finding a wall wart that can supply adequate current, the closest I could find was a laptop charger but that was more money than what I wanted to spend and also seemed a bit overkill.

That's the background spiel, finally, on to the questions!

  • Can anyone reccomend a wall wart that would provide at least 3A (the closer to 6A the better), at least 6V and is also not too pricey or bulky?
  • I havent got any available wall warts around the house, but I have been looking at ones being used and am left slightly confused.  Most of my wall warts only have an output of 2A at the very most (the majority are actually 1A or 1.5A) and they power things I would consider quite power intensive.  Am I just completely overestimating the max current on the servos or is there a trick I'm missing to boost the current in the circuit without having the power supply provide the current?
    I did check the current on the multimeter when each micro servo was under a heavy load (standard servos wil lbe added once they arrive in the mail) and it came to around 800 mA.
  • If you have multiple power supplies in a circuit you need to connect the grounds, if I do this with a battery and the mains power, will this cause issues (i.e. cause the battery to explode!)?

Thanks as always, I really appreciate any help anyone can provide this newbie smiley
13  Using Arduino / General Electronics / Re: Power issues in my circuit? Can anyone advise? on: October 28, 2012, 02:10:15 pm
Just wanted to close this post off and say thank you to everyone for their help.  I believe that the battery power issue is now resolved and I'll go with the 2 battery source approach so many of you recommended (9v for the atmega328 chip and 6v battery pack for the servos that consists of 4x AA batteries or 6x AA if they're rechargeable 1.2v batteries & I'll add a regulator).

I am thinking of changing the power supply now to a wall wart and add a switching regulator rather than using all these batteries, but I think I'll start a new post on that as that's a different topic from the original post smiley

Thanks once again for everyones help !
14  Using Arduino / General Electronics / Re: Power issues in my circuit? Can anyone advise? on: October 27, 2012, 08:01:02 am
Thanks again everyone for the info.

I wasn't really trying to get the servo to push my hand out the way, just simulate a high enough load to see how much current 1 servo will attempt to draw.  That way I could just estimate the maximum current the 6 servos may attempt to draw on very high loads.

I was trying to avoid having 2 power sources (i.e. a 9v battery for the atmega328 and 4x AA batteries for the servos), but if this is the ONLY way to do this I may have to bite the bullet on this and do just that, or possibly go for a wall wart to replace the batteries all together.  A wall wart does slightly worry me just because I'll be dealling with the mains electricity, but if that gets me what I need instead of having a large number of batteries in this, I may have to consider this route.

If I had a 5v 2.25A wall wart, I take it this would be fine to power everything (in this situation I guess I wouldn't need any regulators/capacitors either as the wall wart is converting everything to 5v regulated DC for me)?

Here's a link to one (but it seems pretty pricey to me, so I'll see if I can find one on eBay or any electronics around the house that I don't use anymore)

I'll definitely take a look into some rechargeable NiMH batteries for this, as it will save costs in the long run if they're rechargeable.

Thanks for pointing out datasheets for batteries.  It's good to see that they can produce 2A of current, as short lived as it may be (30 mins I think before the voltage starts really dropping according to the energizer AA NiMH sheet).

I figured the power side of things would be the easy part getting into electronics, apparantly not!
15  Using Arduino / General Electronics / Re: Power issues in my circuit? Can anyone advise? on: October 26, 2012, 05:36:29 pm
These are just some micro hobby servos (Hexatronic HXT 900) I'm hooking up.  If I hook one up to a power supply (which there is no problem powering) and measure the current whilst holding the servo arm in place with my hand to simulate a very high load, it seems to use 750mA.  Letting it run free, it was around 75-125mA depending on the speed I set it to move.

So with that, in theory 4.5A is needed if all servos are under very heavy loads and I also need the 4.8v-6v of power for them in general.  It is extremely unlikely that all servos will be under such heavy loads, I would imagine at most 2 servos would be, but for very short periods of time (10 seconds or so), but I want to make sure I cater for this situation.  

Is it possible to even draw this much current from 5 or 6 AA batetries whilst drawing 6V, as it does sound like a huge amount?

One thought is that the voltage regulator says it can only deliver 1A.  Is that the problem?  Would I need a regulator for every 2 servos so each can get at least 500mA (so for 6 servos I need three regulators)?

I gave a 9v battery a try and it only managed to power 3 out of the 4 servos when it connected to the circuit (so 2 voltage regulators are in the circuit I tested.  One 5v regulator for the atmega328 chip, and one 6v regulator for the servos).  However, I checked the 9v battery voltage with the multimeter and it only measured 8v, so the battery probably hasn't got enough life left in it.  

The project is going to basically be similar to one of those robot arms, and I need 6 servos for all the various movement areas.  As it's stationary, a wall pack is certainly an option, but I did want to see if batteries were viable as that would be the more preferred option, as I'm not sure if it will be near a wall socket.

If someone knows of a DIY tutorial for robot arms like this I probably would be able to learn from that also.  The only problem I have is they all seem to use kits or hack store bought robotic arms instead of making you build one yourself completely from scratch with the electronic theory work.  So they're all pretty much saying "just plug this into this", without an explaination of how the circuitry works or why you're making your circuit in that way smiley-sad

Again, really appreciate your feedback.  One day I will understand all of this!
Pages: [1] 2