Go Down

### Topic: 6 digit 7 Segment display - TPIC6B595 schematic component? (Read 10547 times)previous topic - next topic

#### johnhuebbe

#15
##### Mar 11, 2013, 07:04 pm
Ok, so I'm starting to get together a list of components for my full size prototype, and I'm thinking about power requirements.

Can anyone help me or point me in the right direction with batteries?

For instance, I'm looking at 2 LiPo batteries.  One is 5500mAh at 7.5V and the other is 5500mAh at 15.0V.  I plan on using a DC-DC switching regulator to step down the battery voltage to 5V for the Arduino (like this: http://www.digikey.com/product-detail/en/OKI-78SR-5%2F1.5-W36-C/811-2196-5-ND/2259781?cur=USD) and use the voltage straight from the battery to power the LED displays.  (good / bad idea?)

For the sake of simplicity, lets say each of my display segments uses 6 LEDs and each LED is 2.5V.  So, for my 7.5V battery I could wire 2 rows of 3 LEDs in series and for my 15V battery I could wire 6 LEDs in series (correct?)

Now with my battery, will my displays last just as long, since each battery is 5500mAh?

#16
##### Mar 11, 2013, 08:00 pm
If you wanted 6 LED segments, you would need 2 segments of 3 series-wired LEDs driven in parallel, consuming 40mA from a 7.5V source,
or, 1 segment of 6 series wired LEDs consuming 20mA from a 15V source.
You could use a TPIC6B595 to sink the 20mA or 40mA from the segments.
If you had 3 pairs of 2-LED strings then you would consume 60mA/segment.
Take advantage of the higher voltage & decreased current by running more LEDs in series.

Convert enough 5V current to power the '328P and the shift registers if you go that route.

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.

#### johnhuebbe

#17
##### Mar 12, 2013, 04:47 am
Ok, I think I understand.  As for the battery, I'll probably go 15V w/switching regulator.

Some more updates.  I have my breadboard now hooked up to my GPS and it is pulling in the GPS time and displaying it on the 6 digit displays.  I also have a 4 line 20 character LCD screen.  It is hooked up to the Arduino via a Software Serial connection.  I have both the 6 digit LED displays and the 4 line LCD displaying the time from GPS.

Now, my problem.  The LCD lags behind the 6 digits.  It is around a half second delay.
Is this because there is a long delay with using Serial?  Or could it be the cheap screen I'm using?

#18
##### Mar 12, 2013, 05:41 am
Can you increase the transission speed to the LCD?

Or update the LCD first, then update the 7-segments.
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.

#### johnhuebbe

#19
##### Mar 12, 2013, 02:14 pm
From the LCD datasheet, it looks like I can change the BAUD rate with a command.  The default is 9600.  The display can go all the way to 115.2K.  I'll try changing it tonight and see if I get better results.

Also, the LCD display can be controlled by either Serial, I2C, or SPI.  Is one better over the other?

#20
##### Mar 12, 2013, 04:16 pm
SPI is the fastest for getting the date there. I use it as much as I can.
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.

#### johnhuebbe

#21
##### Mar 13, 2013, 02:30 pm
I changed the baud rate for the LCD screen and it didn't change how the 2 displays were out of sync.  So, I'm thinking that it is either: code related, using serial with the display is slow, or the display is just slow regardless.  I'll try using SPI with it. (I just need to solder on a few more pins to my lcd)

Now, if I want to use SPI with the LCD screen, do I just daisy chain the MOSI & SCK lines from my 7 segment displays along with adding another line from my Arduino as a second Latch?

Some other questions...
1. I've noticed that my LCD screen flickers.  It seems to be in time with when it updates every second.  Could this is something to do with the power?  Speaking as a non-electronics guy, if it is power related (and not simply a cheap screen with inherent defects) would adding a capacitor help?  If so, how do I add it into my circuit? (polarized electrolytic across + to - at the display?)

2. Looking at 7 segment LED display, the time sometimes skips over a second or laggs. Like it will display 11:40:01 then 11:40:03.  I'm using the example code from the Adafruit website to grab the GPS time.  Like this:
Code: [Select]
`// if a sentence is received, we can check the checksum, parse it...if (GPS.newNMEAreceived()) {    GPS.parse(GPS.lastNMEA());   // this also sets the newNMEAreceived() flag to false        // Update our clock variables with the GPS time    clocksecond = GPS.seconds;    clockminute = GPS.minute;    clockhour = GPS.hour;}`

I then use my clock variables to set the numbers on the display.  Could it be that the GPS isn't always sending out an update every 1 second?  The GPS is using a SoftwareSerial connection to the Arduino. Could that be part of the reason?  Or, could it be taking the Arduino longer to parse the serial data at one time and less at another time?

Or, should I be going about getting the time from the GPS in a different way?  I was searching around and came upon this post:

Quote
Yeah, typically the serial data starts transmission on the PPS, but at 9600bps, it can be a long time before you actually get your data out of it (and it's not really convenient to watch for an edge on serial data like it is to watch for a PPS line). I typically watch for the PPS, then I know what time that PPS was by reading the GPS data that follows it.

There is a PPS pin on the GPS unit.  Anyone have experience with using this?  I might try posting my question over on the Adafruit forum...

#22
##### Mar 13, 2013, 03:01 pm
"Now, if I want to use SPI with the LCD screen, do I just daisy chain the MOSI & SCK lines from my 7 segment displays along with adding another line from my Arduino as a second Latch?"

Yes.

"If so, how do I add it into my circuit? (polarized electrolytic across + to - at the display?)"

Parsing the message, or how often the GPS updates: have to work that out in your code.
If it has a seperate 1 pulse per second (PPS) pin, you could capture the time and then update with the 1 PPS signal, doing a time reading every once in while to make sure you're still in sync.
Yes.
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.

#### johnhuebbe

#23
##### Mar 13, 2013, 04:11 pm
Ok, seems simple enough.  I'll have to dig through the datasheet on the LCD screen and see how I need to modify my code to send it text using SPI.

As for the PPS signal, I haven't played around with providing any input to the Arduino.  I guess I need to look into the pulseIn information?

#### johnhuebbe

#24
##### Mar 14, 2013, 02:05 am
I added a 16V 1000uF electrolytic polarized capacitor to the power going into the LCD screen.  Didn't change the flickering.  It seems to flicker whenever it is refreshed.  I played around with the code some and only have it refresh every 10 seconds.  When it is just static there is no flickering.  (also, the flickering seems to be coming from the LEDs that act as the backlight)

The only things I can think of that would be the cause of the flickering are: power or cheap LCD.  :~ Could the Arduino not be able to deliver enough current to the screen when it refreshes?  The datasheet says it typically draws 250mA. (doesn't give a min or max, just typical)

The other thing I noticed is that the time displayed on my 7 segment display is slow by about 1/2 to 3/4 of a second. (I compared it to a SkyScan atomic clock and an online clock) I don't need my clock to be crazy accurate, but 1/2 to 3/4 of a second is off too much.  Could it be taking this long for the GPS to send the NEMA data to the Arduino, have the Arduino parse it out, then use it to set the time?  Would the update go any faster if the GPS was hooked into the hardware serial pins 0 & 1 TX/RX?

I did a simple test and hooked up the PPS signal wire to a teeny tiny speaker and could hear the pulses every second.  They matched exactly (as best my ears could tell) to the seconds from both of my clocks.  So, I think a plan would be to have the Arduino listen to and count the pulses and use that to sync for the clock.  Unless anyone has suggestions.  I'm all ears.

#### johnhuebbe

#25
##### Mar 17, 2013, 05:10 pm
I'm having trouble using the PPS on the GPS unit to trigger an interrupt.  I posted a new question here: http://arduino.cc/forum/index.php/topic,154776.0.html  if anyone wants to follow along/help.

#### johnhuebbe

#26
##### Mar 24, 2013, 03:04 am
As an update, I bought a few different kinds of LEDs to see which ones I like best.  I got some of the Cree 5-mm Red 3000mcd - 12000mcd high luminous intensity LEDs.  Holy crap those things are bright.  I could barely look at them outdoors, much less indoors running at 20mA. I think I still see spots.

#27
##### Mar 24, 2013, 03:26 am
I have some 5mm ultrabright white LEDs - am only running them at 2-3mA due to the brightness. Wow!
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.

#### johnhuebbe

#28
##### Mar 26, 2013, 04:08 pm
I'm starting to layout some components for my displays.  Are there any pros or cons for placing the 595's?  Should I group all of them together on a board and then run 8 LED drain wires to each of my 7 segment displays?  Or, place 1 595 at each 7 segment display and run 3 wires (MOSI, SS, SCLK) from the arduino to each display?

#29
##### Mar 26, 2013, 08:59 pm
Having them all on one board and then running a ribbon cable to each display is a nice clean way to go, keeps your SPI signals all in 1 place.
Essentially this:
bare boards available for \$6 mailed to US locations.
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.

Go Up

Please enter a valid email to subscribe