Go Down

Topic: Servo movement resets ATMEGA328  (Read 3994 times) previous topic - next topic

Ginza

Hi everybody, I have a 9v battery connected to a 7805IC to get 5v to ATMega328 and a TowerPro 9g servo.

Im using all in a protoboard, the problem is that when the servo moves, the ATMega328 restarts.

I have read in the web that it could work with a 7805 for the servo and other 7805 for the ATMega328.

What do you think ?


Best regards, GInza.

CrossRoads

The servo could draw an amp while moving. The 9V battery is only good for a coupele hundred mA. So the voltage drops when the servo moves, and the Arduino restarts.
Battery/7805 for each unit is what you really need. Go with 6xAA battery pack for the servo.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Ginza

Hi CrossRoads, thanks for your reply.

Sorry if that I will tell you is wrong, Im starting with Arduino few month ago.

I was thinking in use the same battery with two 7805.

What do you think ?


Best regards, GInza

CrossRoads

As I said: The servo could draw an amp while moving. The 9V battery is only good for a couple hundred mA. So the voltage drops when the servo moves, and the Arduino restarts."
If one regulator draws an amp, the battery voltage will drop, the 2nd regulator will be starved for voltage, and the microcontroller will reset.
Use 2 batteries.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Paul__B

As was explained.

If this is what you are using as a battery:

then give up now!


Get a proper battery.  Start with a pack of six "AA" (not "AAA") alkaline cells.

raschemmel

#5
Sep 01, 2015, 11:14 pm Last Edit: Sep 01, 2015, 11:16 pm by raschemmel
Do you have a DMM ?

Do you know what current is ?
Do you know the mAh rating of your battery ?
Do you know the current draw of your circuit (static and dynamic ) ?
Do you know the voltage of your battery (at this moment ) ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Ginza

Hi everybody, thanks for your replies.

Yes, im using a 9v battery like the picture, but im using a rechargable 9v battery, because I want to save money with the circuit.

Two 9v batteries is more expensive that I was thinking CrossRoads, may be another option ?


Do you mean a pack of six "AA" for ATMega and the servo Paul__B  ?


I dont know what is aDMM raschemmel...


Best regards, GInza.

raschemmel

You want answers. How about giving us some:
Quote
Do you know what current is ?
Do you know the mAh rating of your battery ?
Do you know the current draw of your circuit (static and dynamic ) ?
Do you know the voltage of your battery (at this moment ) ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Paul__B


Ginza

Hi raschemmel, look I have started with Arduino few month ago. Im a software developer, but one day I wanted to do that my code start to do things with the real world, so I started with Ardunio Uno.

Im learning in the road, while Im connecting things Im learning, Im getting all the information from youtube, google, etc.

Please got me patience :)


My goal now is to find a good power supply to connect the circuit, If I can save money better. I have the ATMega328 on a protoboard with the basics elements to work it without the Arduino uno board. I have connected a 7805 to limit voltage to 5v.

Im using a VIPOW 9v Battery 250mA.

I dont know the current draw of the circuit (static and dynamic ) , i will try to get information in the web.

Please guide me. Thanks


raschemmel

The Arduino UNO is about 50 to 75mA. The servo can be anywhere from 100mA to 500mA depending on the load connected to the servo. If the load requires a lot of force to move it then the current would probably be more than 250mA.

By Ohm's Law,
V (voltage) = I (current(A)) x R (resistance (ohms)

If you had a DMM (Digital MultiMeter) , you could put it in current mode and measure the current or in voltage mode and measure the voltage across the battery. For most arduino hobbyists looking to control things , a DMM is to them what a tire iron (or jack) is to a traveler. You just won't get very far without one and you should never leave home without it. Either buy a cheap digital multimeter or find another hobby.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Paul1958

As it has been said. You just cant really do electrical / electronic things without a DMM.I am 57 and been doing this kind of thing sense I was about 15, so that is 42 years and these gents have been trying to help and give you good info. 9v battery for uno. 6 AA batteries for the servo. Just make sure to connect the ground (-) wires together.

raschemmel

#12
Sep 02, 2015, 03:04 am Last Edit: Sep 02, 2015, 03:45 am by raschemmel
Quote
My goal now is to find a good power supply to connect the circuit, If I can save money better. I have the ATMega328 on a protoboard with the basics elements to work it without the Arduino uno board. I have connected a 7805 to limit voltage to 5v.
This really tells us nothing regarding where you are with the uC.

What is the SITREP ? (Milspeak for Situation Report)



1-Are you breadboarding an ATmega328 blind or do you know what you are doing ?
2-Do you know how you are going to communicate with the ATmega328 ?
3-Does the ATmega328 have a bootloader already ?
4-What are you using for a clock ?
5-Have you been able to communicate with the ATmega328 yet ?
6-Do you know what a schematic is ?
7-Can you draw a schematic of your circuit and post a photo of it?
8-WHAT EXACTLY have you actually done with this so far ? (have you powered it up? loaded a sketch ? etc etc ?

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Ginza

Hi raschemmel and Paul1958, thanks for your replies. Sorry for my english, Im spanish.

I will try to explain you the situation.

I have finished the project code, now Im testing if it is right. I dont want unexpected behavior, so I want to put the code working standalone on a protoboard.

The devices that I have connected to the Atmega are a RTC module (DS1302) and a BlueTooth module (HC-05). I have communication with the Atmega by BlueTooth with my phone and it works properly. I can get and set data in both ways.

To get the system working standalone, I must get a good power supply option, I need that it should be rechargable.

Yesterday I have connected all on the protoboard without the servo with the 9v battery full charged to see how the system works. It only was turned on 20 minutes. I think that the 9v battery doesnt work for my needs.

In your experience, please recommend me a good and cheap power supply to use. I will try the 6AA batteries like you said me.

I will try to upload some pictures, this are not very schematics, but is the faster way to show you what I have got.

About the DMM, of course I have got one and I use it. But I dont know it by the initals, I know it by multimeter.

Best regards, GInza.

Ginza

Pictures

Go Up