Cool! very nice improvements. Nice redesign corner fasteners and no need to use tape anymore. I like the reposition of the mpu6050. The new code and firmware is so much smoother and solid. Keep up the good work and Mahalo for sharing Rem!
Awesome! And thank you for sharing the code. I bought the motors after the first video, but still did not find time to build. This video motivates me to come back to the project.
Thanks for sharing! I'm looking forward to tackling this when I get some free time. I wish I had studied comments better before I bought motors as I apparently got the wrong model.
Great project! Thank you! Merci! Only problem I had was that I bought the Nidec motors with 12 pins. No matter what I did, I could not get any encoder outputs, even after a week of messing around with my scope and power supplies. So I reordered the 8-pin motors and everything works. Haven't yet tried tuning. Thanks again...
Thanks for the great info as always. I've always wondered about something in your videos, can you tell me why there are a few screws missing on the reaction wheel? If it's asymmetrical, does it make it more balanced and faster?
Great Project- thank you. I am working through the build of your "better" version of the cube as a volunteer with a local charity - which includes a small 3D printer group. With regard to the schematic, we were wondering whether you had given any consideration to any extra safety features - such as a physical or automatic timeout switch between the battery and the PCB to prevent unforeseen damage to the circuitry. Do you have any advice on this possible danger? Many thanks
Appreciate the added innovation in your design. Unfortunately I am getting the dreaded "angles are wrong!" during calibration. I am using the ESP32 build with Bluetooth. Some of the values I am getting are: X138.78, Y93.49 X140.23, Y94.16 X135.72, Y93.48 Any suggestions on how to resolve? Thank you.
@@ReMRC Ah, new cube but old software. I loaded in the new software and rolled back the ESP32 by Espressif to 2.10.17 to compile and everything works nicely. The responses and controls are tight. Nice work! And yes, the battery alarm works :)
Hi! Thank you so much for making this and posting the project! I'm trying to replicate this for a school project and we have a specific microcontroller that we need to use (mspm0g3507) and I don't have a bluetooth module. And I have a few questions I was wondering if you can maybe help answer... I know you mentioned in another video that the wires generate interference with the IMU and the I2C communication. Is there a way to do it without the bluetooth? Also, I was wondering if it would be ok to calibrate the accelerometer at the beginning of the program, similar to the gyroscope calibration, and just set calibrated to true after, or if there is a specific reason that tuning needs to be called at the beginning of the control loop each time? Also, I noticed that in tuning, an offset value was added accel_z to account for gravity. This makes sense for balancing on the vertex, since the IMU is positioned such that the z axis is aligned with gravity. But for the edge case, I imagine that a portion of the acceleration due to gravity would get projected onto the x-axis in the IMU frame, so should the offsets be a little bit different? Or does that not affect the measurement? Thanks again in advance!
@ReM-RC, thanks so much for making this project! I have assembled everything and gone through the calibration. However, the motors don't move and the serial monitor is blank. Any advice of where to start troubleshooting? Do I still need to calibrate the voltage and comment out lines of code for the new build?
@@ReMRC Thanks for the suggestion. The motor test worked. The issue was that my motors were wired backwards, with the opposite pinout. Luckily nothing was fried. My cube is now working! Thanks a bunch :)
Looks amazing, thank you for the update! I have made the cube as well from your work! Quick question, what is meant by only one side can be on the edge - is this for the calibration only, or in general with new software only one side supports balance?
Can you explain this part a bit? How do you determine the value? battVoltage((double)analogRead(VBAT) / 204); // value 204 must be selected by measuring battery voltage!
This requires a regulated power supply. The buzzer should start beeping when the battery voltage is below 9.5 V. This value must be changed if the beeping starts at a different voltage.
Awesome project, im printing it out right now as im waiting for the motors to arrive, just a quick question, do you think the motors will be powerful enough to make the cube stand up on the edge/corner on its own? Ive seen a video on youtube of a different cube doing that and wanted to try coding it on this one, im just not sure if the motors can handle it
Hey if you tighten a rope with the standing corner and just hang this.. Is the cube still balence itself or just moves clockwise or anticlockwise.. Can you please check this
Great Improvement!! I see the code and it's cool. Btw, have a few question, Is it based on PID or LQR or both? Just one, I know it is very efficient optimization. And, since this project, I need to know more about the nidec24h motor, I test out a few, like position control, but whenever it reaches the setpoint angle, then if we change the angle a little and hold the motor rotation even in small power, it goes to shutdown. I think this is because of stall current protection. What do you think about this? Thank You.
LQR. NIDEC24h has no position or angle control. It works like a DC motor but with a controller and encoder inside. And yes, it has stall current protection.
HI There, Just wondring it this will work the other way around, with the reaction wheels facing upwards? I am in the proecess of building one. I am making a proper PCB and also connecting the brakes up separatly(D12,D23,D26), hoping to get it to jump up...
Awesome project. I built your previous cube (worked great) but seem to be struggling on this one. I built two separate boards with the ESP32, LM7805 and BC588 (PNP) components that exhibit the same behavior. The motor test checks out okay but the for the cube balancing function it just beeps a steady tone and nothing happens. I checked the wiring connections for both boards several times. Any thoughts for troubleshooting (maybe it’s not setup correctly)?
Beeps a steady tone because you use BC588. Did I mention PNP anywhere? cdn.shopify.com/s/files/1/0841/0673/9987/files/arduino-buzzer-circuit_480x480.png?v=1705320093
What did you change to improve the balancing? Is it just the encoders that makes all the difference? Or did you change the balancing algorithm. It looks so much better!
@@nickp7339 Maxon are very good motors. But very expensive. :) The balancing algorithm needs to know the rotation speed. It doesn't matter what method is used for this.
Awesome project! Thanks for the plans and the code. I only get stuck during the calibrating procedure: I keep getting told that the angles are wrong, no matter if I'm trying to calibrate the vertex or an edge. I built the arduino version of the cube and uploaded the current arduino code from github. Do you have any advice?
@@ReMRC everytime its gives me different values for the offsets and angles. The first offset is usually in the 10s or 100s and the second one always around 300. The x angle I can sometimes get below 10, the y angle never. Interestingly, sometimes I get the message that edge 3 is successfully calibrated when it's resting on one of the sides. I've tested the MPU6050. It's functioning nominally. I've tweaked the code to print the angles in the serial monitor but I don't get angles less than 10. I do manage to get both x and y to be at 90 though.
hello very nice project i am using it as an engineering project in my university and it blew my professor's mind!! can you tell me please in detail which files do i use from github and if there are any contact info for you
I noticed it is a 30 pin ESP-32 board, which exact module esp32 30 pin board is it since there are multiple available in the market, the pinout in the schematic also doesnt match most of them
Great project, I made your previous design and it was working fine, now that I modified the design with the new gyro plate the cube always slowly falls down as if the reaction wheels can't keep up. Same behavior when balancing on the side or on the corner, any idea what could be causing this? Also why did you remove the code to allow it to balance on all sides? Thanks!
@@ReMRC Ah yes I got the encoder pins for the motors on my pcb design crossed so I just swapped the pins in software and now it works. Amazing upgrade, so much more stable and the wheels sometimes almost stand still. Is there a reason not to implement standing on all three sides of the cube?
@@sander368 Look at sensor orientation. :) In the first cube I didn't intend to do balancing on the edges. But I did it, although it works badly, and primarily because of the position of the sensor.
@@ReMRC Thanks, that worked, but I don't know how to follow or what to send, only get this message: first you need to calibrate the balancing points... How can I balance the points?
@@ReMRC I tried that comma d but nothing happened, maybe I didn't do the process properly, tomorrow I will try again. Thanks and sorry for not noticing that part
is there a way to add a way to modify the code to make the cube tip itself up from a flat at rest position to self balance on an edge or corner? Thanks. Great project.
@@ReMRC because 45 degrees is the angle between the z axis of the IMU and the rotation axis of the three motors. I thought this is how you derived the equations present in XYZ_to_threeWay. The other numbers follow this logic, the only one I'm missing is 1.37
Built this with esp32 version. When I upload code I get this error message in line 2414: extended character ' is not vaild in an identifier. Very nice design and build. Would really like to get it working. Would the Arduino version be better? Does the arduino version require the bluetooth module or is there an Arduino with bluetooth?
@@ReMRC Thank you so much for your reply. I am in my 70's and my kids send me projects to build to judge if I'm still capable of learning new things and therefore mentally fit and able to live alone. This is probably to advanced for me but I'm determined to show them a working cube. I open esp32_cube_enc.ino in Arduino IDE and it shows 3 tabs for the 3 files in your download folder. When I click verify in returns errors. I can copy the error report but am unsure how to upload it here. Thanks for responding, I have also reached out to the Georgia Tech Invention studio as I live in Atlanta GA. I have printed the parts and assembled them. Everything fit perfectly. My oldest son challenged me to learn Fusion 360 which is truley a new trick for an old dog. Thank you for a intriguing project
@@ReMRC Made progress. Reinstalled Arduino IDE and all libraries and now get this: C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino: In function 'void setup()': C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:55:3: error: 'ledcSetup' was not declared in this scope 55 | ledcSetup(PWM1_CH, BASE_FREQ, TIMER_BIT); | ^~~~~~~~~ C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:56:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'? 56 | ledcAttachPin(PWM1, PWM1_CH); | ^~~~~~~~~~~~~ | ledcAttach exit status 1 Compilation error: 'ledcSetup' was not declared in this scope
@@ReMRC Made Progress. Reinstalled Arduino IDE and all librairies and now get this when i verify: C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino: In function 'void setup()': C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:55:3: error: 'ledcSetup' was not declared in this scope 55 | ledcSetup(PWM1_CH, BASE_FREQ, TIMER_BIT); | ^~~~~~~~~ C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:56:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'? 56 | ledcAttachPin(PWM1, PWM1_CH); | ^~~~~~~~~~~~~ | ledcAttach exit status 1 Compilation error: 'ledcSetup' was not declared in this scope
i cant get my hands on a niodec mototrs used....... what happens if i use a normal bldc motor(drone) with an encoder....will it stilll work? please help :3
Do you have a source for the lipo batter. 3S1P batteries seem to be in several form factors. I'd love to build this but i'm not sure all of the parts i found will fit.
@@ReMRC Great thanks. Such quick response 🙂 what are your ideas for a breaking system to jump in position? I saw you had a video 8 months ago but it doesn't look like you've migrated those features into this model. Is it planned? I saw another design online that uses a bicycle style brake(driven by servo) to stop the reaction wheel You could add printed ring to the reaction wheel that could run through the brake, that the brake would trap. I'm not an engineer so i'm sure there are things i'm not considering but it's an idea you might consider.
@@ReMRC sorry for asking so many questions but does the XT30 plug connect to the motors/mcu and the charger connect to the jst connector or is the jst connector used for both charging and use.
@@dylanthurston No, this type of brake is not suitable. The braking must always be the same. Means no slipping (like disc brakes). It is possible, but only as demonstration, it not always works.
@ReMRC I can not find the file for the black part you have on the motor shaft seen here. I have almost everything and can't wait to finish it. Thank you for putting this together. th-cam.com/video/ZU0oTBRDgOE/w-d-xo.html
@@ReMRC so it only works if your structure is perfectly symmetrical isnt it ? If your point of balance is changes by an extra mass your motors will saturate?
Making progress.Reinstalled Arduino IDE and all libraries and now get this when i verify: C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino: In function 'void setup()': C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:55:3: error: 'ledcSetup' was not declared in this scope 55 | ledcSetup(PWM1_CH, BASE_FREQ, TIMER_BIT); | ^~~~~~~~~ C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:56:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'? 56 | ledcAttachPin(PWM1, PWM1_CH); | ^~~~~~~~~~~~~ | ledcAttach exit status 1 Compilation error: 'ledcSetup' was not declared in this scope
@@ReMRC I think that fixed my problem. Uploaded to esp32 board with no errors. Will solder the project board up this week. Thank you so much for your help.
Cool! very nice improvements. Nice redesign corner fasteners and no need to use tape anymore. I like the reposition of the mpu6050. The new code and firmware is so much smoother and solid. Keep up the good work and Mahalo for sharing Rem!
Aloha! Glad you liked it.
Awesome! And thank you for sharing the code. I bought the motors after the first video, but still did not find time to build. This video motivates me to come back to the project.
hey, just wanted to know where you got those motors...
@@Vansh-w7m What are the problems to buy motors? Ali, ebay.
@@ReMRC it is very difficult to get these motors in India, if you could help us find an alternative of these motor, it will be really helpful
@@ReMRC Ali express and ebay shows that they don't deliver in india
@@kkgaming8226 Unfortunately, I don't know where to get elsewhere. There are no alternatives.
Thanks for sharing! I'm looking forward to tackling this when I get some free time. I wish I had studied comments better before I bought motors as I apparently got the wrong model.
Great project! Thank you! Merci!
Only problem I had was that I bought the Nidec motors with 12 pins. No matter what I did, I could not get any encoder outputs, even after a week of messing around with my scope and power supplies. So I reordered the 8-pin motors and everything works. Haven't yet tried tuning. Thanks again...
RESPECT, great job, thank you so much for sharing! My cube is workig perfect. Did somebody manage to ammend to code to get the cube turning?
Nice redesign!
Thanks for the great info as always. I've always wondered about something in your videos, can you tell me why there are a few screws missing on the reaction wheel? If it's asymmetrical, does it make it more balanced and faster?
No, the bolts are over. :) And seriously, there shouldn't be more than necessary. The total weight of the cube should be as low as possible...
@@ReMRC oh, thanks!
This looks really cool, could you post links to all the parts you used because I looked on amazon and didn't know which one to use.
i found everything except for the motors, does anyone know where i could find some.
@@K1VQsmlyface aliexpress or ebay.
Great Project- thank you.
I am working through the build of your "better" version of the cube as a volunteer with a local charity - which includes a small 3D printer group.
With regard to the schematic, we were wondering whether you had given any consideration to any extra safety features - such as a physical or automatic timeout switch between the battery and the PCB to prevent unforeseen damage to the circuitry. Do you have any advice on this possible danger?
Many thanks
I not use physical or automatic timeout switch...
Super travail, je vais essayer. Il n’y aurait pas une liste des vis et leur longueur? Je n’ai rien trouvé. Merci pour ces belles réalisations.
Appreciate the added innovation in your design. Unfortunately I am getting the dreaded "angles are wrong!" during calibration. I am using the ESP32 build with Bluetooth. Some of the values I am getting are:
X138.78, Y93.49
X140.23, Y94.16
X135.72, Y93.48
Any suggestions on how to resolve? Thank you.
Are you trying an old cube with new software?
@@ReMRC Ah, new cube but old software. I loaded in the new software and rolled back the ESP32 by Espressif to 2.10.17 to compile and everything works nicely. The responses and controls are tight. Nice work! And yes, the battery alarm works :)
Hi! Thank you so much for making this and posting the project! I'm trying to replicate this for a school project and we have a specific microcontroller that we need to use (mspm0g3507) and I don't have a bluetooth module. And I have a few questions I was wondering if you can maybe help answer...
I know you mentioned in another video that the wires generate interference with the IMU and the I2C communication. Is there a way to do it without the bluetooth?
Also, I was wondering if it would be ok to calibrate the accelerometer at the beginning of the program, similar to the gyroscope calibration, and just set calibrated to true after, or if there is a specific reason that tuning needs to be called at the beginning of the control loop each time?
Also, I noticed that in tuning, an offset value was added accel_z to account for gravity. This makes sense for balancing on the vertex, since the IMU is positioned such that the z axis is aligned with gravity. But for the edge case, I imagine that a portion of the acceleration due to gravity would get projected onto the x-axis in the IMU frame, so should the offsets be a little bit different? Or does that not affect the measurement?
Thanks again in advance!
Also, Please what screws did you use. I realized you fitted a nut-like structure before inserting the screws. What are they?
For wheels? M4 10-12mm.
@ReM-RC, thanks so much for making this project! I have assembled everything and gone through the calibration. However, the motors don't move and the serial monitor is blank. Any advice of where to start troubleshooting? Do I still need to calibrate the voltage and comment out lines of code for the new build?
Try motors test.
@@ReMRC Thanks for the suggestion. The motor test worked. The issue was that my motors were wired backwards, with the opposite pinout. Luckily nothing was fried. My cube is now working! Thanks a bunch :)
Looks amazing, thank you for the update! I have made the cube as well from your work! Quick question, what is meant by only one side can be on the edge - is this for the calibration only, or in general with new software only one side supports balance?
Just to balance better. Of course, I can did this for other edges, but it will be worse.
@@ReMRC Do you think by adjusting the software, or reducing weight it can stand up on its own - like your self balancing triangle?
@@valko970 No, triangle is not the same...
Any chance you'll make one that can jump into position? Or would that be to expensive?
This is not easy. Why you can see here: th-cam.com/video/PwZfTrd_3Jg/w-d-xo.html
Hi, very nice project.
How did you derive the LQR controller? Did you make a mathematical model of the cube to derive the controller?
No, I didn't make a mathematical model.
Can you explain this part a bit? How do you determine the value? battVoltage((double)analogRead(VBAT) / 204); // value 204 must be selected by measuring battery voltage!
This requires a regulated power supply. The buzzer should start beeping when the battery voltage is below 9.5 V. This value must be changed if the beeping starts at a different voltage.
where did you place the 3 MPU6050?
Why 3? There is only one.
Awesome project, im printing it out right now as im waiting for the motors to arrive, just a quick question, do you think the motors will be powerful enough to make the cube stand up on the edge/corner on its own? Ive seen a video on youtube of a different cube doing that and wanted to try coding it on this one, im just not sure if the motors can handle it
No. Why? Watch this th-cam.com/video/PwZfTrd_3Jg/w-d-xo.html
very gud man 👍
Hey if you tighten a rope with the standing corner and just hang this.. Is the cube still balence itself or just moves clockwise or anticlockwise.. Can you please check this
Hanged cannot balance - there is no point in that.
Could this Nidec motor be used in a self-balanced robot, on two wheels? it would be very good
Yes, if it can be used for a unicycle, it can also be used for a two-wheeled self-balancing robot. th-cam.com/video/gByWvAQIvNI/w-d-xo.html
Great Improvement!! I see the code and it's cool.
Btw, have a few question, Is it based on PID or LQR or both? Just one, I know it is very efficient optimization.
And, since this project, I need to know more about the nidec24h motor, I test out a few, like position control, but whenever it reaches the setpoint angle, then if we change the angle a little and hold the motor rotation even in small power, it goes to shutdown. I think this is because of stall current protection. What do you think about this? Thank You.
LQR. NIDEC24h has no position or angle control. It works like a DC motor but with a controller and encoder inside. And yes, it has stall current protection.
Very enlightening. Thanks for the answer Sir.
HI There, Just wondring it this will work the other way around, with the reaction wheels facing upwards? I am in the proecess of building one. I am making a proper PCB and also connecting the brakes up separatly(D12,D23,D26), hoping to get it to jump up...
Awesome project. I built your previous cube (worked great) but seem to be struggling on this one. I built two separate boards with the ESP32, LM7805 and BC588 (PNP) components that exhibit the same behavior. The motor test checks out okay but the for the cube balancing function it just beeps a steady tone and nothing happens. I checked the wiring connections for both boards several times. Any thoughts for troubleshooting (maybe it’s not setup correctly)?
Unfortunately, I don't know what the problem is. But more than one has already tried the new version - it works.
The BC588 needs 5V to close the circuit, i had the same problem.
I connected a 3.3v buzzer directly to the esp32 output pin and it works.
Beeps a steady tone because you use BC588. Did I mention PNP anywhere? cdn.shopify.com/s/files/1/0841/0673/9987/files/arduino-buzzer-circuit_480x480.png?v=1705320093
@@ReMRCah, yes mis-read the schematics. I swapped out the BC588 with a PNP transistor, everything works correctly now. Thank you!
I mean NPN :)
What did you change to improve the balancing? Is it just the encoders that makes all the difference? Or did you change the balancing algorithm. It looks so much better!
Encoders have poor resolution. But it helps a little. However, this complicates the algorithm and requires more changes…
@@ReMRC I am using hall sensors instead of encoders. Would the new code improve balancing in this case?
@@nickp7339 Hall sensors with these motors?
@@ReMRC i used Maxon EC flat motors with hall sensors
@@nickp7339 Maxon are very good motors. But very expensive. :) The balancing algorithm needs to know the rotation speed. It doesn't matter what method is used for this.
is 3.7V 1000 mAh battery enought to drive the three 12V battery? Asking because I want to know.
Please clarify the question. I didn't understand.
Is there any posibility to share the fritzing file so we can create a PCB?
It wouldn't really help to make a PCB.
Still can't get beeper to work. Running version 2.3.3 of Arduino IDE. What library version for FastLED and Wire.h
Last version.
Awesome project! Thanks for the plans and the code. I only get stuck during the calibrating procedure: I keep getting told that the angles are wrong, no matter if I'm trying to calibrate the vertex or an edge. I built the arduino version of the cube and uploaded the current arduino code from github. Do you have any advice?
When you send c-, it prints the angles. Show me what it prints.
@@ReMRC everytime its gives me different values for the offsets and angles. The first offset is usually in the 10s or 100s and the second one always around 300.
The x angle I can sometimes get below 10, the y angle never.
Interestingly, sometimes I get the message that edge 3 is successfully calibrated when it's resting on one of the sides.
I've tested the MPU6050. It's functioning nominally.
I've tweaked the code to print the angles in the serial monitor but I don't get angles less than 10. I do manage to get both x and y to be at 90 though.
@@marsoc12 Are you doing this without bluetooth?
@@ReMRC oh wow I can't wait to hear what lead you to that conclusion. Yes, I only had an Arduino laying around without Bluetooth.
@@marsoc12 th-cam.com/video/Nkm9PoihZOI/w-d-xo.html
Hi ! Where did you buy the motors ?
Ali, Ebay.
hello very nice project i am using it as an engineering project in my university and it blew my professor's mind!! can you tell me please in detail which files do i use from github
and if there are any contact info for you
Everything is written on github. What files etc.
I noticed it is a 30 pin ESP-32 board, which exact module esp32 30 pin board is it since there are multiple available in the market, the pinout in the schematic also doesnt match most of them
Doesn't matter. The pins are listed on the module.
nidec 24h brushless motor are not available in our country😢
Now what can I do. Is there any alternative way😢❤😊
Where not available? Ebay, Aliexpress always help me.
@@ReMRC Do you have a current link on Aliexpress for the motor? It seems it does not come up (at least not the 24H404H160 version.
@@bi0530 24H404H160 shows exactly that version.
Hi, can someone tell me where can I get Nidec 24H motors or any alternate motors in India
Great project, I made your previous design and it was working fine, now that I modified the design with the new gyro plate the cube always slowly falls down as if the reaction wheels can't keep up. Same behavior when balancing on the side or on the corner, any idea what could be causing this? Also why did you remove the code to allow it to balance on all sides? Thanks!
Maybe the encoders are connected badly? Red connections in the schematic.
@@ReMRC Ah yes I got the encoder pins for the motors on my pcb design crossed so I just swapped the pins in software and now it works. Amazing upgrade, so much more stable and the wheels sometimes almost stand still. Is there a reason not to implement standing on all three sides of the cube?
@@sander368 Look at sensor orientation. :) In the first cube I didn't intend to do balancing on the edges. But I did it, although it works badly, and primarily because of the position of the sensor.
Can you upload the process of making the controller? Im begginer
This project is too difficult for beginners.
Very nice, congratulations!!! I'm trying to build it, but I have the problem to send the commands by bluetooth. Do you use any application?
Nothing special is needed. Arduino serial monitor or any other program that does the same.
@@ReMRC Thanks, that worked, but I don't know how to follow or what to send, only get this message: first you need to calibrate the balancing points...
How can I balance the points?
@@LuisSM ??? th-cam.com/video/ZU0oTBRDgOE/w-d-xo.html
@@ReMRC I tried that comma d but nothing happened, maybe I didn't do the process properly, tomorrow I will try again. Thanks and sorry for not noticing that part
@@ReMRC Thanks!, that works :)
is there a way to add a way to modify the code to make the cube tip itself up from a flat at rest position to self balance on an edge or corner? Thanks. Great project.
You mean like this? th-cam.com/video/PwZfTrd_3Jg/w-d-xo.html
@@ReMRC Yes! nice. That is doable in this current build? I'm just waiting on the motors to show up. I will make the new print in the meantime.
@@elidelia2653 No, it's hard to make good brakes that always work the same way. It also requires additional space.
In the function XYZ_to_threeWay, to calculate m1, m2 and M3, why did you use /1.37 and not /1.41 (which is 1/cos(45deg)?
Why do you think it is 1/cos(45deg)?
@@ReMRC because 45 degrees is the angle between the z axis of the IMU and the rotation axis of the three motors. I thought this is how you derived the equations present in XYZ_to_threeWay. The other numbers follow this logic, the only one I'm missing is 1.37
What is your overall preferences for the motors, either those used in this project, or FOC +BLDC in your balancing triangle?
Nidec24H is an easy way because there is a controller inside. FOC + BLDC can also be used.
this is awesome. you are awesome! xD
Also, in esp32 docs, they said the ledcSetup is removed....are you using older version of esp..
As of version 3.0 of ESP32 boards, this function has been changed. Use version 2.0.17.
@@ReMRC I bought a nidec 24h from eBay which has 12 pins...4 feedback, 2 +12V, 2 Gnd, start/stop, Direction, pwm, brake....can I use this?
@@ronaldradnus9108 No. I don't know if it would be possible to use such motors after changing the program.
How did you calculate the weight and radius of the wheels?
I did not calculate the weight and radius. And I don't know why I should do it.
So you didn't calculate these parameters to balance the triangle? For inertia, angular velocity, etc.
@@xsh9t608 Yes, I don't need this.
Built this with esp32 version. When I upload code I get this error message in line 2414: extended character ' is not vaild in an identifier. Very nice design and build. Would really like to get it working. Would the Arduino version be better? Does the arduino version require the bluetooth module or is there an Arduino with bluetooth?
Line 2414? Which file contains this error? It looks like it's in some kind of library...
ESP32 version is better.
@@ReMRC Thank you so much for your reply. I am in my 70's and my kids send me projects to build to judge if I'm still capable of learning new things and therefore mentally fit and able to live alone. This is probably to advanced for me but I'm determined to show them a working cube. I open esp32_cube_enc.ino in Arduino IDE and it shows 3 tabs for the 3 files in your download folder. When I click verify in returns errors. I can copy the error report but am unsure how to upload it here. Thanks for responding, I have also reached out to the Georgia Tech Invention studio as I live in Atlanta GA. I have printed the parts and assembled them. Everything fit perfectly. My oldest son challenged me to learn Fusion 360 which is truley a new trick for an old dog. Thank you for a intriguing project
@@Sailing-n9v Is there really an error? Not note?
@@ReMRC Made progress. Reinstalled Arduino IDE and all libraries and now get this:
C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino: In function 'void setup()':
C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:55:3: error: 'ledcSetup' was not declared in this scope
55 | ledcSetup(PWM1_CH, BASE_FREQ, TIMER_BIT);
| ^~~~~~~~~
C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:56:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
56 | ledcAttachPin(PWM1, PWM1_CH);
| ^~~~~~~~~~~~~
| ledcAttach
exit status 1
Compilation error: 'ledcSetup' was not declared in this scope
@@ReMRC Made Progress. Reinstalled Arduino IDE and all librairies and now get this when i verify:
C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino: In function 'void setup()':
C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:55:3: error: 'ledcSetup' was not declared in this scope
55 | ledcSetup(PWM1_CH, BASE_FREQ, TIMER_BIT);
| ^~~~~~~~~
C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:56:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
56 | ledcAttachPin(PWM1, PWM1_CH);
| ^~~~~~~~~~~~~
| ledcAttach
exit status 1
Compilation error: 'ledcSetup' was not declared in this scope
i cant get my hands on a niodec mototrs used....... what happens if i use a normal bldc motor(drone) with an encoder....will it stilll work? please help :3
No... :)
Do you have a source for the lipo batter. 3S1P batteries seem to be in several form factors. I'd love to build this but i'm not sure all of the parts i found will fit.
Like this hobbyking.com/en_us/turnigy-nano-tech-plus-500mah-3s-70c-lipo-pack-w-xt30.html
@@ReMRC Great thanks. Such quick response 🙂
what are your ideas for a breaking system to jump in position? I saw you had a video 8 months ago but it doesn't look like you've migrated those features into this model. Is it planned? I saw another design online that uses a bicycle style brake(driven by servo) to stop the reaction wheel You could add printed ring to the reaction wheel that could run through the brake, that the brake would trap. I'm not an engineer so i'm sure there are things i'm not considering but it's an idea you might consider.
@@ReMRC sorry for asking so many questions but does the XT30 plug connect to the motors/mcu and the charger connect to the jst connector or is the jst connector used for both charging and use.
@@dylanthurston You can use any plug.
@@dylanthurston No, this type of brake is not suitable. The braking must always be the same. Means no slipping (like disc brakes). It is possible, but only as demonstration, it not always works.
How do I know what motor is 1,2 and 3? I see I can change the pin definitions, so I can swap them without having to resolder :)
Yes. Or watch this th-cam.com/video/Nkm9PoihZOI/w-d-xo.html
@@ReMRC aha, the one video I had not seen :) tnx
If I replace triangle and reposition the sensor together with new software only,will there be improvements, or new wheels are mandatory?
You can see both cubes with new software at the end of the video.
@@ReMRC why didn't you include LEDs in scematic and when do LEDs turn on?
@@hunakaka Because the LED connection is very simple. And schematic is completely unnecessary.
I must be missing something, how do you attach the motor to the balancing wheel?
How? th-cam.com/video/ZU0oTBRDgOE/w-d-xo.html
@ReMRC Oh, a custom part has to go on the shaft to interface with the wheel. Thanks, I hadn't noticed that part before.
@@hummerman85 Custom part? No...
@ReMRC I can not find the file for the black part you have on the motor shaft seen here. I have almost everything and can't wait to finish it. Thank you for putting this together. th-cam.com/video/ZU0oTBRDgOE/w-d-xo.html
@@hummerman85 This is part of motor. These motors are sold with this pulley.
there are several model for NIDEC24H. can you tell me the model number or purchase link?
24H404H160
@@ReMRC Thanks a lot
how does the cube finds where its real balance point/angle is ? i guess its not exactly on the imu 0 ?
The balancing point is determined by calibration.
@@ReMRC so it only works if your structure is perfectly symmetrical isnt it ? If your point of balance is changes by an extra mass your motors will saturate?
@@dolevwasser8639 You mean something like this? th-cam.com/video/aWhKnBbdXs0/w-d-xo.html
@@ReMRC exactly!!! How ? How do you change your reference angle ?
Is the code setup the same as in the first version?
No, bus all difference you can see in this video.
@@ReMRC Sorry, my bad, I ment as in uploading and setting up the code.
@@KerneIBit Setting the balancing points is different.
@@ReMRC Alright, Thanks!
can u update code? ledcSetup and ledcAttachPin are no longer used so the code gives an error.
for old version.
@@bakiyagzcelik6627 Use ESP32 2.0.17
Can u explain the code in a video please
No, sorry. Code explaining would be time-consuming and uninteresting to most viewers...
Making progress.Reinstalled Arduino IDE and all libraries and now get this when i verify:
C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino: In function 'void setup()':
C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:55:3: error: 'ledcSetup' was not declared in this scope
55 | ledcSetup(PWM1_CH, BASE_FREQ, TIMER_BIT);
| ^~~~~~~~~
C:\Users\Mark\Desktop\esp32_cube_enc\esp32_cube_enc.ino:56:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
56 | ledcAttachPin(PWM1, PWM1_CH);
| ^~~~~~~~~~~~~
| ledcAttach
exit status 1
Compilation error: 'ledcSetup' was not declared in this scope
Probably ESP32 library version 3.0. Version 2 (2.0.17) is required.
@@ReMRC I think that fixed my problem. Uploaded to esp32 board with no errors. Will solder the project board up this week. Thank you so much for your help.
Up and balancing. Thank you for your patience and assistance. Beeper is not working but I should be able to track that down on my own.