Hello! I want to print data just like the Serial Monitor in the Arduino IDE in Simulink. Is there a Simulink block for this? Why do I want to do this? It's because I want to connect it to ROS 2.
i'm using STM32 nucleo board and it doesn't have encoder block. is there an solution ?
@paranmanjang_6 күн бұрын
@@hongsethya4932 I think you can make your own. Check your encoder's data sheet first!
@paranmanjang_6 күн бұрын
@@hongsethya4932 Most encoder lines have two or three signal lines, usually sigA, sigB, direction, or the calculated count number or direction. Therefore, it is recommended to first check the signal output specified in the motor encoder’s data sheet and then bring those signals into the Arduino as input signals to build the system.
@SufiShahHamidJalali12 күн бұрын
Very good as you are using MATLAB/Simluink and embedded systems, this is more serious than just using the other platforms as more serious users will come to you. One suggestion though: It is better if you start a real world robotic project like a rover or anything you like and show case the power MATLAB/Simulink and the embedded systems likes Arduino, ESP and/or Raspberry Pi. 👍👍👍👍
@paranmanjang_12 күн бұрын
@@SufiShahHamidJalali In fact, I have worked on many projects using Raspberry Pi. If I get the chance, I will upload them as a series. Thank you!☺️
@SufiShahHamidJalali9 күн бұрын
@@paranmanjang_ Super! that is very good.
@SufiShahHamidJalali12 күн бұрын
Hi Donghwa, Your videos and tutorials are the missing link in the maker community when it comes to using MATLAB/Simulink and the embedded systems. This is very good initiative and I see a good future for you. Thanks for sharing by the way! 😊😊😊😊
@paranmanjang_12 күн бұрын
@@SufiShahHamidJalali Thank you. I hope the Makers community will like my video. Since I don’t know much about the Makers community, I’d appreciate it if you could help with promotion if possible.😊😊
@SufiShahHamidJalali11 күн бұрын
@@paranmanjang_ I will do that with pleasure. I will introduce you to my network from time to time.
i hope you make a video about Connect PS2-PS3-PS4 to control Arduino with simulink. So i can build mini robot car with it
@paranmanjang_25 күн бұрын
What does PS stand for??
@hongsethya493225 күн бұрын
@ any controller like xbox or Playstation2-3-4 or bluetooth or phone app. It is most important part of robotics.
@yossifahmed108327 күн бұрын
please make a postion control of DC motor using simulink arduino !!
@paranmanjang_27 күн бұрын
The next video will be about stepper motor position control. I think I will upload the video either tomorrow or the day after.
@yossifahmed108327 күн бұрын
@@paranmanjang_ please do the position also for DC motor after stepper 🙏🙏
@yossifahmed108327 күн бұрын
please make a postion control of DC motor using simulink arduino !!
@paranmanjang_27 күн бұрын
I’ll try making it next time when I have time. Other than speed control and handling encoder values, most of it is quite similar, so it might be a good idea to apply it on your own as well.
@hongsethya493227 күн бұрын
i really want bts7960 motor driver with simulink
@paranmanjang_27 күн бұрын
I checked the datasheet, and it seems like you can connect it as follows: Use LPWM instead of IN1 and RPWM instead of IN2. Connect ENb to the PWM pin. Then, connect OUT1 and OUT2 to M+ and M-, and adjust the direction accordingly. It should work the same way.
@paranmanjang_27 күн бұрын
I recommend starting from Part 1 and following along. In Part 1, it focuses on setting the direction correctly. In Part 2, it calculates the RPM based on the encoder, and by reviewing and applying Part 3, it should work.
@jonyromany-x4yАй бұрын
How to get the position of the motor using the encoder ?
@paranmanjang_Ай бұрын
You can divide 360 degrees by the PPR (pulses per revolution) of the motor. In my current motor setup, 42 pulses are detected for a full 360-degree rotation. This means that for every increase of 1 in the encoder value, the angle increases by approximately (360/42 = 8.57) degrees. If there is a gear, you simply divide by the gear ratio. I’m planning to upload a video related to this (PID position control) soon, so I’ll tag you when it’s uploaded.
@paranmanjang_Ай бұрын
I’ve explained this in detail in the PPT for “DC Motor Control Part 2,” so please refer to that.
@javiervinanzaca7396Ай бұрын
Could the PID tuner be used to obtain the values for Kp, Ki, and Kd?
@paranmanjang_Ай бұрын
That’s right. It was used to determine the values of Kp, Ki, and Kd. Once the values are finalized, you can use them by putting them into the constant value. I included it to demonstrate how to perform PID tuning. Looking at it now, the explanation seems a bit lacking. You can think of Kp as being used to increase or decrease overall responsiveness, Ki as being used when the system is unable to follow the target, and Kd as being used to reduce the magnitude of oscillations.
@pradeepmanoharan4859Ай бұрын
great video
@paranmanjang_Ай бұрын
You made my day! Thanks!
@EdwArd-l5k9lАй бұрын
thanks bro
@paranmanjang_Ай бұрын
Any time
@timothymak9129Ай бұрын
how can you move the slider gain while monitoring and tuning? It became grey and could not be change when i try it.
@paranmanjang_Ай бұрын
@timothymak9129 Check MATLAB’s hardware settings first! And check for any error messages while building.(Monitor and run) Go to Hardware -> Code Generation -> Build Configuration: Faster Run. If you can’t use it, try the ‘slider’ block instead. There are many other ways to do it. For other videos in the DC motor control series, the implementation was done using a slider, so please refer to those! :)
@paranmanjang_Ай бұрын
[ 08:18 ] I typed wrong - RPM : Revolutions per minute PPR : pulse per revolution
@omarbaalbaki62742 ай бұрын
Amazing thanks!!!
@paranmanjang_Ай бұрын
Glad you like it!
@omarsalem58322 ай бұрын
Thank you!
@paranmanjang_Ай бұрын
You're welcome!
@sawalvin26943 ай бұрын
thanks so much bro, i'm searching for this one for a long time
@paranmanjang_2 ай бұрын
Glad I could help
@ArmanAnsari-ii8te4 ай бұрын
Thanks bro. Keep enlightening us.
@kyrylobielohryvtsev4 ай бұрын
Hey Donghwa, great job. From what I understand PWM and Pulse generator are two distinct things. Have you tried to get PWM on the scope ? Based on sg90 datasheet and your great explaination 0 deg corresponds to 1 % of the duty cycle and for 180 deg duty cycle is basically 10 %. how do i achieve this control with Matlab ? Let me know what you think. Cheers.
@paranmanjang_Ай бұрын
I don’t have an oscilloscope, so I couldn’t check the PWM signal directly. However, I realized that I might be able to check the pulse values using an Arduino signal. I’ll try it out, and if I get any results, I’ll let you know.😊
@kennypelis5 ай бұрын
How could I do it with a 360 servo?
@paranmanjang_5 ай бұрын
If there is any sensor that can detect the angle of the motor, it is possible to control it, whether it is a servo motor, a DC motor, or a three-phase motor.
@khiane11597 ай бұрын
Can i ask if its triggered by a sensor like moisture sensor, what block should be put there to move the servo motor based on the sensor?
@paranmanjang_5 ай бұрын
Sure, I will upload later
@shashikantpandey84399 ай бұрын
good work..make more videos as there are not many available on latest versions of matlab