Тёмный
The Bored Robot
The Bored Robot
The Bored Robot
Подписаться
Welcome to The Bored Robot, your premier destination for hobbyists, students, and enthusiasts eager to explore the world of practical robotics and engineering.

As a passionate advocate for hands-on learning, I've had the privilege of instructing undergraduates in robotics and participating in innovative projects. This channel is a testament to the digital age of education, providing instructional videos and project presentations.

Join me on a journey where we simplify the world of robotics and engineering, making it accessible to everyone. Together, let's unlock the potential of creativity and knowledge.

Don't miss out-subscribe now, and let's embark on an adventure of exploration, creation, and enlightenment together!
DIY Camera Phone Slider
2:45
3 года назад
How to Control a Servo with Arduino
4:31
3 года назад
Building Circuits on a Breadboard
4:02
4 года назад
Комментарии
@SYED6304
@SYED6304 7 дней назад
Hi, can you please add the detail and specs about material used in description of video. Like Motor (voltage/current) rating, battery (voltage/current) rating, Type of Arduino used etc. Thanks.
@TheBoredRobotLLC
@TheBoredRobotLLC 4 дня назад
The motor/ESC combo are in the description of the video. I used an 11.1v Lipo battery.
@NicholasWong-vv1nn
@NicholasWong-vv1nn 8 дней назад
Does the baud rate need to be that high or can it be 9600?
@TheBoredRobotLLC
@TheBoredRobotLLC 4 дня назад
No it doesn't. It just depends on how much data you want over a given time period.
@rosenrotcoyohuehuetzin7802
@rosenrotcoyohuehuetzin7802 8 дней назад
This is what I needed to know, thanks a lot. I'm building a solar tracking system but didn't know how to get info about the photoresistors. If you had any code for solar tracking using photoresistors and a linear actuator I'd really appreciate it.
@TheBoredRobotLLC
@TheBoredRobotLLC 4 дня назад
I haven't directly created a tutorial on this, but for photoresistors, you'll need a voltage divider circuit.
@easy_3d
@easy_3d 8 дней назад
can i stop the motor at specific angles ?
@TheBoredRobotLLC
@TheBoredRobotLLC 4 дня назад
Yes, if you can relate number of encoder counts to motor angle.
@harish118
@harish118 10 дней назад
This is cool!!! Thank you.
@TheBoredRobotLLC
@TheBoredRobotLLC 4 дня назад
Glad you like it!
@umar07823
@umar07823 15 дней назад
Banger of a tutorial !
@TheBoredRobotLLC
@TheBoredRobotLLC 4 дня назад
Thanks!
@upi3673
@upi3673 17 дней назад
Thank you so much for the content 🙏🏻 I want to ask, can the program be used if using a 3 phase AC motor and using a relay as the contactor? Thank you in advance🙏🏻
@TheBoredRobotLLC
@TheBoredRobotLLC 4 дня назад
This program specifically is meant for brushed DC motors, but fundamentally PID can be used for if your problem, if you know the inputs and outputs.
@elliottraymond3274
@elliottraymond3274 18 дней назад
As others have said your code explanation is excellent! I am thinking of implementing this to control three ball valves - I just need to know do stepper motors have free movement when unpowered? I ask this as I need to consider how I can provide manual override in the event of power failure or other faults. In your opinion would stepper motors be suitable for my use case? Thanks
@TheBoredRobotLLC
@TheBoredRobotLLC 18 дней назад
Stepper motors can move freely when they are unpowered. They will hold their torque when powered. They are generally used when precision is required. It's hard to say if this is best for your use case without knowing more. If the movement is just and open and close, perhaps a solenoid can be an easier option?
@elliottraymond3274
@elliottraymond3274 17 дней назад
@@TheBoredRobotLLC Thanks, I was hoping that would be the case. It sounds like steppers may be my best option as I need fine control of opening %. The specific kind of valve is a 180 degree throw metering valve (to achieve a more linear relationship with opening % and flow than a regular ball valve).
@bola5671
@bola5671 24 дня назад
Is there a way for us to find The script for your arduino program, so we can copy and paste? The library I downloaded only shows "blocking", unlike in the video's "blocking_fixed_position"
@TheBoredRobotLLC
@TheBoredRobotLLC 23 дня назад
github.com/TheBoredRobot/RU-vid-Code
@trilinh9169
@trilinh9169 24 дня назад
So, if I want to run DC motor follow a sinewave. What I have to do?
@TheBoredRobotLLC
@TheBoredRobotLLC 24 дня назад
You'll set your desired position as the particular sine wave you want to follow.
@trilinh9169
@trilinh9169 21 день назад
@@TheBoredRobotLLC position 1200 and 250 (in sinewave equation) is the position of the pulse correct?
@TheBoredRobotLLC
@TheBoredRobotLLC 18 дней назад
@@trilinh9169 I don't exactly know exactly what you're asking here. If the equation you're trying to follow is y=sin(t), where t is some value for time, then y is the value that will be your desired set point in the PID controller.
@K055ma
@K055ma 25 дней назад
Thx bro
@TheBoredRobotLLC
@TheBoredRobotLLC 24 дня назад
You're welcome!
@San.Tarcisio
@San.Tarcisio 28 дней назад
very helpfull!!!
@TheBoredRobotLLC
@TheBoredRobotLLC 24 дня назад
Glad it was helpful!
@MaxImagination
@MaxImagination 28 дней назад
Great video, well explained! Using PID, can you achieve absolute position control with these encoded motors? Thanks!
@TheBoredRobotLLC
@TheBoredRobotLLC 24 дня назад
Yes, PID control can be used to control position when encoders are used.
@gearscodeandfire
@gearscodeandfire Месяц назад
I am just getting my feet wet with this, and this video is incredibly helpful!
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
Glad it was helpful!
@tree-service
@tree-service Месяц назад
thanks so much its realy useful
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
You're welcome!
@LeLouisLafontaine
@LeLouisLafontaine Месяц назад
The code for those who want to try it out : import serial import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation import csv # Constants SERIAL_PORT = 'COM4' BAUD_RATE = 115200 # Initialize serial connection ser = serial.Serial(SERIAL_PORT, BAUD_RATE) # Initialize empty list to store data x_vals = [] sensorValue_data = [] # Create a function to raed and process data from Arduino def read_and_process_data(): line = ser.readline().decode('utf-8').strip() sensorValues = line.split(',') x_vals.append(float(sensorValues[0])) sensorValue_data.append(int(sensorValues[1])) # Print the received values print(f'Time: {sensorValues[0]}, Sensor 1: {sensorValues[1]}') # Creat a function to update the plot def update_plot(frame): read_and_process_data() plt.cla() plt.plot(x_vals, sensorValue_data, label='Sensor') plt.xlabel('Time') plt.ylabel('Sensor value') plt.legend() # Creat a function to save data to a CSV file when the plot window is closed def on_close(event): with open('arduino_data.csv', 'w', newline='') as csvfile: writer = csv.writer(csvfile) writer.writerow(['Time', 'Sensor']) for x, s1 in zip(x_vals, sensorValue_data): writer.writerow([x, s1]) # Register the callback function for when the plot window is closed fig, ax = plt.subplots() fig.canvas.mpl_connect('close_event', on_close) ani = FuncAnimation(fig, update_plot, interval=10) plt.show()
@LeLouisLafontaine
@LeLouisLafontaine Месяц назад
Thank you so so so much !! This is exactly what I needed, short and effective, really good tutorial.
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
Great to hear!
@yuliniooimas5336
@yuliniooimas5336 Месяц назад
thanks
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
You're welcome!
@theflyinggrip
@theflyinggrip Месяц назад
Is anything like this able to be done with an elrs rc link?
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
I don't know, I haven't looked into that RC brand.
@caocao-oe6tm
@caocao-oe6tm Месяц назад
Thanks bro Does anyone know what is the x axis, like is it milliseconds or is it related to the baud rate
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
This depends on the baud rate you select in your code.
@danielungureanu430
@danielungureanu430 Месяц назад
Thank you!
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
You're welcome!
@joshuas9078
@joshuas9078 Месяц назад
Thank you! Phenomenal video! I love the style I love the explanations, to the point and easy to follow!! You may was to consider adding to the end of the ser.close() in the in_close() function. My system doesn't automatically close serial communication and this may save some headaches for other viewers as well!
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
Glad it was helpful and thank you for the suggestion!
Месяц назад
since arduino is running before the python script activates the time stamps do not start at 0. is there a way to make the timestamp start at zero once the python code starts?
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
I'm sure there is a number of ways you can do this, but one of the ways is to use a timer in python and plot the x axis with that value instead.
@minoz55
@minoz55 Месяц назад
Thank you!
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
I'm glad you liked it!
@narayanpatil7712
@narayanpatil7712 Месяц назад
How many ampere need when I used two Nema 17 with load
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
Nema 17 is the size of the bolt pattern on the motor. The current depends on what is called out in the datasheet.
@PintaoLoko
@PintaoLoko Месяц назад
There must be a simple way t change this. The plotter this way looks wrong for any application. My version is 2.3.2 and it's still like this.
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
So far, this has been the best way that I could find to fix this. I agree, there should be a better way to adjust these parameters.
@Animace
@Animace Месяц назад
Where to connect the signal wire to Arduino Mega?
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
I believe pin 0 and 1 should work on the mega.
@mrspaceman1767
@mrspaceman1767 Месяц назад
Lovely video! I was wondering if this code is compatible with an Arduino leonardo?
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
I haven't tested it, but I have no reason to believe that it wouldn't work on the Leonardo.
@bennguyen1313
@bennguyen1313 Месяц назад
How fast can the GUI keep up with the data? I tried using pyqtgraph, using one thread to parse the serial data, and another thread for the gui updating. However, my sensor transmits at 115kbps continuously, and the GUI starts to lag behind after just a few seconds! I imagine this is such a common application that surely someone has figured it out. Haven't yet tried VizhPort ... but on the off chance that python isn't the best suited, I was thinking fl_charts and flutter!
@andydebecker1192
@andydebecker1192 Месяц назад
Thanks, really good !
@TheBoredRobotLLC
@TheBoredRobotLLC Месяц назад
Glad you liked it!
@barbarianhadii1222
@barbarianhadii1222 Месяц назад
on minute 9:45 u said abaout 0 and 1023 on analog read,the funcition of 0 and 1023 for what???i'm still laerning bout that
@TheBoredRobotLLC
@TheBoredRobotLLC 29 дней назад
I'm scaling analog values, which will give a value of 0-1023, to a range of -500 to 500
@patrickchomurove819
@patrickchomurove819 Месяц назад
Woooow, this is the best out there on stepper control using Accel. How can i connect with you for further talks on some projects we can collaborate on. LinkedIn, Email, ????
@TheBoredRobotLLC
@TheBoredRobotLLC Месяц назад
info@theboredrobot.com
@TopoBasah
@TopoBasah Месяц назад
sorry for my language before. But what if using nodemcu (esp8266) ? is the code still same ?
@TheBoredRobotLLC
@TheBoredRobotLLC Месяц назад
I've never used that piece of hardware before. Just a quick google search shows that it uses a different language, so I do not believe the code will work.
@Okay1
@Okay1 Месяц назад
Ok
@ellerycadel
@ellerycadel 2 месяца назад
Question: this is a 1.5A stepper motor and from what I have read so far you need to double it for microstepping, then there are 3 motors so I get a total amperage of 9amps for the system and you said you are keeping the amperage at 1 amp because you are using a breadboard. How are you getting away with only 1 amp?
@TheBoredRobotLLC
@TheBoredRobotLLC Месяц назад
I have the motor controllers set to a current that just gets the motors moving. Also, there isn't any load on the motor shafts, so the motors won't draw that much current. The setup was just for the sake of this demonstration.
@narayanpatil7712
@narayanpatil7712 Месяц назад
I want two stepper motor Nema 17 with the load. How much ampered I need?
@JeffreyMaster
@JeffreyMaster 2 месяца назад
Hi, Is it possible to have the graph scaled to 600 points rather than the 1 point on the axis. So the incoming data is seen to the left of the graph(like the older IDE version seen in video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-PPYMEBa0Vys.htmlsi=__NaLmAU9nlpRXpA&t=1673). I don't want the automatic update of the X-axis. Thanks
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
I haven't looked into trying to make that happen. Recently, I've just been plotting data with Python to get more options with what I display.
@JeffreyMaster
@JeffreyMaster 2 месяца назад
@@TheBoredRobotLLC Thank you for your reply. I went back to the old version to output this data again. 😀
@talawadekargaureshsandeep5494
@talawadekargaureshsandeep5494 2 месяца назад
I am trying to control two stepper motors using arduino uno and tb6600 motor drivers and control them using Radio controller . However when i run my code only one stepper motor work while the other doesn't receiver input signals from transmitter
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
It's hard to say without knowing more. My first step would be to check the wiring and make sure that each of the motors runs individually first.
@spidarx
@spidarx 2 месяца назад
Exactly what I was looking for. Perfect! Thank you!
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
Great to hear!
@OPPSINT
@OPPSINT 2 месяца назад
Thank you for this video. It is helpful.
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
Glad it was helpful!
@rafiihsanalfathin9479
@rafiihsanalfathin9479 2 месяца назад
What is the advantage/disadvantage of using external pull up resistor other than the internal one?
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
One advantage of an external one is if you wanted to use a resistor with a different resistance value than the internal one.
@rafiihsanalfathin9479
@rafiihsanalfathin9479 2 месяца назад
@@TheBoredRobotLLC but why does that matter? Isnt the point of using pull up resistor is so that ur button is not in floating state? So the value of resistor doesn't matter anyway as long as it is high enough to be stable
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
@@rafiihsanalfathin9479 Yes that is true, but by variable resistance, I was referring to applications that you may want to control current draw.
@Daniel-dg5po
@Daniel-dg5po 2 месяца назад
I have to run the python file when the Arduino starts running?
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
Do not open the serial monitor in Arduino. Get the code uploaded to your arduino first. Then run the python code.
@abdotsouri9432
@abdotsouri9432 2 месяца назад
link of the code !
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
github.com/TheBoredRobot/RU-vid-Code
@ivanravaglioli
@ivanravaglioli 2 месяца назад
Avrei bisogno di leggere 6 canali da un ricevitore RC, come devo modificare la Sketch?
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
I have a video update on this: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MsUL-RY8ZrY.htmlsi=A3ninmmYJwcJUuIB
@girrrrrrr2
@girrrrrrr2 2 месяца назад
I have a question, I'm using a drv8825-ish in 1\32 micro step, and the motor moves terribly slow. What can I do to make it go faster? My ultimate goal is just a constant rotation speed which varies per motor so that I can use it in my drawing machine
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
It's going slow probably because you're doing 1/32 steps. Changing to full step or even half step will make it faster, but you may give up precision. It depends on your application.
@MrGerka0291
@MrGerka0291 2 месяца назад
How did you get it!??? Thank you very much!!!!
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
I'm glad it helped. I had to look through some forums on this one.
@NightEagle816
@NightEagle816 2 месяца назад
volatile long StartTime = 0; volatile long CurrentTime = 0; volatile long Pulses = 0; int PulseWidth void setup() { Serial.begin(9600); pinMode(RCPin, INPUT_PULLUP); attachInterrupt(digtalPinToInterrupt(RCPin),PulseTimer,CHANGE); } void loop() { if (Pulses < 2000){ PulseWidth = Pulses; } Serial.println(PulseWidth); } void PulseTimer(){ CurrentTime = micros(); if (CurrentTime > StartTime){ Pulses = CurrentTime - StartTime; StartTime = CurrentTime; } }
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
I have an update to this video to make things easier: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MsUL-RY8ZrY.htmlsi=HysbnLop4zBKpxot
@rickperalta1921
@rickperalta1921 2 месяца назад
Excellent video - Thanks! Consider using unsigned math on micros() it simplifies the code (no if() needed). Consider a small state machine in the inyerrupts. On a rising edge save time and on falling edge compute delta and set a new system state. Thid avoids some complications and can help clarify the interface.
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
Thanks for the advice! I also found another approach and I did that on another video as well. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MsUL-RY8ZrY.htmlsi=HysbnLop4zBKpxot
@Whathefishbro
@Whathefishbro 2 месяца назад
if yes can you provide the circuit diagram and code for it
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
github.com/TheBoredRobot/RU-vid-Code
@Whathefishbro
@Whathefishbro 2 месяца назад
can we control the position of stepper motor with tb6600 and potentiometer
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
I have a video on this. You should be able to do the same with the motor controller that you mentioned. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QRCvC5xhJCw.htmlsi=tg4ZDeatLPXbjkhq
@stevefox3763
@stevefox3763 2 месяца назад
Please could you release code for this that uses Rc PWM for the control input? My personal use requirement is 2 Rc channel input for 2 stepper controls so this would work great for me if I could use Rc input to control it. Steve.
@TheBoredRobotLLC
@TheBoredRobotLLC 2 месяца назад
github.com/TheBoredRobot/RU-vid-Code