Main Site Documentation

LED Strip - Power supply


#21

[quote=“Brett”]
so lets really talk details here. How are you powering the Panda2? I think we’ve all been assuming you’re powering it via the same power supply, but I can’t see you actually say that. Please be specific - how do you power up both the Panda and the LED strip. [/quote]

I power Panda2 and LED strip separately.
So far Panda2 is powered via USB, but later on I’ll add a 9V power supply, as long time ago I was told by Gus and overall read in the manual that 5V is not enough to run Panda2 via DC IN and I need to use 7v-9v power supply.

Yes, I’ve checked that and the power supply delivers 5.2V without a load, which is good I suppose. I suspect it IS regulated as it converts AC into DC. Am I mistaken?

What it’s said on the web-site: Constant voltage AC to DC Switch Mode Power Supply. (https://goo.gl/dqBiiQ)
Why is it bad?

Also, is it possible to feed Panda 2 with the same Power Supply I use to feed the LED strip? Is 5V enough? Because I would really appreciate dropping one power supply.
Won’t it make problems in circuit and schema overall?


#22

:hand:

You need to use a COMMON GROUND for this to work. Fix that and you’ll probably see a consistently working strip. Report back once you’ve done that.


#23

Just expanding on “regulated”. Regulated power supply means the voltage, irrespective of load, is known. A cheap non-regulated power supply can read for example 8v when it’s “rated” at 5v, if it has no load on it. This kind of supply is not suitable to run electronics

Expanding on how you should power the entire setup. If you are confident that the 5v supply is “good” then you can apply that 5v power to the 5v header on the Panda, and that should power it up (as it will feed the 3v3 regulator). You need to then use the GND connected to any of the GND connectors on the Panda. If you’re not confident that it’s “good” then you risk damage, but the most likely possible problem would be the 3v3 regulator.

The power supply fed in through the barrel connector runs through a regulator to get 5v, which is then fed into the 3v3 regulator which then powers the processor. The drop-out on the regulator is such that you want 6v in at a minimum to get 5v out, and you want a maximum of 9v in so you don’t burn up the regulator through it’s heating as it regulates down (that’s the GHI guidance from the silkscreen).


#24

That may be a problem, as Power supply has its own ground and the PC which feeds the Panda has its own too. However, if common ground means that they both should be put into the same power outlet - I can try this out.
A thing to have in mind: with other 4.5V power supply it did work though nothing was changed in terms of the ground.

According to what my multi-meter shows I would say it is regulated, however, I am not sure.

Thanks for your explanation on powering the Panda - now it makes sense to me.


#25

@ DeathBloom - We call ground GND, which is different from earthed (which is what you’re thinking ground is). You have to ensure that the negative side of all the power supplies are connected together. The negative side is called GND. Same thing as on a battery. We know that electronc flow from the -ve side to the +ve side, however we kept the classic theory that the opposite was true when dealing with electronics. This is because humans hate to change.

So just ensure that the negative sides of the power supplies are connected. In the case of the panda, there should be a few spare pins marked as GND into which you can connect the LED power supply. Note: Don’t connect the positive side to this pin, or the ghost of the blue smoke will appear, and it will haunt your workshop.


#26

Sorry for confusion. Yes, I have a common ground: the led power supply “-” is connected to the node where Panda’s GND is connected to.

BTW, I fail to find 2N7000 transistor in my city and I failed to solder 2N7002 - it’s freaking micro. Do I have any alternatives? And here I mean maybe I can take a fet with different U and I rather than 2N7000 where U=60v and I=200mA? What’s the rule? I really don’t want to incorporate the 4-4 logical level shifter plate for just 1 connection.


#27

humour us. Power the panda just from the LED supply and not separately from the USB port. Does the LED strip work?


#28

You mean I need to connect “+” & “-” of power supply into 5V and GND of my Panda respectively?


#29

@ DeathBloom - Yes, into 5V and GND. Note: not the VIN.


#30

So that connection proved I can power both Panda and LED Strip from one power supply. It did work.

However, the LED strip still behaves weird and doesn’t get the commands from the micro-controller properly.

Will try to get the logic level shifter tomorrow.

P.S. the above connection implies I still can have a USB plugged in for the debug purposes, correct?


#31

For the record I know I am going to get slammed for saying this, so screw it. I know many of you have thought the same thing just never said it to anyone here.

@ DeathBloom, I don’t mean to discourage you, but I have to ask you an others in this same boat.

It’s clear you know very, very little about electronics, and that’s ok, we all have to start somewhere. Why in the world would you jump in both feet into something way above your head? Electronics is not like legos in that if the connector fits another your good to go. Why would you spend your money on something, and have no idea what your really doing?

I am all for people learning something new like you are, but why so many of them try to blink a led, spin a motor without ever at least learning first the absolute basics in electronics, like how to calculate a current resistor for a led or for that matter even know a led has a polarity. Understand current draw on a I/O pin, know what a transistor does and how to use it, and calculate the base current resistor properly. Let alone not own a $8 el’cheapo meter just blows my mind. Many don’t even know that I2C needs pull-up resistors, and moreover what value to use on a 3.3V system compared to a 5V system.

Many more yet that play with I2C and SPI done even own a cheap scope. The copy and paste code examples, plug in these modules and get the gizmo to work and then get all excited and then go full throttle into thinking of something larger to make, and when they do and it does not work they are scratching their heads wondering why it worked on the bench but after i put 50’ of cable to it, it stopped. Then all the forum questions start why this and why that, and did you do this and did you do that. Hey, just pull your scope out and probe the lines and you will quickly see what the problem is.

LEARN BASIC ELECTRONICS first people, and for the love of pete get some testing equipment if you plan to do more than the basics.
I hate it when I see people make things that don’t know jack, and just because it’s working they think all is well. Start selling it to their friends and such and then there is a fire at night because of it.


#32

@ MikeMoy - No one is forcing you to read, let alone contribute to, these help sessions for the non EE’s among us.

I applaud Mr. Smith and Brett’s generous efforts to guide us in our blind path into electronics via tiny boards. :clap:

This is a great forum of experts and novices alike, please don’t try to shape it into an experts only forum.


#33

@ MikeMoy - There are many reasons why I answer the questions of newbies on the forum. I’ll use my personal experience as an example.

First off, there is nothing wrong with exploring. Don’t know how to blink an LED in a 5V system? No problem, you’ll learn after the first few blow out on you. Not everyone has the time/money to do 3 years of information technology design (programming), 3 years of Electronics Design, and 3 years of Mechanical Engineering; I certainly do not but I’m still trying to do a project that requires all those skills. Even after the schooling, you’ll learn practical skills in the industry of each of the aforementioned bodies of knowledge that you won’t learn in school. So to be well rounded in each would require a master level (post-graduate) degree. That’s 15 years! So your suggestion of learning the basics before hand just isn’t always practical for everyone’s situation. I for example started learning electronics in primary school. I learned about transistors, current, voltage, logic gates etc all before college. Even after that, during my career I keep learning about digital electronics and µC programming (in assembly btw). Then along came GHI and Fez Domino.

Secondly, it helps the person who’s asking learn faster when I mention things like, the difference between how current flows in a diagram vs how it flows in physics; and the difference between GND and Ground. This is not something that a new person may know straight out of the block. I do remember the pain learning which way was which back in the early 2000’s from blowing many an IC and transistor. But learn I did.

Thirdly, these forums are constantly crawled by search engines. If in the future some twelve year old is trying their hand at something similar and they happen upon these knowledge base articles, it will benefit them to see what has been tried before, and the explanations of why and why not.

Lastly, GHI as a company benefits from having an advanced and active community, where at least two disciplines meet. Anyone trying to determine if purchasing GHI products is a good investment, will happen upon these articles and realize that there are many knowledgeable (and helpful) people around them, who can sometimes answer questions before even the manufacturer can. Even seemingly off topic ones like which way to Ground. The forum acts in a way like industry experience which some of us (i.e myself) may lack in electronics.

P.S. Just because I have a scope, doesn’t mean I know how to use it to diagnosis transmission line problems; oh and thanks for the tip about I2C needing pull up resistors. I didn’t know that either :smiley:


#34

I’m still suspicious of your code playing a part, but the easy way to eliminate this is to do exactly the same test, run exactly the same code with completely isolated devices (no USB connection to a PC), and powering both the Panda and LEDs off the same power source, and testing your 5v and your ~4.5v one (although this may be slightly too low for the LDO to work, but try it). The behaviour of your code should be the same in both scenarios, so all things being equal and operating correctly, the LEDs should work the same


#35

Just so we can be sure of the GND’s being correct, can you show a simple drawing of your setup?

If your code works with the small strip on the same power setup, then the issues has to be down to voltage levels and possibly the rise and fall times are not good when more LED’s are fitted. It may also be that the voltage dips low enough when you try to illuminate more LED’s and the supply can’t handle this although as it is designed for LED driving this should hopefully not be the case. A scope would show this but something you don’t yet own. :slight_smile:


#36

I second this.

Will try this out today and let you know the results.

I still suspect the logic level voltage here. I’ll get the shifter today.

Will be also my homework for today.

I want to emphasize that I have 2 identical set ups which are only different in terms of power supply used: 4.5v vs 5v, the LED number is the same. The first set up works well and the second fails.

The fail may be characterized like: LED strip fails to get the correct data from the controller.
It’s not like the second set up fails to light the LEDs up as I told already that when accidentally touching the Data Input of LED strip with mult-meter I was able to light up the whole strip with the second set up.


#37

let me reiterate the test conditions too - you use one Panda and LED strip, connected to the 4.5v supply. It works. You only change out the 4.5v supply with the 5v supply, nothing else, no other changes :slight_smile:

I’m going to go to find a P2 and some LEDs and some voltage regulators to play with


#38

This is totally true with one remark: both times Panda2 was powered via USB but it was common grounded with both supplies.

One question in return: the digital outputs of PANDA2 work at 3.3V, correct? Meaning Hi and Lo signals corresponds to 3.3V “interface”


#39

So please test it without USB :slight_smile: Yes, the USB GND connection should remove the influence of any bias between the GND reference voltages, but we really need to get away from that as a diagnosis tool. Just deploy a simple pattern that’s easy to see when it’s running correctly on the LEDs.

I didn’t have a P2 that I could lay my hands on easily, and my LED strip was connected to a Gadgeteer screw terminal breakout board, so I connected up a 5v source to my LED set and connected it back to a Cobra2, and I proved that powering the board was fine - haven’t yet written code to get the LEDs going but I’ll get to that in the morning

And your 3v3 question. A HI signal means 3v3 on that pin, a LO signal means 0v on that pin.


#40

@ DeathBloom - On another note, I suggest that you get a book on electronics. Preferably one that a tutorial about building circuits.