Led dot matrix not working, likely a problem with power or bad solder

Hi!

I'm trying to build a very simple rotary encoder controlled game with dot matrix display. I had it working on a breadboard with a configuration similar to the attached image. Only notable difference is that I have the switch in the positive lead from 9v without resistor.

Once I soldered the whole thing together though it started acting weird. The display now turns fully on after reboot, the delay seems to depend on what kind of surface the display is on. At one point the display went on and off depending on how close my hand was to the DIN wire without even touching it! To fully confirm this, I removed the whole mess from laptop and ran it on battery with same results. Is my magnetic field actually affecting the circuit enough to change inputs? Also touching the display leads results in erratic behavior on it.

Board itself and the program seem to work because I get the right results from rotary encoder to serial monitor.

I've checked the solder and resoldered but I don't know, maybe I missed something.

Only notable difference is that I have the switch in the positive lead from 9v without resistor.

It sounds like floating input. Why did you remove the pull-down resistor?

I actually drew that schematic after I had already constructed the project, it didn't even occur to me that a switch would need a resistor. What do you mean by floating input? And is it possible that the switch somehow messes up things if it doesn't have the resistor?

An input pin has a high impedance and can pick up 'noise' from the environment; the Arduino sees this as HIGHs and LOWs and reacts on it.

If you left the pull-down resistor out, you have a floating input.

Not sure where the below image comes from, I hope that the author (larryd?) doesn't mind that I share

Note:
You can replace the push buttons in above by toggle switches

Thank you! Would you guess that the switch was the culprit?

Not the switch, but the omission of the resistor to keep the input at a fixed level when the switch is not in the 'on' position.

Ah, sorry, maybe I explained the diff between my construction and the schematic badly. In my board, the switch controls the power to the board so when it's off, the Arduino doesn't get any power at all.

Redraw the schematic so it reflects what you actually have. Show it in a new reply.

Circuito.io doesn't allow editing the schematics. I tried to find an alternative but no such luck. Basically what I have is 9V battery's positive lead going to my switch and the lead from switch going to VIN without any resistors in between.

Edit. I drew it myself then.

OK, a few concerns here.

  • You should never be powering this via "Vin". At full brightness the display will draw 320 mA which will overload the regulator on the Nano. There will be some lesser display usage which will be the critical point, it is hard to predict exactly which, This may produce some odd behaviour.
  • You should power the system with 5 V to the Nano such as by a USB "phone charger" to the USB port (which is OK for just one matrix display) or the "5V" pin and ground.
  • Your "Fritzing"-style diagram suggests use of a breadboard but you say you soldered it all together. Breadboards are often unreliable. Assuming good soldering and good wire (the popular Chinese jumper wires can be dodgy) there should be no bad connections.
  • The encoder module should include pull-up or pull-down resistors so there should be no floating inputs.

Paul__B:
You should never be powering this via "Vin". At full brightness the display will draw 320 mA which will overload the regulator on the Nano. There will be some lesser display usage which will be the critical point, it is hard to predict exactly which, This may produce some odd behaviour.

I'm powering the nano with 9V via Vin. Is this wrong in this case or in general? I read that you should NOT power your board via 5V pin. Isn't it the correct pin to power the rotary and led matrix?

Paul__B:
Your "Fritzing"-style diagram suggests use of a breadboard but you say you soldered it all together. Breadboards are often unreliable. Assuming good soldering and good wire (the popular Chinese jumper wires can be dodgy) there should be no bad connections.

The encoder module should include pull-up or pull-down resistors so there should be no floating inputs.

Yes, it's soldered. It was working just fine on the breadboard.

I'm getting confused about the 5V and Vin. I guess I gotta do some googling.

ninjapiraatti:
I'm powering the nano with 9V via Vin. Is this wrong in this case or in general? I read that you should NOT power your board via 5V pin. Isn't it the correct pin to power the rotary and led matrix?

It is very sad that certain nonsense on the Arduino pages which is obsolete and unable to be corrected, recommends against powering the boards via the "5V" pin since that is the outright most sensible way to power it. All the logic circuitry runs on 5 V.

"Stock" explanation (one version :grinning: ):


The expression seems to come up here often - "powered by Arduino". It is a very strange concept, suggesting a very limited understanding of electronics.

You don't "power" anything from the Arduino - it is in no way a "power supply". You provide power - 5 V regulated - to the Arduino. So whenever such a statement is made, we automatically know there is a connection/ configuration problem.

An Arduino - such as a UNO, Nano, Pro Mini, Leonardo and similar - in no way resembles a power supply. A "power supply" is a component you plug into a "power point" or "utility outlet". Or devices may be powered by a battery of suitable capacity. But that and an Arduino are totally different things.

The confusion is usually encouraged by descriptions in the Arduino references that there is an on-board regulator on these boards. This is true - there is a regulator on the board and it can be used under limited circumstances to power the Arduino board and only the Arduino board. Essentially nothing else as the regulator, whatever its rated capacity, has no effective heatsink and will overheat and (hopefully safely) shut down if required to provide more current than the microcontroller itself and a few indicator LEDs at 10 or 20 mA each. Your matrix display will likely exceed this, the rotary encoder is of no concern.

If you power the Arduino versions which have one, with 5 V via the USB jack, then up to the limit of the on-board protective fuse and power switching circuitry, you can pass the 5 V through to the "5V" terminal on the board and use it to power other devices - such as LEDs - up to the limit of that fuse, nominally 500 mA. But in general, the Arduino is simply not a "power supply" in any sense, so referring to "powering" something by it is meaningless.

As an aside, everything above applies to the thing described as a "MB102 power supply module" in its various versions. You can use it to supply 5 V to a few logic ICs or an ATMega328 chip and a few indicator LEDs at 10 or 20 mA each. That is its purpose. If you need to power something that does not fit on the breadboard or requires more than 100 mA, then you need a suitable power supply. If you can find the adapter, you can plug a 5 V power supply such as a "phone charger" into the USB port on the MB102 power supply module and have it reticulate that 5 V to the side rails on the motherboard up to 500 mA or a little more; this is its purpose - a convenient power adapter; not a power "supply". :grinning:

Hi!

I had a design that stopped working after I soldered it together so I'm building it from scratch. I'm trying to do things right this time, is the attached schematic feasible? Some people say that the dot matrix would draw 200mA of power but I'll never run more than third of the leds simultaneously and there was a test on these forums where the actual current draw with all leds was only 67mA.

Still I'm thinking is the 9V battery enough or would I be better off with 4 or 6 AA batteries?

P.S. At some places the generated schematic is bugged, I'm obviously not going to connect the VCC, GND and DIN pins of the dot matrix together.

A 9v battery is essentially devoid of power, so you are just kidding yourself. If you really know what you are doing, which seems unlikely, you may be OK with 4xAA, but 6xAA is simpler and more reliable. Either way, powering it through a decent regulator or converter would be a good idea, rather than use the crude onboard stuff.

You might also consider using a single or pair of 18650s. More and more people seem to be using an 18650 phone charger these days.

Yes, I'm a complete noob. How does pointing that out help with anything? Anyway, is the design otherwise ok? Can you elaborate why the on-board regulator is crude?

The onboard regulator is designed to run the board and maybe an LED or two. It has little or no heatsinking so it totally unsuitable for anything but initial board alone use. Feed the board directly with a decent 5V supply.

You pretty picture tells us nothing, could we have a circuit diagram please?

I would also strongly recommend against using a breadboard for the job, especially when you are going to draw any reasonable current. If your soldered one didn't work, then fix the problem rather than put a sticking plaster over the symptoms.

I'm afraid I don't know anything about encoders or LEDs. You are already aware that a lot of LEDs can consume a lot of power and it seems you are already multiplexing them. You are also aware that the diagram is neat but incompetently drawn, and why. Actually, the regulators on your Nano may not be that bad. I only say that because they are a lot smaller, and presumably a newer type, than those on Uno and Mega, which are notoriously inefficient and best avoided.

Essentially you never use a 9v PP3 for anything to do with Arduino, unless you are desperate and acknowledge their limitations. The absolutely last thing you do is run Arduino on a PP3 before you prove it is kosher running it off a proper power supply. You are not alone and you will find many around here complaining that their project won't work when the only thing wrong with it is the 9v battery. Volume divided by voltage is a fair indication of available power in a battery, and its voltage divided by that which you need is an indication of the task for the regulator.

Thank you all for the advice! I removed the 9V and replaced it with 4 AA batteries and everything seems to work fine.

@ninjapiraatti

TOPIC MERGED.

Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum.

Sorry, I thought that the subject would justify a topic of its own. I will be more careful, thanks again for the help.