Build a Real Robot - Episode 11 - Motor Coding

preview_player
Показать описание
In todays episode of the Build a Real Robot Series I will give you an update on the code for the motor controller.

Just a brief update today.

The code for the motor controller is still in development, and as I program it I’m also writing some test routines to exercise the controller and the motors.

Right now the controller runs a test routine that runs a sequence:

Move the motors at a speed of 200 for a couple of seconds.
Reverses and moves again at the same speed.
Stops for two seconds.
Accelerates forward to a speed of 255
Runs for four seconds and then decelerates to zero
Waits fours seconds
Repeats the acceleration and deceleration, but in reverse
Stops

I’ll go over some of the code today, specifically the code that does the acceleration and deceleration and also the code that determines the specific I2C address used by the Arduino Nano.

I’ll also go over some of the considerations you need to pay attention to when connecting a USB cable to the Nano while the robot is powered up.
Рекомендации по теме
Комментарии
Автор

This video needs to be added to the series playlist

jgilbert
Автор

Thanks Bill... delivering what is always worth learning and put into practice... DB1

odirilefrank
Автор

Of course this is fantastic but I miss the other content. hope everything is finally going well for you. thanks always.

williamcarr
Автор

I seriously miss the every Saturday videos of yours!! Look forward to them all week.... I would really like you to make a video for the Esp8266. I have also filled your suggestion form! Nice video though.... keep up the good work!

ProGamer-krtn
Автор

Thanks for the update. These are fun to follow. I'm unlikely to build anything like this myself. But it's great fun to follow your progress. And I get ideas I can use on my own projects.

chance
Автор

I just discovered this extraordinary series today and I took the afternoon off to watch all the episodes in order, starting with episode 1. I just watched episode 11 and I can't find 12. Is it possible that I've finally caught up and will have to wait on new episodes? I'm worried, because episode 11 was posted a month ago, so I'm worried that the neighborhood flooding Bill mentioned in the last few episodes has forced him to delay, or possibly stop producing these excellent videos. I hope not just because I like the videos and the project he's working on, but because I feel like I know Bill after watching eleven of his videos and I don't want anything bad to happen to him, or to the neighborhood where he lives. I wish the forum he talked about was up and running so I could find out what's going on.

itisonlyadream
Автор

Love your work. learned a lot from you. Thanks for that

nuwanpriyankara
Автор

You can use a 12V battery for all of your power needs by just using Vin pin on your Arduino, I am reffering to the Uno or Mega. I am not sure of the mini or pro, 3.3-5v versions to be aware of also on the mini's

brianjohnson
Автор

Isn’t it possible to just use the RX/TX & Gnd pins to USB, while leaving the Nanos powered by the robot’s own 5V supply?

captainpugwash
Автор

First, love this selfbuild robots :-) as always thumps up.

andarthome
Автор

Can the Nanos be programmed using FT232 FTDI modules using serial programming? I'm hoping to use an STM32 microcontroller where you are using the Nanos. I use the Arduino IDE and programming to program the STM32F01C8T6 board. But I use serial programming and a separate FT232 FTDI module instead of the USB connector.

MysticDreamer
Автор

To eliminate the fuse removal, and unplugging the cable from the mega, to isolate programming power, why not include small shutoff switches to the 5v to the arduinos and the RPI. Separate switch for each. Seems like there's got to be a easier way to program these things without constantly worrying about power, what fuse needs to be pulled etc. Wireless programming would be great. Great vids.

maxd
Автор

Hey bill do you think you could help me with sending time from the phone to an arduino using a hc-06 bluetooth module. im really stuck and can't find any where else which knows. thanks and keep up the good work

williamlicquorice
Автор

I'm sure you thought about that..for your rotary encoder problem and the timings, but I'll just remind you that by changing the pwm frequency, you mess up the internal timers, so all of your timers are a mess.
Good thing is, you can counter it with some adjustments.

crckdns
Автор

Thanks for the great video Bill. Have you seen PlatformIO for Arduino programming? It’s an extension to the Microsoft Visual Studio Code IDE and a great improvement on the standard. If you like it maybe you could do a video on it sometime. Take care 👍🏾🤓

TBoy_
Автор

Why not use a diode between the internal power supply and the Arduino, then you avoid powering everything from USB. The Arduino includes a diode on the USB input, but not on the local power input.


For acceleration I would use a table, that way it is possible to adjust the acceleration curve and then control it from a timer interrupt with two variables: current_speed and required_speed. The interrupt routine can then decide if it stays, step on up or one down in the acceleration table.

henrikjensen
Автор

Great! Sample trial code kindly share pl

soumitradey
Автор

If the robot stops, due to an obstacle signal, while incrementing "i" during accelerating. Again motor initial speed should return back to " low speed" and start acceleration again...for that code need to change.

soumitradey
Автор

Your acceleration function needs to test for emergency stop and take appropriate action. Personally, I would have used timed interrupts.

ColinMcCormack
Автор

A moderator oy! I don't know if I'm brave enough for that or not but it would be cool to have one but I think it should have some comedy in it a buffer my project would certainly be enough for some laughs a little robot schtick 👍 excellent video bill good job on db1 call it the old billy baroole like in caddy shack😀

wishicouldarduino