Thread Tools
Feb 11, 2019, 01:03 AM
Registered User
RCvertt's Avatar
Thread OP
Built a little box for the Barometer. Nothing fancy. Wood with a few holes drilled in it, then foam, from shoe inserts, placed inside. All painted black with a sharpie marker pen.

Quote:
Originally Posted by jbsorocaba
Have you tested.... is working ?
I tested the 3 and 2 position switches and they are working in the YMFC test program.

Post 34 shows how I got channel 6 to 3 positions and channel 5 to 2 positions. However, we need just the opposite of that. I swapped channel 5 and channel 6 from the PWM converter to the receiver and now I have showing in the YMFC-32 setup program channel 5 with 3 positions and channel 6 with two positions as it should be.

Swapping the receiver wires is the only way I could get it to work without modifying the code. The Turnigy9xV2 won't let you set up these mixes with channel 5 and 6 swapped in the TX.
Last edited by RCvertt; Feb 11, 2019 at 01:19 AM.
Sign up now
to remove ads between posts
Feb 11, 2019, 01:34 AM
Registered User
RCvertt's Avatar
Thread OP
Starting to put together an airframe for this thing. Nothing fancy. Just foam from dollar tree and some wood sticks from Home Depot. Plan to do lots of test crashing so don't want to waste to much time on the build.
Feb 16, 2019, 03:28 PM
Registered User
RCvertt's Avatar
Thread OP
Testing barometer or magnetometer doesn't work in the setup program. Everything else appears to work and it detects 12c devices.

For the baro and mag, it starts by printing out a little message then just hangs. Putting in (q) doesn't cancel it either, the setup program freezes.
Last edited by RCvertt; Feb 16, 2019 at 03:57 PM.
Feb 17, 2019, 05:45 AM
Registered User
RCvertt's Avatar
Thread OP
I loaded up the main code and I get a solid read LED. The code says that mean I am getting 100 or more errors. I can't find any info on what these errors could possibly be though?
Feb 28, 2019, 01:19 AM
Registered User

Ymfc 32


Hello,
my name is pascal
I am French and I do not speak your language.
I also realize the YMFC 32 drone JOOP BROKKING and I encounter difficulties with the MPU6050.
I do not find on the site of Joop the program indicated Arduino MPU6050 TEST that indicates in the video.
so I'm stuck on this test phase.
I would be happy if you could help me and if you had any other advice on the subject.
thank you in advance
pascal
Feb 28, 2019, 01:32 AM
Registered User
RCvertt's Avatar
Thread OP
Quote:
Originally Posted by pascalou95
... MPU6050 TEST that indicates in the video...
Hi. Can you post a link to the video?
Feb 28, 2019, 02:13 AM
Registered User
MPU-6050 6dof IMU tutorial for auto-leveling quadcopters with Arduino source code (13 min 0 sec)


the test program is called: IMU_test_program_MPU-6050
Feb 28, 2019, 09:57 AM
Registered User
MGeo's Avatar
Hi Pascal,

If you run Arduino test sketch i2cscanner.ino it will scan thru the possible address range and tell you if it finds any attached sensor. MPU-6050 should show up at address 0x68 or 0x69.

https://playground.arduino.cc/Main/I2cScanner


If you could share a pic of your test setup we might be able to see issues. A common issue getting started with I2C is lack of or incorrect pull-ups on SCL and SDA lines. Some MPU-6050 boards have these pull-ups built in, some do not or use wrong value resistors. 4.7K ohm is a good value. Missing pull-ups are a no-go.

At least MPU-6050 is fairly popular, some more info here https://playground.arduino.cc/Main/MPU-6050
Last edited by MGeo; Feb 28, 2019 at 10:06 AM.
Mar 01, 2019, 12:33 AM
Registered User
RCvertt's Avatar
Thread OP
Quote:
Originally Posted by pascalou95
...the test program is called: IMU_test_program_MPU-6050
Hi. I agree with MGeo.

Looks like the program is called ( MPU-6050_IMU.ino ). It's on his site in the ( Articles ) section. I attached it for you.

I recommend building his latest copter that doesn't have GPS. It's just the 6050 sensor and has a test program also.
Last edited by RCvertt; Mar 01, 2019 at 12:42 AM.
Mar 01, 2019, 05:12 AM
Registered User
Hello,
Thank you for your answers.
I would take photos of the protrotype and I would put it on the site.
the resitances on the circuit of the MPU6050 are 2.2k.
Mar 02, 2019, 01:12 AM
Registered User
RCvertt's Avatar
Thread OP
Hi. You are very welcome.

It would be great to see images of your build and hear about your experiences with Joops project as you go.
Mar 04, 2019, 02:38 AM
Registered User
RCvertt's Avatar
Thread OP
Hmmm.

Not sure the servo library is going to work. I'm getting good servo movement with one servo. When I add 3 more, I get good movement only if I move the TX stick slowly. If I move it fast I get random movement for a little bit as it overshoots its destination.

I'll give it a few more tries. If anyone else gets servos moving good, let us know.
Mar 04, 2019, 04:25 AM
Registered User
Woga65's Avatar
Quote:
Originally Posted by RCvertt
Hmmm.

Not sure the servo library is going to work. I'm getting good servo movement with one servo. When I add 3 more, I get good movement only if I move the TX stick slowly. If I move it fast I get random movement for a little bit as it overshoots its destination.

I'll give it a few more tries. If anyone else gets servos moving good, let us know.
Did you check the power supply of the servos?
Servos cause a lot of noise on the power lines, also they can draw a very high peak current.
To work reliably servos always need a separate power suppply and often additional caps. In some cases even a choke is needed.
Mar 05, 2019, 01:16 AM
Registered User
RCvertt's Avatar
Thread OP
I hope you are right Woga65 about there being a problem with the power supply. The red light on the left BEC that is powering the servos goes dim when all 4 servos move fast.

The BEC on the right is powering the bluepill board.

Still not completely convinced it's not the arduino servo library causing the problem. I could run a MultiWii using an Arduino Nano or Promini and 4 servos all from a single 3 amp swithing BEC with no problem as long as I used MultiWii servo code and not the Arduino servo library. All of my VTOL airplanes worked that way. MultiWii servos worked like crap if I tried to use the arduino servo library.

Will try to check the power system for problems but I fear that without custom servo code, like the MultiWii needed, this will be as far as I can go with this project. All the custom code I have done for getting transitions to work won't do us any good if we can't move servos.

BadServoMovement (0 min 29 sec)
Last edited by RCvertt; Mar 05, 2019 at 01:32 AM.
Mar 05, 2019, 02:55 AM
Registered User
RCvertt's Avatar
Thread OP
From Joops infinite wisdom of keeping his code as simple as possible for us, I think he has given us the custom code we may need for servos in this video...

At 2:31 in the video he says that setting a value to 5000 gives him a 200Hz refresh rate for the ESC's. I prefer to use analogue servos so we need 50Hz. If we set it to 200 we should get a 50Hz refresh rate since 1 / 0.020 is 50.

So in timer_setup.ino, change TIMER4_BASE->ARR = 5000; to TIMER4_BASE->ARR = 200; and we should be able to run a servo instead of an ESC. Just as a test that is.

If the above test works, all we have to do is find out all the hieroglyphic bit shifting stuff for timer 1 and 3 and set them to 200 and we can run servos off those timer pins. Now if only someone would be so kind as to save me the trouble of figuring out the hieroglyphic bit shifting, we can get down to the business of working with servos.

STM32 for Arduino - Electronic Speed Controller (ESC) - STM32F103C8T6 (8 min 34 sec)
Last edited by RCvertt; Mar 05, 2019 at 03:04 AM.


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Question Arduino combat rc quadcopter/drone DMKL Multirotor Drone Electronics 0 Aug 03, 2017 05:49 AM
New Product Crazepony Open Source With STM32 MS5611 Mini Quadcopter RTF bluetooth crazy pony Drra Mini Multirotor Drones 103 May 21, 2017 05:28 PM
Discussion Openpilot port to CJMCU stm32 quadcopter fishpepper Mini Multirotor Drones 25 Aug 22, 2016 01:41 AM
Help! Arduino Quadcopter Spinning Problem (DC motor) jswcomkr Multirotor Drone Talk 0 Jan 04, 2016 12:12 PM