Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Problem with Arduino standalone circuit
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Problem with Arduino standalone circuit

by Midhun on Fri Sep 09, 2011 10:07 am

Hi all,

I've made a circuit using the Atmega328 microcontroller but there is some error which I couldn't correct.

The power supply section consists of a 5V regulator (for powering the Atmega, the L293D, 74HC595 and the LCD) and a variable voltage regulator for powering two DC motors. The input voltage given is 9V DC. The regulator circuits works well when they are tested alone but the output of the regulator drops (from 5V to about 3.5V) when the output of the regulator is applied to the microcontroller. Also, when I measure the voltage across the 9V DC battery, it shows only about 6.5V.

The 74HC595 is used to operate the LCD using just three digital pins from the Atmega. I got the circuit and the library from http://cjparish.blogspot.com/2010/01/co ... shift.html

I did the wiring on a breadboard and I rechecked it several times. Can anyone tell me what's the problem with circuit?

Thanks,

Midhun
Midhun
 
Posts: 7
Joined: Wed Sep 07, 2011 2:31 am

Re: Problem with Arduino standalone circuit

by zener on Fri Sep 09, 2011 12:16 pm

It sounds like you have excessive current draw somewhere. It would be helpful if you could post your schematic and also a photo of the assembly.

zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: Problem with Arduino standalone circuit

by Midhun on Fri Sep 09, 2011 1:51 pm

Hi Zener,

The schematic is given below.
Image

I made some changes while connecting the components to the breadboard.
> I didn't connect the four push buttons and the four 10K resistors.
> I attached a 10K resistor from RESET pin to +5V.
> The diode used was 1N4007.
> The serial connection and connections to the sensors were not made.
Midhun
 
Posts: 7
Joined: Wed Sep 07, 2011 2:31 am

Re: Problem with Arduino standalone circuit

by jkcbwpnet on Fri Sep 09, 2011 8:41 pm

this may be irrelevant (I am looking further, but it was the first thing i saw that was unusual) there is an NPN transistor T1 that has GND on the collector and not the emitter. schematic error?

is that 6.5v measured across the 9v when it is removed from the circuit? there is a certain voltage drop across a 7805 it is usually good to input 7v or greater I believe.

unrelated but R1 is a current limit to the power on indicator LED and does not have to be so small I used to always run 470 ohm to leds and have lately been seeing the standard as 330 but the bottom line is the more resistance, the less current and therefor I would look at more like 1k ohm or even larger so to not waste the power. also less power less heat generated.

on that note... do you notice any component getting hot to the touch? probably one of the 2 regulators... that would tell you which circuit is drawing the most current.

the output of your l293d is going to caps not motors... ?

what are pins 12,15,16,17 programmed for on the AtMega chip? output/input? if they are set to LOW and you close S2,S3,S4 there will be a short
S5 n/a?

I'll start with those for now...
http://jk.cbwp.net

jkcbwpnet
 
Posts: 28
Joined: Wed Aug 10, 2011 1:37 pm

Re: Problem with Arduino standalone circuit

by yvest on Fri Sep 09, 2011 10:01 pm

What did you use to build your circuit?

It's a good idea to try then on bread board before soldering any thing.

9V batteries can supply much current! If you are trying to power motors with your H-Brige they are probably not the best choice. Ideally you should use a DC powers supply that you can limit the current. Otherwise a set of 6 AA or a wall wart.

If you can, try removing any non essentials components to see if you can find one that might be causing problems.

What kind of 74595 did you use? the HC family is notoriously bad with floating inputs and the pins from the ATmega would be floating (high impedance) until you configure them otherwise.

Try powering one Vreg at a time to see if one in particular is causing the drop of input voltage.

Good luck,

-yvest

yvest
 
Posts: 18
Joined: Wed Jun 01, 2011 11:23 am

Re: Problem with Arduino standalone circuit

by Midhun on Sat Sep 10, 2011 12:26 am

Thanks jkCBWPnet and yvest for your reply.

jkCBWPnet : ...there is an NPN transistor T1 that has GND on the collector and not the emitter. schematic error?

The actual circuit has an N-channel MOSFET with its Source connected to the Gnd, Drain to pin 16 of lcd and Gate to pin 5 of 74HC595. I used an NPN transistor instead of the MOSFET and it works well when I first tested it.

jkCBWPnet : the output of your l293d is going to caps not motors... ?

That was a schematic error. I forgot to draw the connections to two DC motors. But I didn't connect the two motors or the two caps while testing the circuit on a breadboard.

jkCBWPnet : what are pins 12,15,16,17 programmed for on the AtMega chip? output/input? if they are set to LOW and you close S2,S3,S4 there will be a short
S5 n/a?

The pin 12 is configured as output. The pins 15, 16 and 17 can be configured as input or output- Input when I want to use the push buttons and output when I want to drive the DC motor.
Midhun
 
Posts: 7
Joined: Wed Sep 07, 2011 2:31 am

Re: Problem with Arduino standalone circuit

by jkcbwpnet on Sat Sep 10, 2011 8:58 pm

is anything getting hot? put a 1k ohm resistor in series with the circuit and the 9V and measure the voltage across it to find your current

you didnt answer the 6.5V ? either
http://jk.cbwp.net

jkcbwpnet
 
Posts: 28
Joined: Wed Aug 10, 2011 1:37 pm

Re: Problem with Arduino standalone circuit

by Midhun on Sun Sep 11, 2011 12:44 am

6.5V was measured across the battery when it was connected to the circuit. The voltage across the battery is above 7.5V when it is not connected. No component gets too hot.

Another thing I noticed is that if I run the same circuit from the Arduino UNO board (taking power from the USB port), it works very well.
So I guess the problem might be with the 9V battery.
Midhun
 
Posts: 7
Joined: Wed Sep 07, 2011 2:31 am

Re: Problem with Arduino standalone circuit

by zener on Wed Sep 14, 2011 2:08 pm

If you have 7.5V on a 9V battery it is DEAD. They can't supply much current in the first place even when they are new. That is why it is dropping out.

zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Please be positive and constructive with your questions and comments.