Buzzer conected to out3

  • Hi. I have a 24 V buzzer I would like to make it sound each time a print finishes. Since it is 24V, I have wired it to out3.
    Im not finding the way to activate it. My idea was to declare out 3 as "something", and switch on and off with a gcode command.
    Is that possible?

  • yes. I have done this:
    M950 P0 C"out3" ; assign gpio port 0 to out3 for buzzer. control win M42 P0 SX range 0 to 1
    M42 P0 S0 ; turnoff buzzer

    @jay_s_uk I have included these lines at the end of my config.
    When I tun on the printer, the buzzer starts beeping, seems like the M42 is not being read. If I send manually later
    M42 P0 S0 ; turnoff buzzer
    it turns off.
    Im trying to see what Im doing wrong

  • you shouldn't need to use M42 in your config.g file.
    Can you try removing that line so only the M950 is present?
    Does the buzzer start to make a noise on reboot then?

  • @jay_s_uk
    I removed the M42 and only the M950 line is left in the config. The buzzer starts to make a quick noise just when the machine reboots, so that is why I added th M42, trying to shutit down.

  • that will be a blip before the config loads, although I don't know why its doing that.
    Is this a duet 3?

  • @jay_s_uk yes, I though it could be possible to hear something at the very start up, but the buzzer doesnt stop.
    Weird is that is not accepting the M42 command in the config for stopping it.

  • Silly question, but what happens if you just apply 12\24 volts directly to the buzzer ? does it make a continuous buzz\sound or just 'blips' on the connection ?

    If the former, then you aren't getting an output on the Out3 pin, or maybe not enough current? if the latter, then you would probably need to define a frequency for the 'buzz\beep'.

    e.g. for case lights I use fan2 (see relevant part of config.sys) but as its also for lights I've wired up an additional regulator to supply the required current for the LED strips

    ; Case Lights - Uses Fan 2
    M950 F2 C"fan2" Q500 ; Create fan 2 for case lights and set frequency
    M106 P2 F100 S0.01 B0.00 C"Case Lights" ; Set Case LED's (Fan 2) to minimum

  • @Dr_Ju_Ju If I apply 24V directly to the buzzer, it sounds continuosly without stopping.
    out3 have more than enough current because it is a connection than can be used for a heater, the buzzer only needs 0.1 amps I think.
    If I delete the lines from the config and manually send:
    M950 P0 C"out3"
    and then M42 P0 S1, the buzzer starts to sound without stoping, a values of S less than 1, changes the frequency of the buzzer, and a value of 0 stops it.
    The problem arises when setting the 950 from the config file.
    When the printer start, the buzzer makes a non continued bli: bip bip bip bip,
    So you think I need to define a frequency on the M950? Setting a frequency of 0 makes the buzzer beep at a very low frequency at start, setting a value of 65000 makes the buzzer sound at a really fast frequency at the start.

  • Well, I solved it , somehow, dont know why/how exactly:

    I changed the definition of the pin number from 0 to 5:
    M950 P5 C"out3"

    and now when printer starts, the buzzer is in silent...

  • Moderator

    @Tinchus said in Buzzer conected to out3:

    M950 P5

    Do you happen to be using M950 S0 for a BLtouch or something?

  • administrators

    Please post your complete config.g file.

  • @Phaedrux No, I have a capacitive sensor, but it is not defined in conflict, I checked (I think)

  • @dc42 It is this, what it is working now:

    ; Configuration file for Duet 3 (firmware version 3) ORIGINAL
    ; executed by the firmware on start-up

    ; General preferences
    G90 ; send absolute coordinates...
    M83 ; ...but relative extruder moves
    M550 P"Printer" ; set printer name
    M669 K1 ; select CoreXY mode

    ; Network
    M552 S0 ; disable network

    ; Drives
    M569 P0.0 S0 D2 ; physical drive 0.0 goes forwards X Se invirtieron los cables tambien. Se agrego D3 para stealhtchop3
    M569 P0.1 S1 D2 ; physical drive 0.1 goes forwards Y Ultimo cambio: de S0 a S1. Se agrego D3 para stealhtchop3
    M569 P0.2 S1 D2 ; physical drive 0.2 goes forwards
    M569 P0.3 S1 D2 ; physical drive 0.3 goes reverse
    M569 P0.4 S0 D2 ; physical drive 0.4 goes forwards
    M569 P0.5 S1 D2 ; physical drive 0.5 goes backwards

    M584 X0.0 Y0.1 Z0.2:0.3 E0.4:0.5 ; set drive mapping
    M350 X16 Y16 Z32 E16:16 I1 ; configure microstepping with interpolation
    ; M92 X160.32 Y160.32 Z3200.00:3200.00 E827.22 set steps per mm
    M92 X80.16 Y80.16 Z3200.00 E428.25:428.25 ; set steps per mm
    M566 X900.00 Y900.00 Z300.00 E450:450 ; set maximum instantaneous speed changes (mm/min)
    M203 X18000.00 Y18000.00 Z240.00:240.00 E2400.00 ; set maximum speeds (mm/min)
    M201 X1000.00 Y1000.00 Z20.00:20.00 E500.00 ; set accelerations (mm/s^2)
    M906 X1500 Y1500 Z900:900 E1000:1000 I30 ; set motor currents (mA) and motor idle factor in per cent
    M84 S300 ; Set idle timeout ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z0 S1 ; set axis minima
    M208 X400 Y350 Z400 S0 ; set axis maxima

    ; Endstops
    M574 X1 S3 ; configure sensorless endstop for low end on X
    M574 Y1 S3 ; configure sensorless endstop for low end on Y
    M574 Z2 S2 ; configure Z-probe endstop for low end on Z

    ; Z-Probe
    M558 P5 C"^!" H5 F120 T18000 ; set Z probe type to switch and the dive height + speeds
    G31 P500 X0 Y28.5 Z0.245 ; set Z probe trigger value, offset and trigger height
    M557 X25:310 Y27:312 S57:57 ; define mesh grid

    ; Heaters
    M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0
    M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0
    ;M307 H0 B0 D30 S1.00 ; enable PID para camara, deadtime en 30 segundos
    M307 H0 B1 S1.00 ; enable bang-bang mode for the chamber heater and set PWM limit
    ;M140 H0 ; map heated bed to heater 0
    M141 H0 ; map chamber to heater 0
    M143 H0 S130 ; set temperature limit for heater 0 to 130C
    M308 S1 P"temp1" Y"thermistor" T500000 B4723 C1.19622e-7 ; configure sensor 1 as thermistor on pin temp1
    M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1
    M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
    M308 S2 P"temp2" Y"thermistor" T500000 B4723 C1.19622e-7 ; configure sensor 2 as thermistor on pin temp2
    M950 H2 C"out2" T2 ; create nozzle heater output on out2 and map it to sensor 2
    M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit

    ; Fans
    ;M950 F0 C"out3" Q500 ; create fan 0 on pin out3 and set its frequency
    ;M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
    ;M950 F1 C"out4" Q500 ; create fan 1 on pin out4 and set its frequency
    ;M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on

    ; Tools

    M563 P0 D0 H1 define tool 0
    G10 P0 X0 Y0 Z0 set tool 0 axis offsets
    G10 P0 R0 S0 set initial tool 0 active and standby temperatures to 0C
    M563 P1 D1 H2 define tool 1
    G10 P1 X-61 Y0 Z-2.05 set tool 1 axis offsets
    G10 P1 R0 S0 set initial tool 1 active and standby temperatures to 0C

    ; Custom settings are not defined
    M915 X Y S1 R0 F0 ; sensroless sensitivity 1 for beta 4 and 2 beta3

    ; movments without homing
    M564 H0

    ; Miscellaneous
    M207 S6 R0.2 F1800 ;firmware retraction
    M83 ; relative extrusion
    M950 S0 C"0.out9" ; servo "0" in pin out9
    M280 P0 S92 ; move servo to rest position
    M376 H30 ; cancell mesh levelling at 30 mm
    M143 S450 ; set max temp to 450 degrees for T0
    M143 H2 S450 ; set max temp to 450 for T1
    M950 J0 C"^" ; Definition of emervengy stop pin
    M581 P0 R0 T2 ; Assigment of the emergency stop
    M950 P5 C"out3" ; assign gpio port 5 to out3 for buzzer. control win M42 P5 SX range 0 to 1
    M501 ; load saved parameters from non-volatile memory
    T0 ; select first tool

Log in to reply