Problem insufficient voltage

Go To Last Post
26 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I connected 1st 7segment display to port d,
2nd to port c ,3rd to portb ,4th to porta
Problem is ..1,2&3 are getting enough voltage
But 4 is not getting enough voltage

This topic has a solution.

Salman

Last Edited: Fri. Mar 10, 2017 - 02:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Pic

Attachment(s): 

Salman

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

And your schematic is?

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It makes life a lot easier if you embed the image in your post - where we can see it - instead of attaching it

Instruction here: https://www.avrfreaks.net/wiki/em...

 

 

That's quite a mess of wiring. So the first thing to do is to draw a proper schematic, then re-wire neatly according to the schematic.

 

Post your schematic.

 

If tidying your wiring doesn't work, then take voltage measurements, and mark them on the schematic.

 

Remember that LEDs work on current rather than voltage as such - so check that your resistors are actually the correct value ...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Basically making clock

Salman

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sounds like the classic: AVCC not or improperly connected. It has to be connected to VCC. If you intend to use the ADC, put a low pass filter in between. Consult the datasheet for specifics.

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Post your schematic - also known as "circuit diagram"

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is it...I'm sorry if its not clear

Attachment(s): 

Salman

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So you have no resistors to limit the current?

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No ...I didnt use resistors

Salman

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

salmanma6 wrote:
No ...I didnt use resistors

Wow. 

 

And apparently didn't look in the datasheet about AVcc.  And haven't told us what microcontroller is being used.

 

If you have the pins, then indeed one could connect each segment to a port pin.  In practice, we'd set up a multiplexing scheme to drive one 7-seg at a time.  So total pins would be 7 or 8 for the segments (often there is a dot.  and a colon for time display can use the dots from two adjacent digits with one mounted upside down), plus one for each digit.

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do u know the multiplexing scheme for operating 7sg

Salman

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seriously - on the entire World Wide Web, you can't find anything about multiplexing 7-Segment displays?!

 

Or the need for current-limiting resistors with LEDs?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm sorry what is ADC..I looked up data sheet cant find it

Salman

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks I'll do it..

Salman

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

salmanma6 wrote:
Do u know the multiplexing scheme for operating 7sg

Do you have access to Google?

Have you searched this site?  How many discussions did you find in the forums?  How many did you find in the Projects section?

 

How many did you find in AVR app notes?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

salmanma6 wrote:
I'm sorry what is ADC..

ADC = Analog-to-Digital Converter

 

Quote:
I looked up data sheet cant find it

You still haven't said what chip you're using for this.

 

In other posts, you have referred to ATmega16

Unfortunately, in the "rebranding", Microchip seem to have lost the Full datasheet - and only list the summary on the Product Page:

 

http://www.microchip.com/wwwprod...

 

angry

 

 

If that's all you have, you will need to do some googling to find the Full datasheet (the one that doesn't say "Summary").

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
You still haven't said what chip you're using for this.

Indeed.  We don't even know whether it is an AVR.  How could the PDF reader fail on a search for "ADC"?!?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Omg...dont get frustrated... Cool cool..I'm a beginner..and your way of answering ...is pro..I appreciate it

Salman

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Everyone would be cool if you simply answered the questions.

 

Moderator

 

Ross McKenzie ValuSoft Melbourne Australia

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Back to the original question, you need to put resistors in series with each output to limit the current to each segment, this will also help to distribute the current evenly. In fact, I bet your power supply can't handle more than 500 mA or so of current, or else you would have burned the LEDs and the CPU.

 

Also, if the CPU you are using has more than one VCC and one GND, remember that all power pins must be connected.

 

With your connection scheme, you will need 4x8 resistors (I'd say 470 ohm or 1k ohm should do). Where do these values come from? Each red LED has about 2V voltage drop, so if you are using a 5V supply, the resistor has to drop 3V and let pass a maximum of 10mA current for a typical LED, so R = V/I, 3/0,01 gives 300 ohms as minimum resistor value.

That's why we normally use multiplexing, this way you would need much less pins, wires and resistors.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:
I bet your power supply can't handle more than 500 mA or so of current, or else you would have burned the LEDs and the CPU.

More likely, it is the resistance of the MCU's output drivers that is limiting the current to each segment.

 

Here's a good site on basic electronics: https://electronicsclub.info

 

And, specifically, how to calculate LED resistors: https://electronicsclub.info/led...

 

LED resistor circuit

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
More likely, it is the resistance of the MCU's output drivers that is limiting the current to each segment.

 

It will -- but will that limit violate Absolute Maximum Ratings?

 

Let's do a little noodling.  From the picture shown, that is a red 7-seg?  Let's say Vf of 2V to 2.5V.

 

A typical 20mm/0.8" 7-seg has an Absolute Maximum Rating of 30mA per segment.

 

Assuming OP is using Mega16 at 5V. that model has pretty good pin-driver strength compared to newer smaller-feature-size generations.  Chart below.  To get to an output V equal to the voltage drop, that would be 70mA or more.   So that is twice the AMR for that size 7-seg.

 

Besides the limitations on the sum of current draw, the Mega16 has AMR of 40mA per pin.

 

So AMR are violated for both the AVR and the 7-seg.

 

Thus, OP could

El Tangas wrote:
have burned the LEDs and the CPU.
, right?

 

[edit] Forgot the chart

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Last Edited: Wed. Mar 8, 2017 - 03:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're right - if the OP hasn't burned the LEDs and/or the IO pins (s)he should be feeling quite lucky ...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Solved... Thanks everyone

Salman

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

salmanma6 wrote:
Solved... Thanks everyone

 

To help anyone else who has the same problem in the future it is considered polite to explain how you solved the problem.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss