IR Controlled Spinning Speed Cube Display
by ArihantNag in Circuits > Arduino
25 Views, 0 Favorites, 0 Comments
IR Controlled Spinning Speed Cube Display
Imagine This: you walk to your living room just to see the great pacific garbage patch spread all over the floor, your mom says, "GET THIS MESS CLEANED UP NOW!" Even you think it's messy and it's time to clean up. But where do I put all this stuff, the legitimate garbage goes in the trash, but I soon realized I had no place for my cubes and under no circumstances would I disrespect them. So, I thought long and hard and I'm proud to present... An IR controlled spinning speed cube display!
Supplies
what you need:
a 3d printer
PLA filament
arduino uno: Amazon.com: ELEGOO UNO R3 Board ATmega328P with USB Cable(Arduino-Compatible) for Arduino : Electronics
hx1838: Amazon.com: DWEII 6 Sets Infrared IR Wireless Remote Control Module Kits DIY Kit HX1838 for Arduino Raspberry Pi : Electronics (battery not included)
Parts (3d Printed)
here are the parts we will use (I used slightly different parts, but these look better)
Put Servo Wheel and Cube Stand on Base
hot glue or superglue the wheel (I used a different one than the file) in the absolute center of the base. hot glue the cube stand in the middle of the other side of the base. this will be the turn table for the display.
Put Electronics in the Undercarriage
just jam the electronics inside the base and route the servo wire through any hole.
Here’s a clear, reliable wiring guide for your exact setup:
- HX1838 IR receiver
- Arduino UNO R4 WiFi
- Continuous‑rotation servo on pin 3
- IRremote library using pin 2
Everything below matches the code you’re using.
Wiring Overview
1. HX1838 IR Receiver → Arduino UNO R4
Most HX1838 modules use this pin order (left → right):
OUT GND VCC
Wire it like this:
HX1838 PinArduino Pin
OUT
D2
GND
GND
VCC
5V
Important: IRremote on the UNO R4 expects the receiver on pin 2. Using pin 8 causes decoding problems.
2. Continuous‑Rotation Servo (CR servo) → Arduino UNO R4
Your servo has three wires:
- Brown / Black → Ground
- Red → +5V
- Orange / Yellow / White → Signal
Wire it like this:
Servo WireArduino Pin
GND
GND
5V
5V
Signal
D3
Note: Servos draw more current than sensors. If your servo twitches or resets the board, you may eventually want a separate 5V supply — but for light loads, the UNO R4’s 5V pin is usually fine.
HX1838 IR Receiver:
VCC → 5V
GND → GND
OUT → D2
Continuous Rotation Servo:
Red (VCC) → 5V
Brown (GND) → GND
Orange (SIG) → D3
Everything shares common ground.
IR Receiver
glue receiver on front hole and ad bracket to make things look cleaner (handle.stl)
Addition of CR Servo
Glue on CR servo behinde handle.stl.
Final Step, Put Turntable
you should just be able to press fit it on.
Code
It's always safe to check what signals your remote is sending. Here's the Hex reader code:
#include <IRremote.hpp>
if your receiver (on pin 2) is getting 0xBA45FF00 and 0xB946FF00 when button "1" and "2" are pressed, Awsome!
if not, thats fine, just replace the the default hex code with your hex code:
TEST!
I would love to show you a demo but unfortunately, phone cameras emit infrared light which makes the IR receiver go CRAZY and so the remote doesn't work because the phones IR overpowers the remote.
I hope you had as much fun as me when making this! BYEEEE!