Hi All, I'm still attempting to build Mahowik Balancing Robot using Stepper Motor (nema 17) DRV8255 MPU6050, etc by modifying little changes to make it work with NRF24L01 (I turn into PWM not PPM Signal for TX and RX)
Everything LOOKS fine when controlling using NRF24L01 TX and able to arm it, but I've found a problem as shown below:
Throttle Value drops to minimum vlaue (1100) as soon as it was armed. In 1100 or 0 position of throttle it keeps showing drops and right motor increase into the highest value.
So, the left stepper motor goes forward and right stepper motor not spinning at all (even not jittering). I already checked the wiring and test it individually.
Here's the Schematic Summary:
(I powered Both MPU6050 and NRF24L01 using 3.3v of Arduino board (UNO) and has the same result when I use voltage regulator, e.g AMS1117 3.3v, etc - when checking using Multitester)
I integrated (injected) the Multiwii 2.3 of Mahowik's code modification for NRF24L01:
NRF24_RX.cpp: ================================================
#include "Arduino.h"
#include "config.h"
#include "def.h"
#include "types.h"
#include "BalancingWii.h"
#include "NRF24_RX.h"
#if defined(NRF24_RX)
int16_t nrf24_rcData[RC_CHANS];
const uint64_t pipe = 0xE8E8F0F0E1LL; //Must be the same as Transmitter
RF24 radio(10, 9);// CE, CSN
RF24Data strData;
void resetRF24Data(){
strData.throttle = 0;
strData.yaw = 128;
strData.pitch = 128;
strData.roll = 128;
strData.AUX1 = 0;
strData.AUX2 = 0;
}
void NRF24_Init() {
resetRF24Data();
radio.begin();
radio.setDataRate(RF24_250KBPS);
radio.setAutoAck(false);
radio.openReadingPipe(1,pipe);
radio.startListening();
}
void NRF24_Read_RC() {
static unsigned long lastRecvTime = 0;
unsigned long now = millis();
while (radio.available()) {
radio.read(&strData, sizeof(RF24Data));
lastRecvTime = now;
}
if (now - lastRecvTime > 1000) {
resetRF24Data();
}
nrf24_rcData[THROTTLE] = map(strData.throttle, 0, 255, 1000, 2000);
nrf24_rcData[ROLL] = map(strData.roll, 0, 255, 1000, 2000);
nrf24_rcData[PITCH] = map(strData.pitch, 0, 255, 1000, 2000);
nrf24_rcData[YAW] = map(strData.yaw, 0, 255, 1000, 2000);
nrf24_rcData[AUX1] = map(strData.AUX1, 0, 1, 1000, 2000);
nrf24_rcData[AUX2] = map(strData.AUX2, 0, 1, 1000, 2000);
}
#endif
NRF24_RX.h ================================================
#ifndef NRF24_RX_H_
#define NRF24_RX_H_
#include "config.h"
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#if defined(NRF24_RX)
// The sizeof this struct should not exceed 32 bytes
struct RF24Data {
byte throttle;
byte yaw;
byte pitch;
byte roll;
byte AUX1;
byte AUX2;
};
extern RF24Data nrf24Data;
extern int16_t nrf24_rcData[RC_CHANS];
void NRF24_Init();
void NRF24_Read_RC();
#endif
#endif /* NRF24_RX_H_ */
BESIDES, I also modified the code at: multiwii.cpp/balancingwii.cpp, def.h, config.h, protocol.cpp, RX.cpp to make NRF24L01 can be used in Mahowik BalancingWii. (TX RX Default is PPM)
Please help since I've been attempting to make this work for 3 months.
(Just a comment: I still use Arduino board for most of my projects. I'm not using esp8266, esp32, even STM32 so far since most of my projects shows powerful result and very very satisfied using arduino board. It depends who makes it).


