Go Down

Topic: Trouble using tm1638 display  (Read 267 times) previous topic - next topic

scooter4848

Hello all

I'm very new at this but I'm looking for help and advise with a home project I have built.

Over the past few months I have built myself a racing car simulator in which I have a Logitech g25 steering wheel in which I have added a led rpm shift changer using a tm1638. I have followed a video on utube by amstudio on how to build it but I have a issue with the display in that it keeps turning itself off and back on. It's like it's losing power as the display starts out really bright then gets dimmer before it goes out all together.  I have listed the parts below that are in the build


Nano V3.0 ATmega328P Controller Board w/ USB Cable for Arduino


Tm1368 led display

Software is simhub

Any help would be greatly appreciated or if I'm in the wrong section please advise where I can post this.

Happy to get in touch over phone or skype to make things easier

Cheers

Scooter


groundFungus

#1
Apr 26, 2019, 12:55 am Last Edit: Apr 26, 2019, 12:58 am by groundFungus
Does the 5V regulator on the Nano get hot?  How is the circuit powered?  Can you post a schematic?

scooter4848

It gets powered through a long usb cable that plugs straight into my cpu. have tried multiple usb ports with the same results. It worked fine before I up graded simhub software.  It displays the time fine and will run that all day long

flagtrax

It seems like a power fade from what you describe. I'd think since you are powering it from a USB port whose output is generally in the 500 ma range, you're drawing more current than normal. Here's a link to the specs on that display.

https://retrocip.cz/files/tm1638.pdf

scooter4848

Thanks for the reply trax so how do I fix this as it has worked previously. Seems strange. Sorry pretty new to arduino

flagtrax

Well, without knowing your exact layout, and assuming by your description you're  powering the entire project from the USB port, specific instructions are hard to give. So basically (and this is true of any device control with Arduino), you need to provide enough power to support the needs; you can add to that it's not a good idea to power high current needs through the regulator on an Arduino board. My thoughts would be:

First you need to find a power source for your needs. 5V adapters are plentiful online via Ebay, Amazon, etc. with enough current capacity (Example: Something like a Raspberry Pi requires ~2.5 A@ 5 V to function).

Instead of feeding the circuits driven by the Arduino their power should be fed directly by a supply outside of Arduino's power scheme. (Remember to provide a common ground!) This will allow the Arduino board you're using to "worry" about supplying power only to itself and not additional components.

An additional reminder that the current output ratings on ATmega 328P MPU's is 40 ma. If you need to drive something with more current than that you'd need to drive it through a transistor, or relay, depending on application. Hope that helps.

Paul__B

An additional reminder that the current output ratings on ATmega 328P MPU's is 40 ma.
Poor wording.  That is not the "rating" (and not the correct unit).  If you want a "rating", perhaps 30 mA.  40 mA is the figure not to approach.

flagtrax

#7
Apr 27, 2019, 03:39 am Last Edit: Apr 27, 2019, 04:54 am by flagtrax
Well Paul__B, I won't argue semantics with you. There are many places all over the web that state 40mA max. (many times on this forum) One example:  https://forum.arduino.cc/index.php?topic=90747.0.

My point was "don't go beyond that".In my day in 40 years of global telecommunications the max "rating" was the limit to quote. I may not speak "your language", but I'm not rude either. You're world may be different. I'll give you that, but I believe the point was made.

Paul__B

My point was that in advising what are avowed to be "beginners", you should do so in a responsible fashion.  You do not tell a learner driver that the "rating" of the car is 120 mph with the implication that this is to what they should aspire even if you know the car will attain that speed.  :smiley-eek:

40 mA is the specified absolute maximum for I/O pins.  The working  rating is perhaps 25 mA and that is what your instruction should be.  That would be helpful, specifying the absolute maximum by way of guidance is not.

If in your field of work it was considered de rigeur to operate everything at its specified absolute maximum safety rating, well and good but it sounds to me more like real estate sales than engineering.  :smiley-roll:

flagtrax

#9
Apr 27, 2019, 02:56 pm Last Edit: Apr 27, 2019, 03:03 pm by flagtrax
Quote
40 mA is the specified absolute maximum for I/O pins.
And that indeed was my point.

Quote
f in your field of work it was considered de rigeur to operate everything at its specified absolute maximum safety rating, well and good but it sounds to me more like real estate sales than engineering.  :smiley-roll:
Of course is wasn't. It was used as a reference.

Alas I find myself doing what I didn't want to do. Arguing semantics.  In some areas of the world one might call a depression in the area a "valley", in another one might call it a "hollar". What another interprets that to mean is is strictly theirs. For example:

Quote
it sounds to me more like real estate sales than engineering.  :smiley-roll:
on your end, you may not intend to sound arrogant and insulting, but that's how it is interpreted on this end.

larryd

Remember, there is a maximum current rating for the package also.

Using 40mA on each pin will get you to this value sooner than 20mA  ;)





No technical PMs.
The last thing you did is where you should start looking.

flagtrax

Totally agree LarryD, and if ALL the parameters of the chip are needed to answer the original question (or any others), a pdf of the spec sheet can be found thanks to sparkfun here :

https://www.sparkfun.com/datasheets/Components/SMD/ATMega328.pdf

As a disclaimer, let it be understood that this is not the only spec sheet available. Search and find the one that suits your needs.


Go Up