While things started promising, there was a power supply problem at the end to be solved…
Battery for Remote Controller
With a 3.3V DC-DC converter the supply voltage for the FRDM-KL25Z and Joystick shield is provided.
Because the battery pack was a bit to thick, it have it strapped with velcro to the bottom of the board:
Problem: No Wireless Communication with Motors Turned On
Well, things turned out not to be that easy. I was able to successfully to communicate between the Joystick shield and the robot. But as soon as I turned on the motors, communication was not functional any more. Observations:
- Communication works without the motors running
- As soon as the motors are turned on, communication failed: the robot nRF24L01+ did not receive any packets. Sometimes communication from the robot to the joystick shield worked.
- The motors actually had not to turn: even with a very low PWM duty cycle (1%) to the H-Bridge caused the failure.
- First I was thinking that there might be some noise, so I extended the SPI cables of the robot nRF24L01+ module (to get it further away from the motors): this did not help.
- The PWM signal itself was not a problem, because with the H-Bridge removed things were working even with a PWM signals on the line.
- Changing the frequency of the H-Bridge PWM (from 100 kHz to a few kHz) did not help neither.
- Changing nRF24L01+ modules sometimes showed better behaviour, but not consistently.
To inspect better the signals to the nRF24L01+ module, it has been mounted on the side of the robot:
This is the output of the H-Bridge to the motor:
Same, but zoomed to see the signal change:
So this looks pretty good so far. But what does not look good is the 3.3V supply voltage to the RF module right after turning on the motors:
First, there is a voltage drop after turning on the motors. This seems not to be a problem as the nRF24L01+ should run down to 1.9V. The problem is the +/- 200 mV noise generated afterwards by the motors. So the ‘fix’ was simply to add stabilization of the supply voltage to the nRF24L01+ pins. So we added a filter with 4.7 µF + 1 µF plus 100 nF (on the module).
This reduced the noise part enough to keep the RF module working:
With this, things were working well, as shown in the video below:
There is still a problem sometimes if going forward 100% and then pulling back 100% several times: this causes the battery supply voltage to drop for an extended period:
The current PCB design is not able to cover that in a clean way. Workaround is to use an extra battery for the RF module which is rather ugly. We are preparing a new PCB board and design to address this issue. Keeping fingers crossed ;-).
Using the nRF24L01+ module requires good stabilization of the supply lines. With too much noise or unstable voltage, communication will fail. Adding C’s to the module supply pins are an easy fix for that situation. Repeated motor forward/backward causes a battery voltage drop which can cause the nRF24L01+ module to fail. So if you see problems with the nRF24L01+, then my tip is to check the supply voltage :-)
Happy Checking :-)