r/ArduinoProjects

Introduction To Binary Protocols In Robotics
▲ 10 r/ArduinoProjects+3 crossposts

Introduction To Binary Protocols In Robotics

Hi fellow robots, as I work on my projects I discover cool new ways to do things and I thought I'd share something I learned with you guys.

Typically in Arduino projects where you need to read and write to connected devices such as sensors and motors, you'd use serial communication. If you wanted to use Python to talk to the Arduino (to control motors or receive feedback), you'd need a way to bridge the language gap between C++ and Python. Most beginner tutorials would teach you to just send strings of characters back and forth that have to be parsed.

But that's a very rigid and cumbersome way of passing information. If the number of decimal places changes, your message could now be a different length. Each character is one byte, so your message could end up being massive if you have large numbers.

This is where it makes sense to use a binary protocol, where you send a fixed "frame" of data represented as bytes and all devices abide by the protocol. The idea is to define the structure of your message and send data as binary representations.

  • The message "type" can be represented by a single byte (eg. 0x01).
  • If the data or payload is a floating point number, it can be represented by 4 bytes regardless of how big it is (up to a limit).

Now you can always send and received fixed message structures and lengths, known as "packets". This is much more elegant because you always know where to expect each piece of information and how big they are, so you don't need to deal with parsing large strings of characters that vary in length. The difference is especially noticeable once you start sending multiple pieces of information in one packet (eg. speed, position, temperature, voltage, current).

I didn't want to make this post too long so this is just a basic overview. If you're interested in more detail with examples to improve your inter-device communication, check out my article.

u/NameruseTaken — 5 hours ago

Quels site vous me conseillez pour acheter des composants arduino

Aussi je me débrouille pas mal avec les ultrason et les moteurs et j'aimerais pousser un peu plus loin

Si vous avez des idées de projets je suis ouvert a toutes propositions Merci

reddit.com
u/snexx_darki54 — 11 hours ago

Is it better to have a massive starter kit with 50+ parts, or a "Essential" one with only the core components?

Hi everyone! I’m a Mechatronics student currently looking into how we learn embedded systems. I’ve noticed that most starter kits on the market are quite expensive because they include dozens of components that many of us don't even touch during our first few semesters.

I’m trying to draft a proposal for a "Minimal Viable Kit" aimed at students on a tight budget. The idea is to cut the price by 50% by including only the high-value components used in real university-level projects.

I’d love to get your expert opinion on this:

As a student or hobbyist, would you have preferred a budget-friendly kit with ~10 essential parts to start immediately, or did you find the massive kits actually worth the extra wait and money?

What is the biggest "deal-breaker" for you when looking at a kit? (Price, lack of documentation, or useless filler components?)

If you had to pick only 5 to 8 "must-have" components for a beginner mechatronics kit, which ones would they be?

Do you think a structured project roadmap is more valuable than just having more components?

I’m really trying to understand if a "less is more" approach actually helps students or if I’m overthinking it. Thanks for the feedback!

reddit.com
u/Leo_Afurio23 — 13 hours ago
▲ 4 r/ArduinoProjects+1 crossposts

How to code an Arduino

This is the arduino i have. I have never used an Arduino or anything like it before but my professor gave us a project and is requiring us to use one. There are 4 buttons on the breadboard and each will play a specific audio through a speaker and then certain LEDs on an LED light strip will light up. The issue is is I don’t know how to code this or figure it out.

u/GoldDistribution447 — 1 day ago

Tips on water gun project

So I wanted to make a project where I can have a water tube run up the arm from your finger, and button in your palm to activate it like a water gun.

I just want some tips on what kind of pump I need that would give me the highest psi and any other parts I would need. And maybe some tips to write the code lol.

reddit.com
u/Logit4342 — 3 days ago
▲ 16 r/ArduinoProjects+2 crossposts

Follow-up about optocoupler and PWM

So this is the scope on it. In Klipper, I have the PWM set to 50%. I played around and dropped from the 10k pull-up to a 2k pull-up and got it to this point. I’m thinking part of it is my poor hand done perfboard connections, but maybe not? Anyway, this is a 24v signal going to an 817 coupler to get a 5v signal to my laser. Still have a lot of work before I can truly test it and engrave stuff, but making progress

u/Human_Neighborhood71 — 4 days ago

Hi guys I just wanna ask question for my thesis xoxo

I am using Arduino R3 for my Physics Laboratory Model where I want to read the toy cars speed (Initial speed and final speed) and the time it reaches from 1st Sensor to 2nd Sensor (IR Sensors)

The separation distance from the 2 sensors is prolly 9cm.

My problem is I didn’t seem to work, I used codes but it only reads its average speed, which is not okay because I need the Initial Velocity and Final Velocity.

Help me plssssss

Edit: I am a beginner with this but this project is required so yeah. Also another question, can I use the IR Sensors without it being plugged in at the breadboard?

reddit.com
u/yukinoo_0822 — 4 days ago

Arduino ESP32 environmental logger for radiation and other environmental sensors project

So I had a running and working code for a long-time but after our home remodeling I finally had some time to rework it completely. Thanks to Github copilot I was able to rework it for the latest versions of Espressif's firmware and the other libraries I've used, rework the code, dashboarding and include configuration options 😀

Most settings and vars were static but can now be set and changed. I've even included OTA updates so I don't have to hook it up with usb

https://github.com/DonZalmrol/Environmental-Logger-with-ESP32

Feeling pretty even if it was woth some code vibing help 😉

u/DonZalmrol — 3 days ago

Build a VisionGuard: AI-Based Human Motion Detection System

made a VisionGuard: AI-Based Human Motion Detection System in my first offline hacakthon using arduino uno , buzzer, and led light!!!!!!

u/Butterscotch9238 — 3 days ago

I made modular 6x6mm button caps for Arduino (multiple styles & symbols)

I designed a set of button caps for standard 6x6mm 4-pin tactile switches (the common Arduino buttons).

There are a few different versions:

  • shape set (default, tall, low profile, concave)
  • media controls (play, pause, stop, next/prev, volume, mute)
  • UI controls (arrow, confirm, cancel, menu, power)

Each cap also comes in two styles:

  • flat edges
  • rounded edges

They’re press-fit and meant for quick prototyping or cleaner control panel builds.

I mainly made these because I couldn’t find a consistent set that matched together.

If anyone has suggestions for more symbols or improvements, I’d love to hear them

shapes

media control

ui control

u/Hour_Seat5773 — 5 days ago

datasheet composant Jieli

Bonjour,

je suis entrain de recherher les information sur les composan du pcb de mon écouteur bluetooth et je suis tombé sur un chipset de la marque JIELI le numéro sur le composant est AC6983D4 je cherche à avoir la datasheet de ce composant.

Quelqu'un saurait'il comment trouver ces informations.

reddit.com
u/Relative-Day-5951 — 3 days ago

Designed for forward intelligence gathering, surveillance, and target enemy in kitchen 🤣

So, i made an Car using Arduino Uno, Relay, Ultrasonic Sensor, Batteries And Powerbank.

.

.

I used relay to turn on and off the motor because i burnt my motor driver last week 😄. I had the Orginal controller of the Rc car, which also got burnt because of high voltage 😁. I used a Sensor in the front, so when it detects something, the car moves forward and hits it. Because of the drag, the car is moving slow, so i should an wheel in the backside also.

.

.

Please Dont ask me "What is the use of it" 🤣 cause i dont know why i made it

u/Full_Opportunity8116 — 6 days ago
▲ 4 r/ArduinoProjects+1 crossposts

Verify optocoupler

I’m converting an old 3d printer to a laser engraver. Im using a 4W diode laser. Having to use separate power as printer is 24v and laser is 12v. The PWM is 5v, so I am using a buck converter to step it down from 12v. I want to verify that the info is correct. I’ve used GPT to assist in figuring out what to do for that, as I will be using the 24v PWM fan pin to control the laser. It’s telling me to use a 817 package coupler, on the laser side, 5v>10k resistor>PWM pin AND Pin3 of the coupler, with Pin4 going GND, then invert the signal on the printer configs. Does this sound right? Or could I just do 5v>Pin3, Pin4>PWM pin?

reddit.com
u/Human_Neighborhood71 — 7 days ago
▲ 7 r/ArduinoProjects+2 crossposts

Servo Motor Calibration

Hi everyone,

Long time lurker here. I see many people learning about robotics through hobby projects (myself included) and I wanted to start sharing things that I've learned that people might find interesting or useful for their projects.

This post is about servo calibration. When you buy cheap servos, you might not get the accuracy you need because there are variations between each unit. To get around this, you just need to rotate the servo to known positions and record the PWM value that takes the servo to those positions. This mapping yields a relationship between PWM and servo angle for that particular unit.

Check out my article on Medium:

https://medium.com/@ianqyhong/servo-calibration-4ea1d43c46a6

Let me know if you found this interesting, useful, completely useless, or any other feedback!

reddit.com
u/NameruseTaken — 4 days ago

Ride on ferrari upgrade

so I have this old kids ride on feber ferrari. the kids are too big for it but don't want to see it go, so ive removed all the running gear and added a hoverboard to the back, attaching a throttle in the car for power. its been a faff trying to get the firmware sorted on the boards as I control the throttle via an arduino controller.

all in all this project has cost a out £20 so far.

I just need to figure out how to connect the old wheels

u/man3ack — 9 days ago
🔥 Hot ▲ 143 r/ArduinoProjects

I built a retro 2000s-style open source camera 📸

Hey, I built a small retro camera that captures images with a nostalgic digital style. It’s powered by an ESP32-CAM module and the whole project is open source. The case is fully 3D printable and the build is pretty simple, so it’s easy to put together.

The camera is intentionally screen-free, so you just shoot without overthinking it, like back in the day. Everything is controlled with a single button, and you can download the photos over WiFi.

If you want to build one yourself or check out more photos taken with the camera:

https://github.com/chriko3/ObscuraOne

u/CantaloupeFlimsy8157 — 10 days ago

I made a modern rust-based Image/Video viewer that covers most formats, supports adding endless folders, and is hardware accelerated (CPU/GPU) It's free, and would appreciate feedback!

This project came from the idea that I wanted to properly view my big plethora of video/image content in my HDDs. And nothing seemed to really work, windows was really shitty with loading A LOT of media at once, the endless loop of death 🙃

I couldn’t take it and made my own viewer which made my life a lot easier.

Let me know what you all think :-)

reddit.com
u/eth0nhunt — 4 days ago