Go Down

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

Ginza


raschemmel

You didn't answer the most important question:
How do you know there is a pot and do youbhabe the schematic and what is the voltage across the pot. That is all that matters at this stage.

Que le importa las otra cosas si no sabes que necessita de la circuita que maneja la barca ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Ginza

Hi raschemmel, what is the meaning of POT ?

I dont have schematics yet. I will try do it then.

What do you think about 6AA pack before the 7805 ?

raschemmel

Quote
You didn't answer the most important question:
How do you know there is a pot and do youbhabe the schematic and what is the voltage across the pot. That is all that matters at this stage.

Que le importa las otra cosas si no sabes que necessita de la circuita que maneja la barca ?
DISREGARD ABOVE (It was intended for a different post. I got the two posts mixed up . My bad)

Do you upload sketches via bluetooth as well ?

Your original problem of reseting was because of the battery type you were using.
Use the 6 AA batteries.












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

Ginza

No, I upload the sketches by USB.

I use BlueTooth to get and set data at the AtMega.

I will use the 6AA pack and test how much time it is turn on.

Can you tell me how many amps must be the AA battery ? Because they are in different amps versions.

Also, I have a 12v/4Ah. Do you think if I connect it before the 7805, the 7805 will regulate the voltage and amps to the ATMega328 and doesnt destroy it ?

raschemmel

You said you're using an ATmega328. You didn't say UNO or any other arduino board. You also didn't mention if your chip has a bootloader. You're telling us you upload sketches with USB but the ATmega328 doesn't have any FTDI USB to TTL  serial capability. The only way you can load sketches is by using an FTDI adaptor (USB to TTL serial), so did you forget to mention that you have one of those and that's how you are uploading sketches ? You also didn't mention what frequency you are using and how.


We're taking our time to help you . If you are just going to ignore our questions then maybe I should go work on another post.

I posted this:
Quote
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 ?
I don't see any answers.


Quote
I have a 12v/4Ah. Do you think if I connect it before the 7805, the 7805 will regulate the voltage and amps to the ATMega328 and doesnt destroy it ?
You could but it would the 7805 will run a little hot dissipating the extra heat.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Ginza

Hi raschemmel, sorry. Im new in this.

Yes I have got an Arduino UNO and upload the sketches by USB. But a few days ago I have burned the sketch on the ATmega328 and put it standalone on a protoboard to test it 24/7.

Today I will try the 12v/4Ah battery with the 7805 and something with it to dissipate the heat.

When I could buy the AA batteries I will try this option too.

I really appreciate your time and your help.

I only ask here when I cant get information from the web or to get some experience of the people that has more knowledge like you.

Best regards, GInza


raschemmel

You don't have to do that . If you get one of these   all you need is this
 to load the sketches and you can breadboard atmega328s. You do need the 16 Mhz crystal, 2 18 pF caps and a few other minor components.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Ginza

Hi raschemmel, yes I have seen that the sketch can be uploaded with a FTDI module. But in my country is very complicated found and buy arduino parts and PIC elements. And when you found a shop the prices are very high because there is not competition of sellers here.

Im fighting now to get a 28 pins DIP zocket  :(


Please tell me, about de 6AA bateries option to power the protoboard, which mAh they must be ?


Best regards, Ginza


raschemmel

#24
Sep 03, 2015, 03:58 pm Last Edit: Sep 03, 2015, 09:07 pm by raschemmel
do the math
Make a list of everything that will be powered by the batteries and how much current each one draws
Ask yourself how long do you want this system to run on a fresh set of batteries.
mAh = Totol current draw/# or hours of operation

Example:
Let desired hours of operation = 6
Let total current draw = 333mA

required mAh rating of batteries = ? mAh

required mAh = [Total current draw] * [# or hours of operation]
       
                     = 0.333A * 6 hours
                     = 2000 mAh


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

pegwatcher

#25
Sep 04, 2015, 04:02 am Last Edit: Sep 04, 2015, 04:10 am by pegwatcher
For rechargeable power, If it were me, I would first try a single Li-Po cell. Voltage runs between 3.7 and is 4.2 volts when fully charged. It will run the 328 just fine and puts out huge current for it's volume and weight to run the servo.  One advantage is you don't need a voltage regulator. Maybe that voltage will be too low for your servo load, Depends upon the force the servo needs to exert but if you can get or borrow one it would be worth a try.

I run 328 off of single Li-Po cells all the time. So far they always work at 16 MHz ok. If you use that cell, YOU MUST CHARGE WITH A PROPER LI-PO CHARGER, otherwise you could have an explosion or nasty fire.

HobbyKing is one good mail order source for Li-Po. This might be a more expensive solution than you need, so then you need to use 5 or 6 AA cells with regulator, or just 3 cells without a regulator; maybe NiMh so you can recharge them. Again, a special charger is needed.
I'm not a complete idiot. Some parts are missing.

raschemmel

I would opt for a 2S lipo at 8.4V fully charged and use the 5V regulator.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

pegwatcher

Quote
I would opt for a 2S lipo at 8.4V fully charged and use the 5V regulator.
Yes, definitely if you are using analogRead or any other thing that needs precise voltage. OP never said what all he is doing with his rig.
I'm not a complete idiot. Some parts are missing.

Ginza

Hi everybody, thanks a lot for all your replies. Im happy because Im learning a lot with you  :)

Look, I will tell you what a I have thinked yesterday night. I have a medium protoboard and two mini-protoboards. I will burn the sketch in three ATMega328 and prepare the three protoboards to work them standalone.

About the things that must be powered, each circuit have the ATMega328 and the necessary components that it must have to work (10k resistor, two 22pf capacitor, crystal oscillator, etc) and also I need a HC-05 Bluettoth and a RTC Module DS1302 (board that already has 3.3v round battery).

About the time that it must work, well I want that it works the greater amount of time that it can. So when I know how long it can work without a recharge or battery replace, after that I will can take other descision. Now if it can work standalone more than one day is ok.

I want ask you about this, I didnt found 6AA battery box, but I have found a cheap 4AA battery box, perhaps you can help me about the mAh of the AA batteries that I must get, so I will can buy 3 4AA battery box and buy 12AA batteries to start my testing on protoboards to improve the code of the sketch.

The RTC module works with 2.0-5.5V full operation and the Bluettoth module works 3.6-6V. Besides there is the ATMega328.

Now for testing on protoboards, I will put a led or a buzzer replacing the servo. So then, when I get the basic elements working I will add the servo and think about how to power supply it.

I have thinked that this month (September) I must have the circuit tested and finished and the code tested. And the code must be without errors or bugs working 24/7.

Like always, best regards to everybody.

 


raschemmel

#29
Sep 04, 2015, 04:19 pm Last Edit: Sep 04, 2015, 04:22 pm by raschemmel
You need to be more organized and follow instructions.
You are posting on the forum for help .
The basic concept here is that you're the NOOB and we're the experts.
You ask us what to do , we tell you and you do it or explain why you cannot.
You were asked to list all the devices 1,2,3 etc and how research how much current each draws and enter that value next to the item :
ie:
1-ATmeg328 : 50mA
2-RTC module : 30 mA
etc etc.

at the bottom there should be a total current draw .
You were also asked to list your battery mAh options
ie:
option-1: 1500 mAh
option-2: 2000 mAh
etc.

You stated you want it to run as long as possible, which  means your battery choice is simplified to the one with the highest rating.

We recommended 6 AA batteries. You state you can only find 4 AA battery box.
Come on, really ? You mean you can't figure out how to use two 4-battery boxes to obtain a 6 battery pack ?  THINK . You short the last two battery compartments with a jumper wire soldered on and you wire the two boxes in series.  If we tell you should use a 6 battery box and you can only find a 4 battery box, if you can't figure out how to make that work you are supposed to come back and ask us
"Is there a way to use two 4-battery boxes to make a 6 battery pack ?"

You state you are going to buy three 4-battery boxes  and 12 batteries. How were you planning on wiring those up ? Each box is designed for a 6V pack.  Are you implying you are now considering running your circuit on 6V  (x3) ? Are you going to be using a 5V regulator ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Go Up