Reddit:Electronics

Subscribe to Reddit:Electronics потік
Discussion and news about component-level electronic circuits.Electronic systems and circuits
Оновлене: 1 година 48 хв тому

I built Rem-RC's self balancing cube robot. I found it somewhat hard to follow, so this is my supplemental guide to try to help other novices like myself.

Птн, 03/29/2024 - 17:45

The following guide is how I managed to build my cube. I am a novice in many of the aspects of this project so this was a really fun challenge. As a novice I thought it would be good to put together a "from scratch" approach for this guide as not everyone has all the tools and parts available on hand. I hate being nearly finished and then discovering I don't have everything I need, it really kills my momentum.

All credit for the project and MANY THANKS to Rem-RC (Youtube / Github / Thingiverse).

#0 - Parts / Hardware / Tools List / etc

I noticed that there were parts mentioned, but there was no all encompassing list for everything needed in order to assemble a working cube.

Parts

  • ESP32-WROOM-32 - Microcontroller (30 pin version)
  • MPU6050 - Accelerometer/Gyro
  • 11.1V 3S1P LiPo Battery ~500mAh (I could only find 450 or 550 mAh batteries. Also note the type of connector and buy a compatible connector that you can terminate to the breadboard)
  • 5cm x 7cm Solderable Breadboard
  • (3x) Nidec 24h Brushless servo motors (Ebay)
  • PCB Mount Screw Terminal Block Connector
  • 2N2222 transistor
  • 5v Active Buzzer
  • 0.1µF ceramic capacitor (sometimes called 100nF or 104 capacitor)
  • 35V 100µF electrolytic capacitor (I could only find 50V, higher voltage rating will still work fine, just don’t go lower)
  • 7805 Voltage regulator
  • 6.8k Ω resistor
  • 33k Ω resistor
  • 10k Ω resistor

Hardware

  • Solder, Solder wick, flux, etc
  • 22awg solid wire
  • 6awg solid wire (for the battery connector, you might be able to use smaller gauge wire)
  • Breadboard header pins (break apart type is good)
  • Breadboard female header pin sockets (I got a pack of 15 pin header sockets and cut them apart as needed)
  • (~40x) M3 x 10mm screws
  • (~10x) M3 x 12mm screws
  • (~50x) M3 hex nuts
  • (~60x) M4 x 8mm screws
  • (~120x) M4 nuts (You want to make each reaction wheel’s mass around 70 grams, after 3d printing the wheels they came out to ~20g each, so I needed 50g of M4 hardware)

3D Printed Parts (from Rem-RC's Thingiverse)

  • (3x) reaction_wheel_cube_1 (these are the bottom sides of the cube)
  • (3x) reaction_wheel_cube_2 (these are the top sides of the cube)
  • (3x) reaction_wheel_cube_3 (these are the reaction wheels)
  • (3x) reaction_wheel_cube_4 (these are the motor mounts)
  • (1x) reaction_wheel_cube_5 (this is the triangular mount between the top sides)
  • (3x) reaction_wheel_cube_6 (these are the mounting brackets between the cube sides and the triangular mount)
  • (2x) reaction_wheel_cube_7 (these are the battery holder sides)
  • (1x) reaction_wheel_cube_8 (this is the battery holder backstop)
  • (1x) reaction_wheel_cube_9 (this is the breadboard mount)

Tools

  • Digital Multimeter (You need to check your battery voltage, and it helps with checking circuit continuity)
  • 3D Printer (or a friend that’s willing to print stuff for you)
  • Soldering Iron, Wire Strippers, screwdrivers, etc
  • LiPo Battery Charger (I recommend a balance charger like the SkyRC iMAX B6AC, it was recommended by the FPV drone and RC Planes communities)

#1 - Schematic

I saw that there were two different schematics, one for an “Arduino nano” and one for an “ESP32”, but they have essentially the same components with the exception of the buzzer circuit. The ESP32 schematic shows a P-type transistor with the Emitter, Collector, and Base in a different orientation to the N-type transistor on the Arduino nano schematic. I ended up using an N-type transistor “2n2222” on the ESP32 and had to switch the orientation to match.

I also got really easily confused as I am not great at mapping a schematic to a solderable breadboard. So I have re-drawn the schematic to “color code” it a little bit. Many components share a ground and many others share a 5V output of the 7805 voltage regulator. I won’t show you a picture of my board, because it is hideous and I won’t inflict that upon you, but I will show you a rough drawing of how my board is wired.

#2 - Circuit Assembly and Testing

I started by building everything on a regular breadboard, it made checking everything a lot easier than trying to solder and un-solder every incorrect component. First up was checking the voltage into and out of the 7805 to confirm it was 11.1V in and ~5V. I then made sure the MPU6050 was outputting appropriately (I fried at least one board because I accidentally gave it 11V straight off the LiPo battery, oopsies). The 7805 can get HOT if you’ve mis-wired anything, so don't burn yourself. I moved on to test that each motor worked with the “motors_test” file. This file basically makes Motor 1 spin clockwise, then counter-clockwise, then Motor 2, and then Motor 3.

#3 - 3D Printing and Initial Assembly

All of my parts were printed in PLA with .2mm layer height and 50% infill. Everything is pretty forgiving in terms of fit and tolerances. If you print the reaction wheels with more walls or higher infill, you may end up with more mass, and therefore need fewer screws and/or nuts. Make sure all of your screws have good clearance with each other when they rotate. I followed the assembly video on Rem-RC's youtube channel, and that should get you going. This video is what made me want to start the project in the first place.

#4 - Code and Calibration

I haven’t done many Arduino or microcontroller programming projects, so I had to start from basically scratch. Download the Arduino IDE, the USB driver for the ESP32, and plug in the ESP32. You will need to download the ESP32 plugin to be able to connect to it. Once done select ESP32 Dev Kit and the COM port that it shows up on (I found mine on COM 5).

I found that the existing code inside the functions.ino section didn’t work with what my MPU6050 was outputting during the calibration process. Basically the code is expecting the MPU6050 to balance between two values for each balance point.

With the USB cable disconnected and the battery connected, connect to it with a serial bluetooth terminal (I just found one on the google play store). Follow the process of calibration in the assembly video, essentially it is outputting the different X/Y values to the terminal which you will then need to add to your code. These are my values which will not be the same as yours, but you can use it as an example of what to look for in your own troubleshooting and calibration process.

Edge 1

Measured values: X= -33.71, Y= -1.57

Expected values range: -45 < X < -25, -30 < Y < -10

Corrected values range: -45 < X < -25, -30 < Y < -1

(My value was outside the expected range)

Edge 2

Measured values: X= 30.06, Y=-1.35

Expected values range: 20 < X < 40 , -30 < Y < -10

Corrected values range: 20 < X < 40 , -30 < Y < -1

(My value was outside the expected range)

Edge 3

Measured values: X= -3.33, Y= 49.98

Expected values range: |X|< 15 , 30 < Y < 50

Corrected values range: |X|< 15 , Y < 50

(My value was fine)

Vertex

Measured values: X= -2.54, Y= 17.04

Expected values range: |X| < 10 , |Y|< 10

Corrected values range: |X| < 10 , |Y|< 20

(My value was outside the expected range)

Once all of the balance points have been calibrated and it is held close to one of the balance point it will beep once and begin spinning the appropriate motor(s).

#5 - Other

Make sure your micro USB cable is good, no really, double check it. I tried to troubleshoot my ESP32 board for like 2 days straight before figuring out that BOTH of my micro USB cables were bad. They could pass power and turn on the LED, but no data.

Links:

remrc's github - https://github.com/remrc/Self-Balancing-Cube

3D Print Files - https://www.thingiverse.com/thing:5380306/files

Rem-RC's youtube assembly guide video - https://www.youtube.com/watch?v=AJQZFHJzwt4

Rem-RC's youtube tips video - https://www.youtube.com/watch?v=Nkm9PoihZOI

Arduino IDE - https://www.arduino.cc/en/software

ESP32 USB to UART Bridge (drivers) - https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers

submitted by /u/Slanted_Jack
[link] [comments]

Dishwasher pcb

Втр, 03/26/2024 - 05:38
Dishwasher pcb

Anyone know what this component is? It's on the power supply side of the pcb

submitted by /u/cheeseandcrackers87
[link] [comments]

Axial flux motor

Ндл, 03/24/2024 - 23:02
Axial flux motor

So I dissembled a old broken vhr and I was really surprised when I found out they used a axial motor back in the day, I thought it was only recently used so yeah

submitted by /u/EldenQC
[link] [comments]

Dual 8-Bit Proccesor Controller From 2003

Ндл, 03/24/2024 - 20:47
Dual 8-Bit Proccesor Controller From 2003

Admiration for this beautiful technology I own.

submitted by /u/CarbonTires
[link] [comments]

Built a POV display and it looks super cool

Ндл, 03/24/2024 - 07:58
Built a POV display and it looks super cool

POV display working

The idea was to build a 128 pixel POV display that can display small GIF images. Happy with how it turned out. Like always the GERBER, Code and 3D model is made open-source

Also built a Image to code converter for this POV display : https://circuitdigest.com/calculators/pov-display-image-to-code-converter

POV display with 3D printed enclosure

Full tutorial: POV Displayfrom CircuyitDigest

submitted by /u/HotReaction4663
[link] [comments]

When you forget to check your files before handing them in to be printed

Ндл, 03/24/2024 - 05:12
When you forget to check your files before handing them in to be printed

So uh apparently I must’ve forgotten to set my dimensions to the silkscreen layer and it printed as traces since it was on the signal layer 😆🤦

submitted by /u/welpthatsucks12345
[link] [comments]

The engineer’s guide to niobium electrolytic capacitors

Сбт, 03/23/2024 - 21:54
The engineer’s guide to niobium electrolytic capacitors

This author (Stephen Fleeman) is a retired engineering professor and aerospace engineer, who loves electronics and is one of the most genius circuit analysis gurus I’ve ever met.

This is his most recent article on engineering.com. Check out the others too if you like this one!

submitted by /u/Wintermute815
[link] [comments]

Weekly discussion, complaint, and rant thread

Сбт, 03/23/2024 - 17:00

Open to anything, including discussions, complaints, and rants.

Sub rules do not apply, so don't bother reporting incivility, off-topic, or spam.

Reddit-wide rules do apply.

To see the newest posts, sort the comments by "new" (instead of "best" or "top").

submitted by /u/AutoModerator
[link] [comments]

Сторінки