================================================================================================================================================

Friday, January 9, 2009

IR Remote Controlled Car (PWM motor control using ATmega8)





Hi Friends,
in my last post of Simple DC motor Control, I've discussed controlling a small DC motor using the PWM method with MOSFET H-bridge. The circuit was build with microcontroller ATmega8.
Here, I'm extending the same circuit to control the DC motor with IR remote control. The motor is fitted on a toy car wheels with gears, as shown in the figure above.

Following is the schematic (Click on the image to enlarge it):

The circuit uses two PWM channels of ATmega8 for controlling the speed and direction (reverse, forward) of the car, based on the command received from the IR remote. Here, a Sony TV remote was used. The IR codes were received by using TSOP1738 IR detector from Vishay. (Thanks a lot to Michael Spiceland from tinkerish.com, for helping me out with the code for IR signal decoding!).

Following buttons on the remote are used for control:
'1' : Start motor
Volume+ : Increase speed
Volume-: Reduce speed
Channel+: Forward direction
Channel-: Reverse Direction
'0': Stop motor

Check out the video (the LED blinks whenevr a key on the remote is pressed. The remote is not visible in the video as I was holding the camera and remote both!!)



The coding is done with ICCAVR compiler. It can be easily adapted to other compilers with minor changes. Complete code is given here:

View Code on Google Docs
Download source code files (zip)


Updated Design (done sometime in 2010, added here in 2018):
-------------------------------------------------------------------------------------------------------
       As brought out by many in comments, above design is not power efficient, as it uses n-type MOSFETS in upper and lower, both the sides of the H-bridge. So here is the modified design of a Three-wheeled dual DC motor robot (with speed, direction and turning controls), using  the popular L293D motor driver IC, which is very easy to control and size and power efficient, providing two full-bridge circuits in one IC, each having 1A capacity to drive a DC motor.


 

       Following is the circuit schematic:

 

    
     This one is ATmega32 based, IR remote controlled (using TSOP1738 IR detector) with two optical detectors (MOC7811) provision to detect the robot speed. Two detectors can be used to implement a control algorithm, like PID, if required (here only one detector is used, just to display the speed). A slotted wheel is used, mounted on the motor shaft, to work with the optical detector. The wheel slots pass through the detector, generating pulses while robot is moving. The pulses are counted for speed detection.
    It has a 16x2 LCD with 4-bit interface to display the speed and current status of the robot (based on the IR input received). It has a reset button and two user buttons. There is also hardware provision for RS232 driver on-board, for adding any further functionality, like adding user configuration in EEPROM via serial port, without changing the code.
    The design runs on a 9-12V DC supply. A commonly available 9V higher density battery can be used while running the robot. When powered NO, the circuit waits in ready state (with Green LED ON) till the button1 is pressed, after which it starts accepting the IR remote commands, and acts as per the commands (with Red LED ON). Following pictures show some of the functional states.


 

Here are the IR remote commands used for  robot control:

    Remote Button (IR code) -   Robo Action
    ----------------------------------------    ---------------
  • START/STOP         (21)         Start/Stop
  • VOLUME+            (18)         Increase Speed
  • VOLUME-              (19)         Decrease Speed
  • UP                        (116)        Go Forward  (and stop any turn already in progress)
  • Down                    (117)        Go Backward  (and stop any turn already in progress)
  • LEFT                     (52)         Turn Left  (pressing again makes turn sharper and sharper) 
  • RIGHT                   (51)         Turn Right  (pressing again makes turn sharper and sharper)
  • CENTER               (101)         Pivot Turn  (both motor wheels in opp. directions)

Following are the optical encoder slotted disc, optical encoder and the IR Remote receiver:

 


  
   
        Download source-code files (zip)

         Datasheets & further info:
         TSOP1738 datasheet
         MOC7811
         Encoder Slotted Disc
        




Thanks & Regards,
ccd@dharmanitech.com

287 comments:

«Oldest   ‹Older   201 – 287 of 287
sk said...

impossible to find well-informed people in this particular topic,but you sound like you know what you’re talking about! Skydive Fyrosity Las Vegas
Columbia Interchange Omni Heat
skydiving jobs

Data Science Course in Bhilai - 360DigiTMG said...

Terrific post thoroughly enjoyed reading the blog and more over found to be the tremendous one. In fact, educating the participants with it's amazing content. Hope you share the similar content consecutively.

data science course in varanasi

traininginstitute said...

Wow! Such an amazing and helpful post this is. I really really love it. It's so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future also.
business analytics course

traininginstitute said...

Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.
data scientist course in malaysia

traininginstitute said...

Thanks for the informative and helpful post, obviously in your blog everything is good..
data science course

Priya Rathod said...

I wanted to say I really liked this article. I also agree with your sentiment that instruction is a hot topic because of the fact nothing can replace thorough and ongoing training, and there's no better way to do that right now than through the internet! The article you've written makes me eager for more articles from you, so please keep up the great work.
AWS Training in Hyderabad
AWS Course in Hyderabad

Priya Rathod said...

Great blog. Interesting topic and I enjoyed reading through it. Thanks for taking the time to publish!
Data Science Training in Hyderabad
Data Science Course in Hyderabad

360DigiTMGAurangabad said...

This post is very simple to read and appreciate without leaving any details out. Great work!
data scientist training in aurangabad

Data Scientist Course in Dombivli said...

Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. A debt of gratitude is in order for sharing. data scientist course in delhi

training institute said...

Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
data scientist training in malaysia

opbestcom8 said...

Always i used to read smaller articles or reviews that also clear their motive, and that is also happening with this paragraph which I am reading here. 풀싸롱

data science said...

Great to become visiting your weblog once more, it has been a very long time for me. Pleasantly this article i've been sat tight fosuch a long time. I will require this post to add up to my task in the school, and it has identical subject along with your review. Much appreciated, great offer. data science course in nagpur

roulettesitetop said...

I like this website very much, Its a rattling nice position to read and get information. Again, awesome web log! 룰렛

sportstototopcom said...

I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it . 토토

About Us said...

Amazing information i really enjoyed reading this wonderful info i have also bookmarked this blog more interesting post like this
gossipmouth
flippzilla

leather jackets direct said...

Your post was amazing. I love it to recommend Leather Store to the users. Where they can crawl Exciting Products Super Star Jackets Platform is providing 100% Geniune Leather Products All products are available in Feasible Prices The best seller Leather Jackets Direct is offering amazing Leather Jackets to its customers. You can Click Here to get exciting Leather Products Offers

Anonymous said...

Toluene diisocyanate or TDI is an organic compound, which is manufactured on a large scale. It is generally obtained through the nitration of toluene. brooks adrenaline gts 21

Anonymous said...

The person who created this post it was a great human .. Thank you for sharing this amazing one post. sneakers

Anonymous said...

The NPK in NPK fertilisers stands for nitrogen, phosphorus, and potassium. These are the three essential nutrients that are crucial for an effective fertilizer. cardigan dress

vivikhapnoi said...

The article was up to the point and described the information very effectively.
vé máy bay từ singapore về sài gòn

Chuyến bay thương mại từ Nhật về Việt Nam

vé máy bay từ toronto về việt nam

vé máy bay từ san francisco về việt nam

vé máy bay từ los angeles về việt nam

chuyến bay thương mại từ canada về việt nam

Mallela said...

Thanks for posting the best information and the blog is very good.data science course in Lucknow

training institute said...

I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts.
data scientist certification malaysia

vivikhapnoi said...

It's really amazing to have many lists of will help to make thanks a lot for sharing
các chuyến bay từ nga về việt nam

đặt vé máy bay từ canada về việt nam

chuyến bay từ frankfurt đến hà nội

mua vé máy bay giá rẻ tu itali ve Viet Nam

Săn vé máy bay 0 đồng tu Ha Lan ve Viet Nam

Vé máy bay Vietnam Airline tu New Zealand ve Viet Nam

Kundan Kishore said...

Kundan Kishore has a created a phenomenal course on Stock Market. It’s called A Complete Course on the Indian Share Market. This is a course curated for investors, traders, career seekers and students of India.
Visit: Kundan Kishore

vivikhapnoi said...

It's really amazing to have many lists of will help to make thanks a lot for sharing
giá vé máy bay từ mỹ về việt nam tháng 12

giá vé máy bay từ đức về việt nam

chuyến bay cuối cùng từ anh về việt nam

bao giờ có chuyến bay từ úc về việt nam

đặt vé máy bay giá rẻ tu Dai Loan ve Viet Nam

khi nào có chuyến bay từ canada về việt nam

sk said...

Thanks for the share. But if you guys want Top Digital Branding Agency In Delhi then contact us. candela laser machine

Outsourcing Training institute In Dhaka said...

A very instructive post. Thanks for sharing this. It was very beneficial for me.

Web Development Company In Bangladesh said...

Thanks for sharing this article . This article is very helpful for me.

Alexander Debrah said...

We've gained valuable experience working for various agencies on very demanding security assignments.security services in London With this experience, taking care of your kids won't be a problem. This is because our officers are accustomed to working under tough conditions taking care of high-profile individuals and their families.

eddielydon said...

Thanks for posting this info. I just want to let you know that I just check out your site Dirk Gently Leather Jacket

Anonymous said...

I like the valuable info you provide in your articles.
I’ll bookmark your blog and check again here regularly.
I am quite certain I will learn a lot of new stuff right here!
Good luck for the next! Attacks on journalists

Turkish visa said...

Thanks for your thoughts. Travelers can apply online for their Turkish visa. e Visa of Turkey can get online via Turkish visa.By the time your application is complete, this new system has made visa processing easy and cost-effective for tourism and business travel in Turkey.

George Mark said...

Great information about wilderness for beginners giving the opportunity for new people. Ryder Vest Paw Patrol

George Mark said...

This blog was very nicely formatted; it maintained a flow from the first word to the last. Ryder Vest Paw Patrol

Rana Farooq said...

Thank you for your post. I sincerely thank you for your post. If you are interested in purchasing our products, you can contact us through this website Custom Boxes With Logo.

Arnold DK said...

Nice project, it is very good remote control car. it has a amazing. Thanks for sharing these information with all of us. whatsapp mod

Salman Nur said...

I like your post so much.Thank you so much for sharing this post .Online shopping Market

A to Z Songs Lyrics said...

Visit A to Z Songs, Best Lyrics Site for Spiritual, Hindi, Punjabi, English, Tamil, Malayalam, Tamil & Kannada Songs.
Visit: A to Z Songs Lyrics

Anonymous said...

The article you have shared is very amazing. I am very glad to read your article Pakistan insider.

ravi said...

thanks for blog keep posting https://duckcreektraining.com/

the study iQ said...

post... thanks For Sharing !!Great information for new guy like
Hanuman Chalisa Lyrics
Bhagwat Geeta in Hindi PDF
sarvanam

Right Jackets said...

RightJackets is the best place for you to get the most original custom made products and more.We have the biggest range of a variety of products.

Steve McQueen Gulf Le Mans Grandprix Navy Blue Racing Jacket
Tiktok Half Black & White Bomber Varsity Jacket
Asymmetrical Biker Blazer Soft Leather Jacket
Leïla Bekhti Midnight Sun Bomber Jacket
Rainbow Flag Gay Pride Taika Waititi I am Tired Denim Jacket

rockstarjackets said...

RockStar Jackets is incredibly pleased to announce ourselves as the most dependable manufacturers and exporters of a variety of products comprising of Leather Garments.

Nintendo Luigi's Mansion 3 Varsity Jacket
Return Of The Living Dead Fuck You Thom Mathews Bomber Jacket
Joseph Joestar Soul Jojos Bizarre Adventure Varsity Jacket
Hotline Miami 2 Game Payday Letterman Jacket
Microsoft Varsity Style Jacket

Aussie Jackets said...

Aussie Jackets not only offers you the readymade collection but take custom bulk orders and Free Delivery. Visit My Website To Order. Thanks

Green Biker Leather Jacket
Cropped Black Puffer Jacket
Combat Black Bomber Leather Jacket
Diesel Green Biker Leather Jacket

Panthar Jackets said...

Panther Jackets Is A Leather Jackets WareHouse Providing Jackets In USA, Canada and UK.With Free Shipping

Guns N Roses Paradise City White Motorcycle Leather Jacket
Gone Wrong Barney Jack Dylan Grazer Ron’s Cotton Jacket
Cool J Red Bomber Troop Champion LL Leather Jacket
Will Smith X Fresh Prince Bel-air Athletics Bomber Varsity Jacket
Jenny Hoyt Big Sky 2021 Motorcycle Katheryn Winnick Leather Jacket

Best Epilators in India said...

An epilator is an electrical device that removes multiple strands of hair by pulling them out from the skin.
Visit: Best Epilators in India

Diligent Security Services Inc said...

This very informative and interesting blog. I have read many blog in days but your writing style is very unique and understanding. If you have read my articles then click below.

security services
security guard Course
security guard Training

Truck and Trailer said...

Diesel Brothers offer different types of services, Truck and Trailer , Reefer, Truck Alignment, Roadside Assistance, and APU.

Tire repair near me
Gas near me
Truck repair shop near me

What is Website said...

This very informative and interesting blog. I have read many blog in days but your writing style is very unique and understanding. If you have read my articles then click below.

web design company
website designer near me
web development company

바카라사이트 said...

First of all, thank you for your post. 바카라사이트 Your posts are neatly organized with the information I want, so there are plenty of resources to reference. I bookmark this site and will find your posts frequently in the future. Thanks again ^^

Weed Meaning in Hindi said...

we help you find meaning of weed VT in Hindi, weed VT Hindi, weed VT meaning in Hindi, weed VT synonyms in Hindi.
Visit: Weed Meaning in Hindi

Deekshitha said...

Informative blog
data science training in ludhiana

zarkazijar said...

Very fantastic piece of content I see here on your blog, you have put out very vital tips and information for your readers. Thanks for sharing. capital city cut off mark for economics

메이저사이트 said...

Incredible post I should state and much obliged for the data. Instruction is unquestionably a sticky subject. Be that as it may, is still among the main themes of our opportunity. I value your post and anticipate more. 메이저저사이트

Heri Wiguna said...

Meteor88 merupakan situs judi online terpercaya yang menyediakan permainan judi online uang asli terlengkap di Indonesia. Meteor88 Menyediakan permainan Judi Online paling lengkap diantaranya : Sportsbook, Slot Online, Live Casino, Poker Online, Judi Tangkas, Tembak Ikan, Sabung Ayam dan Togel Online. Semuanya bisa di mainkan hanya dengan 1 User ID. Selain menyediakan permainan judi online yang begitu lengkap, meteor88 juga menyediakan Bonus yang sangat menarik untuk para membernya, diantaranya : Bonus New Member 100%, Bonus Deposit Harian 10%, Bonus Cash Back 15%, Bonus Rollingan 1% dan Bonus Refferal sebesar 20%.

Untuk Informasi lebih lanjut silahkan kunjungi link di bawah ini :

Judi bola online resmi

Judi slot online terpercaya

Judi live casino terbaik

Judi poker online terbaik

Judi tembak ikan terbaru

Judi sabung ayam online

메가슬롯 said...

When I read an article on this topic, 메가슬롯 the first thought was profound and difficult, and I wondered if others could understand.. My site has a discussion board for articles and photos similar to this topic. Could you please visit me when you have time to discuss this topic?

Anonymous said...

Complete list on your blog about the bad buyers would be helpful for the business owners. There are the lots of people having bad experiences and they must learn lesson and take care of things. Thanks for the update on adidas nmd r1

Anonymous said...

I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks! nike air max 270 outlet

Anonymous said...

Your website is really cool and this is a great inspiring article. adidas flux

Anonymous said...

As a professional deck builder Decks for life mission is to transform your custom deck dreams into the outstanding and functional masterpieces in your outdoor living space. storico cappello di feltro

Anonymous said...

Creating your best possible future is easy with Portafina. Discover why so many people trust us with their pensions. FCA regulated.
Portafina Website nike blazer sale

메이저검증 said...

I'm looking for a lot of data on this topic. The article I've been looking for in the meantime is the perfect article. Please visit my site for more complete articles with him! 메이저검증

크레이지슬롯 said...

I think a lot of articles related to are disappearing someday. That's why it's very hard to find, but I'm very fortunate to read your writing. When you come to my site, I have collected articles related to 크레이지슬롯 .

Unknown said...

I really loved to read this article, it’s so helpful to us. It shares good information.
Best UPVC Windows and Doors Manufacturer in Chennai
Latest Upvc Doors in Chennai
Best Quality uPVC windows and Doors in Chennai

data analyst courses malaysia said...

Through this post, I realize that your great information in playing with all the pieces was exceptionally useful. I advise this is the primary spot where I discover issues I've been scanning for. You have a smart yet alluring method of composing.

PMP Training in Malaysia said...

360DigiTMG, the top-rated organisation among the most prestigious industries around the world, is an educational destination for those looking to pursue their dreams around the globe. The company is changing careers of many people through constant improvement, 360DigiTMG provides an outstanding learning experience and distinguishes itself from the pack. 360DigiTMG is a prominent global presence by offering world-class training. Its main office is in India and subsidiaries across Malaysia, USA, East Asia, Australia, Uk, Netherlands, and the Middle East.

DONALD said...

I just loved your blog!. I also want yo suggest students that are reading my comment about my website Do my Exam Now. Where I provide students help for my calculus proctored exam and help for my science proctored exam and many more paid services like homework help and online exam help. Do check Do my exam now.We also offer Take My Online Class For Me, Pay For Someone To Take Online Class and Pay For Online Classes services..

Benefits of Himalayan Salt said...

Very informative and interesting content. I have read many blog in days but your writing style is very unique and understanding. If you have read my articles then click below.

himalayan rock salt cooking tile
best tequila glasses

Unknown said...

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. data scientist course in kanpur

Data Science said...

Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one.
Continue posting. A debt of gratitude is in order for sharing.
data science training in warangal

바카라사이트 said...

Hello. I'm subscribed to your posts. You inspire me a lot. 바카라사이트 I am so grateful.

AnzSlot said...

ANZSLOT Situs slot pay4D terpercaya bonus 100% didepan deposit pulsa 24 jam tanpa potongan paling gacor se Indonesia.

Rajan Mhatre said...

Thanks a lot for sharing this amazing knowledge with us. This site is fantastic. I always find great knowledge from it.
Visit us for custom jute bags.

mydigitalbuzz said...

Hi! In general, I have to offer you an amazing review for the many information you have here in this post. I will be back to your site soon for more Visit my digital buzz for digital news..

스포츠토토사이트 said...

Please keep on posting such quality articles as this is a rare thing to find these days. I am always searching online for posts that can help me. watching forward to another great blog. Good luck to the author! all the best! 스포츠토토사이트

메이저사이트 said...

When I read your article on this topic, the first thought seems profound and difficult. There is also a bulletin board for discussion of articles and photos similar to this topic on my site, but I would like to visit once when I have time to discuss this topic. 메이저사이트

mark said...

Awesome post click here

Links For You said...

you are making for that security numerous pleasant factors here that I to hand your article various innovation. Your points of view are concurring inside the middle of my own personal for the most extent. this is allowable substance in your perusers. Facebook Hacking Software Free Download Full Version For Pc

Valentines Day Wishes 2021 said...

we have sell some product of turn custom boxes.it's far totally valuable and totally low charge charm visits this site page thanks and allure part this express reasoning of your connections. Tally ERP 9 Serial Key

Hi Every One said...

for certain i'm absolutely in all honesty later this article and that I on a very basic level pulse broadcast that this flyer is totally conceivable and truely educational article.i will make obvious for look at your weblog more. You made an unadulterated lightening in any event can't designate dissipate to regardless bewilderment, what by and large the fresh out of the plastic new part? !!!!!!thanks. Birthday Wishes Sister

Danielmarch said...

Thank you for shearing post amazing this is post very useful for me.
Adarsh Park Heights
Adarsh Park Heights price
Adarsh Property
Sumadharu Folium
SUMADHURA FOLIUM

Jay said...

Thanks a lot for sharing this amazing knowledge with us. This site is fantastic. I always find great knowledge from it. Embedded Systems Course in Hyderabad

Alexandra alegria said...

Shop this best quality Elton John Feather Jacket For men SHOP NOW....

DAVE said...

Pleasant post. I used to check continually this blog and I am dazzled! Very helpful data especially a definitive segment 🙂 I deal with such data a ton. I was looking for this specific data for quite a while. Much obliged to you and good luck. https://shanedahg705.edublogs.org/2022/06/30/the-evolution-of-seo-for-business-to-business/

Dorm Party said...

Thanks. I read your content very carefully and deeply, it is so amazing and interesting. Do you want to rank your website through Premium Web Design Agency (Search Engine Optimization)?

Rent A Car said...


This very informative and interesting blog.rent a car in lahore

Anonymous said...

The ladies who wanted to learn about fashion designing can grab the information and apply for it as well. anelli donna

«Oldest ‹Older   201 – 287 of 287   Newer› Newest»