0

Bluefruit Feather M0 drops BLE connection
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Bluefruit Feather M0 drops BLE connection

by Reckoning on Wed Nov 21, 2018 12:51 am

Hello,
I am using this board over a Bluetooth low energy connection and encountered a strange issue where the M0 drops the connection after sending power to both PWM pins that power 2 separate motors. Attached is the code I am using, and I am using the default BluefruitConfig.h file that comes with the sample sketch bleuart_datamode from the BluefruitLE nrf51 sketch. What is interesting is that I have tested the EXACT same code on a Bluefruit Feather 32u4, and everything works perfectly. Is the .h file wrong? Do the boards behave so differently that they can't use the same code?
Attachments
powerMotor.ino
(9.46 KiB) Downloaded 23 times

Reckoning
 
Posts: 3
Joined: Wed Nov 21, 2018 12:43 am

Re: Bluefruit Feather M0 drops BLE connection

by Reckoning on Wed Nov 21, 2018 12:52 am

To any admin who sees this, I can post high res images over imgur.com or high res video. I'll provide as much as I can to help you help me!

Reckoning
 
Posts: 3
Joined: Wed Nov 21, 2018 12:43 am

Re: Bluefruit Feather M0 drops BLE connection

by adafruit_support_mike on Wed Nov 21, 2018 1:45 am

How do you have power connected to the Feather and the motors?

Motors generate a lot of electrical noise, and if they share the same power source as the Feather, the noise is probably enough to make the Feather brown out or reboot. It's also possible that the motors are generating enough EMF noise to drown out the BLE radio signals.

adafruit_support_mike
 
Posts: 58843
Joined: Thu Feb 11, 2010 2:51 pm

Re: Bluefruit Feather M0 drops BLE connection

by Reckoning on Wed Nov 21, 2018 5:49 am

The motors are powered indirectly (with a motor controller) by 2 18650 batteries. How might I avoid brownouts from the board to the motors?

Reckoning
 
Posts: 3
Joined: Wed Nov 21, 2018 12:43 am

Re: Bluefruit Feather M0 drops BLE connection

by adafruit_support_mike on Thu Nov 22, 2018 12:40 am

If the motors have a different power source than the Feather, you've already done the first and best thing to reduce noise getting back to the Feather.

The second thing is to make sure the power lines to the motors don't run parallel to any of the lines that connect signals or voltage to the Feather. All wires running in parallel act as transformers, so power lines can inject noise current into any wires that run next to them.

The motor power lines will also act as radio antennas (same general principle as a transformer, but acting at a longer distance), so you might want to put them inside a grounded shield. Conductive surfaces connected to GND act like mirrors for radio waves, so putting the power lines inside a grounded piece of conduit (or other conductive tubing) will keep EMF generated by the lines inside the tube where they can't interfere with the BLE radio.

adafruit_support_mike
 
Posts: 58843
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.