Asked — Edited
Resolved Resolved by ptp!

Ezb And Leds

I wish to control LEDs by EZB . I saw in a tutorial leds connected directly to digital outputs without current limiting resistors. The leds I'd use sink 70 mA at 3,3 V . I don't think EZB could withstand such currents ! EZB specs only say the pins are TTL compatible but don't say what's the allowable current (high and low level). What's the allowable current ? I'd add current limiting resistors if necessary. I'd be disappointed burning out my EZB controller.


ARC Pro

Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

PRO
USA
#9  

# forever loop
:loop
  ToggleDigital(D0)
  Sleep(500)
goto(loop)


# 10 times
REPEAT ($x, 1, 10, 1)
  ToggleDigital(D0)
  Sleep(500)
ENDREPEAT

#10  

PTP, to be precise, your calculations give a of current of 5.2 mA ( not 0.52 mA)

#11  

Thanks again PTP. I'm an hardware designer and Basic and assembler programmer, but I'm very ignorant about EZ scripts. I didn't know the existence of goto , repeat, etc. in EZB.

PRO
USA
#12  

Leonardo,

Thanks for the correction, I've adjusted the numbers to match an example.

Another important detail from the micro-controller datasheet (page 72)

Total current out of the micro-controller should not exceed 120 mA (the value includes the micro-controller itself)

it's my interpretation, so what happens if you pull more ?

Does overheat (EZB has a heat sink). I don't know.

maybe is not a good idea to connect 12 leds (10 mA) :)

#13  

Hi, PTP. 120 mA is an "absolute maximum rating " for the MCU power pins. It must never be exceeded, or it might be destroyed at once, or availability will be impaired. Operation under these conditions is not implied. Normal operating current is 80 mA (EZ datasheet), so there are less than 40 mA to work with. The EZB designer has provided 333 ohms resistors to limit this current. I'm aware of this , and I'll never use more than a few leds. There are other absolute maximum ratings for the chip concerning voltage, power dissipation and ambient temperature. But the EZB user is not likely to exceed these ones .

PRO
Canada
#14  

@PTP thanks for the accolades! One minor revision to your calculations. The resistors are actually 330Ohm.

@Leonardo46 the normal operating current for the entire EZ-B v4 is 80mA. This means that the WiFi module, audio circuit, and main MCU all draw 80mA combined. The WiFi module draws the most since it has a radio transceiver built in. This gives you a lot more room to drive LEDs with the main MCU. With the voltage drop across LEDs the current draw in reality is less than the theoretical calculated value of 10mA. While I would definitely use a transistor to drive a 70mA LED; the EZ-B v4 can drive a bunch of standard, run of the mill, 5mm LEDs.

PRO
USA
#15  

Jeremie:

you are the hardware authority:) so is always a pleasure when you get along in our conversations.

Regarding the 120 mA it's from the STM32F205 datasheet. The EZB v4 includes a heat sink.

So the question is if you hypothetically source 12 pins @ 10 mA = 120 mA, reaching that limit (without the MCU itself) what can happen to the STM32F205 MCU ?

  1. Gets more heat but still works and you can damage it (if the extra heat is not dissipated) ?
  2. Does the chip brownout ?
  3. Turns black dust :)

It's pure curiosity...

like you said the proper way to drive a bunch of leds or different loads, is a switching transistor.

PRO
Canada
#16  

@PTP Thanks! I should mention that I personally really appreciate your presence here in the forums, you have been extremely helpful to so many people and you deserve all the accolades!

To answer you question:

In an over-current situation (drawing 120mA or greater) the MCU usually goes into thermal shutdown. This scenario often looks like a brown-out since we have a heatsink on the MCU that cools it quickly so that it bounces back into operation right away. In theory all should be fine, you'll just notice the MCU resetting if you draw too much.

That being said, I would not recommend depending on the internal fail safe of the MCU. As you are likely already aware, too much stress on electronic components does not produce favorable results;)