Category Archives: Elektronik

nRF24L01

Libraries:

Network Layer for RF24 Radios
maniacbug/RF24Network

ST32F4 discovery – Freetos 1.6 – HC-SR04 – DHT11
nRF24L01 library for PIC microcontrollers
AVR-Lib nRF24L01
Arduino nRF24L01
Arduino driver for nRF24L01

Tutorials:

nRF24L01 2.4GHz Radio/Wireless Transceivers How-To
RF24 library revisited
Setup Nordic nRF24L01 RF modules to both Arduino UNO and Raspberry Pi

2.4GHz RF Radio Transceivers and Library
Low-Power Wireless Sensor Node
Getting Started with nRF24L01+ on Arduino
nRF24L01+ Running on Maple
Nordic FOB and nRF24L01+
Getting Started with nRF24L01+ using a Protoshield

nRF24L01 in a star network configuration
nRF24L01+ as MultiCeiver without ACK, is it possible?

Stepper motor / Schrittmotor

NEMA standard

Umrechnung

Convert oz-in to N-m
Convert Inch ounce-force, Torque
Conversion Calculator
umberfactory: Torque Conversions

In Großbritannien (UK) und in den Vereinigten Staaten von Amerika (US) ist das Avoirdupois-System (avdp-System) gebräuchlich:

1 Pound [lb]      = 16 Ounces [oz] = 256 Drams [dr] = 7000 Grains [gr]
1 Short Ton [tn]  = 2000 Pounds [lb]
1 Long Ton [l.tn] = 2240 Pounds [lb]
1,0 Pound [lb]    = 0,45359237 Kilogramm [kg]

NEMA Toleranzen:

NEMA17
42 mm        = 1.65354 inches
1.7 inches   = 43.18 mm

NEMA 23
57 mm        = 2.24409 inches
2.3 inches   = 58.42 mm

Stepper Motor

Wantai Motor
Longs Motor

Manufacturer Model NEMA Nr. Rate Current (A) Resistance (Ω/phase) Inductance (mH/phase) Holding Torque (g-cm) Holding Torque (kg-cm) Holding Torque (N-cm) Holding Torque (oz-in) Motor Length (mm)
Wantai Motor 42BYGHW208 17 0.4 A 30 Ω 37 mH 2800 2.8 27.458 38.884 34
Wantai Motor 42BYGHW804 17 1.2 A 3 Ω 5 mH 4500 4.5 44.129 62.493 48
Wantai Motor 42BYGHW811 17 2.5 A 1.5 Ω 1.8 mH 4800 4.8 47.072 66.659 48
Wantai Motor 57BYGH115-003 23 3 A 2.1 Ω 30’000 30 294.200 416.622 115
Wantai Motor 57STH115-4204A 23 4.2 A 0.9 Ω 30’000 30 294.200 416.622 115
Longs Motor 17HS0413 17 1.3 A 3.2 Ω 5.5 mH 5302.502 5.302 52 73.638 48
Longs Motor 17HS0417 17 1.7 A 1.8 Ω 3.2 mH 5302.502 5.302 52 73.638 48

eBay

Rattr Motor – infoshine15 (Email: sale2@rattmmotor.com, MSN: tonyswj@hotmail.com) [Longs Motor?]
Longs Motor – longsmotor99 (MSN: marychen1987@hotmail.com, Skype: marychen198711)

Military quality! Nema17 CNC Stepper motor 60mm/95 Oz-in/ 1.8A Military motor
German Ship&Free Ship: 10 pcs Nema 17 stepper motor 2.5A 48mm 48N.CM 3D pinter
10 pcs Nema 17 stepper motor with 68 oz.in, 4 leads 2.5A CNC
10pcs Nema 17 stepper motor 75 oz.in bipolar CNC PLASMA

Stepper Driver

  • TI DRV8824
  • TI DRV8825
  • Allegro A4982
  • Allegro A4983
  • Allegro A4988 (like A4983, overcurrent protection, internal 100k pull-down on MS1 microstep selection pin)
  • Toshiba TB6560AHQ

Spannung

Die Schrittmotor-FAQ

Frage

Warum soll ich die SM-Karte mit 24Volt oder mehr betreiben, wenn auf dem Motor 5,1 Volt steht? Wird der nicht überlastet?

Antwort

Zumindest bei den hier vorgestellten Schaltungen, aber auch bei den meisten anderen Schaltungen mit 1 Ampere oder mehr Wicklungsstrom, handelt es sich um stromgeregelte Schaltungen. Dabei sorgt der Stromregler dafür, das der Motor nur soviel Strom ‘bekommt’, wie eingestellt wurde (in der Regel also der Nennstrom des Motors). Dies wird durch häufiges Ein- und Ausschalten der Motorwicklung erreicht. Der Stromregler arbeitet also wie ein (Abwärts)-Schaltregler. Am Motor stellt sich (nach dem Ohm’schen Gesetz) quasi automatisch die Nennspannung des Motors ein.

Drehmomentkurve

Schrittmotor Schritte pro Sekunde
Super Grobi: Im Datenblatt des Schrittmotors siehst Du die Drehmomentkurve, also welche Kraft der Motor bei welcher Schrittrate leistet. Die Kurve endet irgendwo bei 4000 Schritten/Sekunde. Der Motor hat einen Schrittwinkel von 1,8° also 200 Schritte pro Umdrehung. Daher kannst Du Also maximal 4000/200 = 20 U/sek oder 1200 U/min erreichen. Die maximale Kraft hat der Motor im Bereich von
1000..1500 Schritten pro Sekunde.

Schrittverlust

Schrittmotor Schritte pro Sekunde
Super Grobi: Du must auf jeden Fall eine Anfahr- und eine Bremsrampe fahren die je nach Belstung flacher oder steiler seinen darf. Gibst Du sofort 1500 Schritte drauf, wird der Motor vermutlich nicht drehen. Er brummt dann nur und “verliert” die Schritte. Die Bremsrampe brauchst Du weil der Motor bei ruckartigem Ausschalten der Schritte weiterdrehen würde und Du dann die Schrittposition nicht mehr kennst. Die Bremsrampe kann i.d.R. steiler sein als die Beschleunigungsrampe.
Schrittverlust kann auch beim Fahren auftreten, wenn die Belastung im Grenzbereich ist. Das merkt man nicht unbedingt sofort. Erst wenn der Motor bei z.B. 1000 Schritten vorwärts und 1000 Schritten rückwärts nicht wieder am Ausgangspunkt landet, weist Du das etwas falsch läuft.
Ansonsten kannst Du natürlich auch eine einfache lineare Steigung programmieren.

Überhitzung

Schrittmotor Schritte pro Sekunde
Super Grobi: Beim Schrittverlust wird die zugeführte Energie in Wärme umgewandelt, nicht in Umdrehung. Solange der Motor dadurch nicht überhitzt, geht er auch nicht kaputt.

Tektronix TDS2024

Signale vergleichen (gespeichertes mit aktuellem):

Button: SAVE/RECALL
Aktion: Signal speichern
Speichern in: Ref
Quelle: CH1
In: RefA

Button: REF MENU
RefA: Ein

=========

Cursor:

Button: CURSOR
Typ: Zeit
Quelle: CH1 bzw. RefA
Cursor 1: mit Drehrad
Cursor 2: mit Drehrad

ATmega48PA programmieren und flashen

avr-gcc -Wall -Os -DF_CPU=8000000  -mmcu=atmega48pa -c main.c -o main.o
unknown MCU 'atmega48pa' specified

atmega48pa ist aber kompatibel mit atmega48p:
ATmega48PA and avr-gcc
avrdude and atmega48pa

#------------------------------------------------------------
# ATmega48P
#------------------------------------------------------------

part
    id               = "m48p";
    desc             = "ATMEGA48P";
     has_debugwire = yes;
     flash_instr   = 0xB6, 0x01, 0x11;
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
                     0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
                     0x99, 0xF9, 0xBB, 0xAF;
    stk500_devcode   = 0x59;
    signature        = 0x1e 0x92 0x0a;
    
    pagel            = 0xd7;
    bs2              = 0xc2;
    chip_erase_delay = 45000;
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
                       "x x x x  x x x x    x x x x  x x x x";

    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
                       "x x x x  x x x x    x x x x  x x x x";

    timeout		= 200;
    stabdelay		= 100;
    cmdexedelay		= 25;
    synchloops		= 32;
    bytedelay		= 0;
    pollindex		= 3;
    pollvalue		= 0x53;
    predelay		= 1;
    postdelay		= 1;
    pollmethod		= 1;

    pp_controlstack     =
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay    = 100;
    progmodedelay       = 0;
    latchcycles         = 5;
    togglevtg           = 1;
    poweroffdelay       = 15;
    resetdelayms        = 1;
    resetdelayus        = 0;
    hvleavestabdelay    = 15;
    resetdelay          = 15;
    chiperasepulsewidth = 0;
    chiperasepolltimeout = 10;
    programfusepulsewidth = 0;
    programfusepolltimeout = 5;
    programlockpulsewidth = 0;
    programlockpolltimeout = 5;

    memory "eeprom"
        paged           = no;
        page_size       = 4;
        size            = 256;
        min_write_delay = 3600;
        max_write_delay = 3600;
        readback_p1     = 0xff;
        readback_p2     = 0xff;
	read            = "  1   0   1   0      0   0   0   0",
                          "  0   0   0   x      x   x   x   x",
                          " a7  a6  a5  a4     a3  a2  a1  a0",
                          "  o   o   o   o      o   o   o   o";

	write           = "  1   1   0   0      0   0   0   0",
                          "  0   0   0   x      x   x   x   x",
                          " a7  a6  a5  a4     a3  a2  a1  a0", 
                          "  i   i   i   i      i   i   i   i";

	loadpage_lo	= "  1   1   0   0      0   0   0   1",
			  "  0   0   0   0      0   0   0   0",
			  "  0   0   0   0      0   0  a1  a0",
			  "  i   i   i   i      i   i   i   i";

	writepage	= "  1   1   0   0      0   0   1   0",
			  "  0   0   x   x      x   x   x   x",
			  " a7  a6  a5  a4     a3  a2   0   0",
			  "  x   x   x   x      x   x   x   x";

	mode		= 0x41;
	delay		= 20;
	blocksize	= 4;
	readsize	= 256;
      ;
    memory "flash"
        paged           = yes;
        size            = 4096;
        page_size       = 64;
        num_pages       = 64;
        min_write_delay = 4500;
        max_write_delay = 4500;
        readback_p1     = 0x00;
        readback_p2     = 0x00;
        read_lo         = "  0   0   1   0    0   0   0   0",
                          "  0   0   0   0    0 a10  a9  a8",
                          " a7  a6  a5  a4   a3  a2  a1  a0",
                          "  o   o   o   o    o   o   o   o";

        read_hi         = "  0   0   1   0    1   0   0   0",
                          "  0   0   0   0    0 a10  a9  a8",
                          " a7  a6  a5  a4   a3  a2  a1  a0",
                          "  o   o   o   o    o   o   o   o";

        loadpage_lo     = "  0   1   0   0      0   0   0   0",
                          "  0   0   0   x      x   x   x   x",
                          "  x   x   x  a4     a3  a2  a1  a0",
                          "  i   i   i   i      i   i   i   i";

        loadpage_hi     = "  0   1   0   0      1   0   0   0",
                          "  0   0   0   x      x   x   x   x",
                          "  x   x   x  a4     a3  a2  a1  a0",
                          "  i   i   i   i      i   i   i   i";

        writepage       = "  0   1   0   0      1   1   0   0",
                          "  0   0   0   0      0 a10  a9  a8",
                          " a7  a6  a5   x      x   x   x   x",
                          "  x   x   x   x      x   x   x   x";

	mode		= 0x41;
	delay		= 6;
	blocksize	= 64;
	readsize	= 256;
      ;

    memory "lfuse"
        size            = 1;
        min_write_delay = 4500;
        max_write_delay = 4500;
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
                          "x x x x  x x x x   o o o o  o o o o";

        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
                          "x x x x  x x x x   i i i i  i i i i";
      ;

    memory "hfuse"
        size            = 1;
        min_write_delay = 4500;
        max_write_delay = 4500;
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
                          "x x x x  x x x x   o o o o  o o o o";

        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
                          "x x x x  x x x x   i i i i  i i i i";
      ;

    memory "efuse"
        size            = 1;
        min_write_delay = 4500;
        max_write_delay = 4500;
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
                          "x x x x  x x x x   x x x x  x x x o";

        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
                          "x x x x  x x x x   x x x x  x x x i";
      ;

    memory "lock"
        size            = 1;
        min_write_delay = 4500;
        max_write_delay = 4500;
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
                          "x x x x  x x x x   x x o o  o o o o";

        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
                          "x x x x  x x x x   1 1 i i  i i i i";
      ;

    memory "calibration"
        size            = 1;
        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
      ;

    memory "signature"
        size            = 3;
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
      ;
  ;
DEVICE  = atmega48p
DEV_CODE = 0x31
AVRDUDE  = avrdude -C avrdude.conf -c avr910 -vvv -P com4 -x devcode=$(DEV_CODE) -b 115200 -p $(DEVICE)