This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to configure BUZZER IN NRF51 EVB

Hello everyone

i am trying to configure the buzzer int he development board inordert o create the buzzer beep sound i have configured the GPIO pin 14 fir the buzzer so in the pin 14 of the developement i connected the positive to 14 and negative to gnd like that i ahve to configure or something else any suggestion will be helpful

main.c

Parents
  • You can connect the buzzer directly to the pin as it is done on the mbed Application Shield. However be aware that the maximum current that can be sourced from any pin on the nRF51 is 5 mA. It may also be less (0.5mA) if the pin is not configured in high drive. For this reason I would suggest to use a transistor in between the nRF51 chip and the buzzer.

  • yes i have set the duty cycle by configuring like this

    app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_2CH(5000UL,6,7);//6.3KHz app_pwm_enable(&PWM1);

    		app_pwm_channel_duty_set(&PWM1, 1, 70);
    		app_pwm_channel_duty_set(&PWM1, 0, 50);
      nrf_delay_ms(2000);
    

    it is making sound on pin 6 and then pin 7 and then pin 6 like this going on but how can i make the pulses on both pin simulatneously ? moreover the sound of the signal is not loud enough can you tell me is there is any other way to increase the loudnees by using nrf51 except transistor

Reply
  • yes i have set the duty cycle by configuring like this

    app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_2CH(5000UL,6,7);//6.3KHz app_pwm_enable(&PWM1);

    		app_pwm_channel_duty_set(&PWM1, 1, 70);
    		app_pwm_channel_duty_set(&PWM1, 0, 50);
      nrf_delay_ms(2000);
    

    it is making sound on pin 6 and then pin 7 and then pin 6 like this going on but how can i make the pulses on both pin simulatneously ? moreover the sound of the signal is not loud enough can you tell me is there is any other way to increase the loudnees by using nrf51 except transistor

Children
No Data
Related