Dumme Frage zu Arduino Mega

Hallo!

Ich habe eine Frage zum Arduino Mega. Ich möchte wissen ob man alle Pins außer die für die Serielle Kommunikation zum Relais ein ausschalten nutzen kann. Ich weiß das ist eine einfache Frage aber ich habe noch keinen Arduino Mega und würde das gerne vorher wissen.

Danke

Wenn Dein Relais nicht mehr Strom zieht, als der Pin treiben kann und Du die Freilaufdiode nicht vergisst, dann ja.

Gruß Tommy

Dankeschön für die schnelle Antwort

Ich weiß das ist eine einfache Frage

Ich weiss, das ist eine schwere Frage.

Die allermeisten Relais kann man nicht direkt schalten. Daher gibt es Relais-Module, die ausser dem Signal-Pin auch noch eine Stromversorgung brauchen.

Es gibt einige Limits bezüglich der Ströme die ein einzelnes Pin, gewisser Gruppen von Pins bzw die Stromversorgungspins liefern können (auswendig kann ichs nur für den UNO. Datenblatt anschauen)
Wenn Du mit den Strömen unter diesen Limits bleibst kannst Du alle Pins verwenden, auch die analogen als digitale. Du wirst sicher einen Treiber/Transistor zum Ansteuern der Relais brauchen und da mußt Du bei der Bemessung/Auswahl der Teile auf die Limits acht geben. Sicher brauchst Du eine extra Spannungsversorgung für die Relais.

Grüße Uwe

Hi
Pinout Mega
Pro Pin 20mA (10mA empfohlen)
Pro Port (=max 8 Pins) 100mA (also max 5 Pins 'auf Kante' oder 8x moderate 10...12mA, damit die 100mA eingehalten bleiben)
Pro µC 200mA - egal, wie viele Pins Du hast, ab 200mA Summe wird's echt eng.

MfG

Edit siehe Folgepost (von uwefed)

postmaster-ino das stimmt nicht. Der Strom wird nicht nach Ports bestimmt sondern in Gruppen wie folgt:

Für LOW am Ausgang:
Although each I/O port can sink more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:
ATmega640/1280/2560:
1.)The sum of all IOL, for ports J0-J7, A0-A7, G2 should not exceed 200mA.
2.)The sum of all IOL, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200mA.
3.)The sum of all IOL, for ports G3-G4, B0-B7, H0-B7 should not exceed 200mA.
4.)The sum of all IOL, for ports E0-E7, G5 should not exceed 100mA.
5.)The sum of all IOL, for ports F0-F7, K0-K7 should not exceed 100mA.
If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test condition.
und für HIGH:
Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:
ATmega640/1280/2560:
1)The sum of all IOH, for ports J0-J7, G2, A0-A7 should not exceed 200mA.
2)The sum of all IOH, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200mA.
3)The sum of all IOH, for ports G3-G4, B0-B7, H0-H7 should not exceed 200mA.
4)The sum of all IOH, for ports E0-E7, G5 should not exceed 100mA.
5)The sum of all IOH, for ports F0-F7, K0-K7 should not exceed 100mA.
If IOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current greater than the listed test condition.

Zu den Stromversorgungspins:
DC Current VCC and GND Pins................................. 200.0mA
Da der ATmega2560 aber je 4 Vcc und GND Pins hat weiß ich nicht ob die Summe 800mA ist oder 200mA.

Quelle: http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2549-8-bit-AVR-Microcontroller-ATmega640-1280-1281-2560-2561_datasheet.pdf Fußnoten auf Seite 356 und tabelle auf Seite 355 (Kapitel 31 und 31.1)
Grüße Uwe

Hi

Danke der Richtigstellung - da kann Man sehen, was mir mit nur Krüppel-Englisch so Alles möglich ist - hatte Das echt so verstanden :o.

MfG