This forum is in archive mode. You will not be able to post new content.

Author Topic: Moving car, school project!  (Read 16393 times)

0 Members and 1 Guest are viewing this topic.

Offline WirelessDesert

  • Knight
  • **
  • Posts: 356
  • Cookies: 10
  • I think...
    • View Profile
Moving car, school project!
« on: February 10, 2013, 02:16:16 PM »
Hello EZ!


In my school, we will have a project where we should make a moving car.
The project instructions are like this; rough translation from swedish.
Code: [Select]
What to do.You shall make a draft and then build a small electric car.
MaterialDC-engines, flowersticks, cabbles, 4,5 V batteries, cardboard, wheels, metal wire, and other things your teacher decides.

 
What you will do.
1. How will you make the car to move, explain?
2. Figure how you will transfer current from the battery to the DC-engine.
3. How will the wheels be positioned?
4. How will the chassi look?
5. Draw the draft of your car and explain how it works, show your teacher.
6. Build your car.
7. Document what you have done and how you thought.

One word. BORING!.

So, I'm thinking about spicing it up a bit by adding an arduino, IR diodes and IR sensors.


All I will do will be documented here, wish me luck, and if someone got information about IR technology, please do tell me.


::Project start::

Day. 1

So first thing I've done was to get all my equipment ready;
  • Arduino UNO
  • Jumper Cables
  • Breadboard
  • Transistors, Resistors.
  • Liquid and 7-seg displays
  • 9 V battery
  • Computer, duh.
  • Two remotes = 3 IR diodes.
This is not all I need, I think I will buy some real good IR diodes and other things needed.


So my first thing is to research about IR diodes.
Links:
    http://arduino.cc/forum/index.php/topic,12218.0.html
    http://en.wikipedia.org/wiki/Infrared
    http://learn.adafruit.com/ir-sensor
    ::EDIT::

    http://www.youtube.com/watch?v=vjnOvdJrHMo  Link's to this.
    http://arduinoarts.com/2011/08/tutorial-arduino-controlled-by-apple-remote/

    http://www.youtube.com/watch?v=eCEg3PgDitI



This should satisfy for now. I'll come back when I've finished reading :)



Day. 3


So today, I've thought about how to make the car go left/right and backwards, I'm thinking of making the analog input to the DC-engine lower on the side to turn to for going left/right.
To go backwards, I think reversing the polarity would make the engines go backward, however, I have no idea o how to do that.
Anyway, I will talk with a friend that has worked/is working with IR today, I think he can provide some tips to me.
« Last Edit: February 12, 2013, 10:24:10 AM by WirelessDesert »
Check out my arduino project: Moving car - School project!
"I'm like current, I always take the easiest route."

Offline WirelessDesert

  • Knight
  • **
  • Posts: 356
  • Cookies: 10
  • I think...
    • View Profile
Re: Moving car, school project!
« Reply #1 on: February 10, 2013, 02:17:15 PM »
This place is reserved, sorry if it counts as a double post, I'm so sorry if it does.
Check out my arduino project: Moving car - School project!
"I'm like current, I always take the easiest route."

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Moving car, school project!
« Reply #2 on: February 10, 2013, 03:37:35 PM »
Doesn't count as double post if you post to update the thread.

On topic: I like this. I would like to see more about it. Maybe eventually make a PDF with instructions? write Evilzone all over it :D

Offline jonneburger

  • Peasant
  • *
  • Posts: 89
  • Cookies: -14
  • M'hacker
    • View Profile
Re: Moving car, school project!
« Reply #3 on: February 10, 2013, 03:57:58 PM »
i'd never cant make this. i would freak out in seconds. +1

Offline WirelessDesert

  • Knight
  • **
  • Posts: 356
  • Cookies: 10
  • I think...
    • View Profile
Re: Moving car, school project!
« Reply #4 on: February 12, 2013, 10:28:37 AM »
Day. 3


So today, I've thought about how to make the car go left/right and backwards, I'm thinking of making the analog input to the DC-engine lower on the side to turn to for going left/right.
To go backwards, I think reversing the polarity would make the engines go backward, however, I have no idea o how to do that.
Anyway, I will talk with a friend that has worked/is working with IR today, I think he can provide some tips to me.

I will update the first post whenever I write about a new day.


::UPDATE::


Searched the internets and found this
    http://arduinotronics.blogspot.it/2012/11/arduino-ir-receiver-part-2.html
    http://playground.arduino.cc/Code/InfraredReceivers
The first link will be extremely useful, as it is almost what I want to do.
One thing that I've found, is that the usual place where I buy my components from does not have any LED IR or IR receivers. Which is sad, I've got one other place to get it from, but that could take days before I get it. (Even though I have like 6 weeks on me.)


I will make the draft today, I'll try to upload it to EZ when I'm done.
« Last Edit: February 12, 2013, 10:59:42 AM by WirelessDesert »
Check out my arduino project: Moving car - School project!
"I'm like current, I always take the easiest route."

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Moving car, school project!
« Reply #5 on: February 12, 2013, 10:55:22 AM »
While you're at it, make it controllable from a computer. Attach a router to it so it can be controlled from where ever there is internet! haha!
I'm just brainstorming... great work you are doing. I always wanted to make my own RC car too.

Offline WirelessDesert

  • Knight
  • **
  • Posts: 356
  • Cookies: 10
  • I think...
    • View Profile
Re: Moving car, school project!
« Reply #6 on: February 12, 2013, 01:19:29 PM »
Found a way to reverse polarity without touching the wires,
    http://en.wikipedia.org/wiki/H_bridge
    http://arduino.cc/forum/index.php?topic=122987.0


    (Edit again: http://www.hvlabs.com/hbridge.html)


Now, I don't want to spend to much money on this, so I will see if I will buy one or not.

::EDIT::


Found even more :D , internet is great!
    http://itp.nyu.edu/physcomp/Labs/DCMotorControl
    http://arduino.cc/blog/2012/10/31/drive-a-dc-motor-with-arduino-due/


That Arduino Due seems interesting, I may end up buying one.
My teacher said that the DC motors would be 3V
So using the Due would be great, as it only has 3.3V I/O pins. (http://arduino.cc/en/Main/ArduinoBoardDue)

« Last Edit: February 14, 2013, 10:07:18 AM by WirelessDesert »
Check out my arduino project: Moving car - School project!
"I'm like current, I always take the easiest route."

Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
Re: Moving car, school project!
« Reply #7 on: February 12, 2013, 07:03:07 PM »
You don't need a Due, your Uno will work just fine. You will either need a voltage shifter
https://www.sparkfun.com/products/8745

Or use diodes to drop the voltage.

For speed control, use PWM. Also a note on the motors, if they spin freely like down a hill or something they will generate voltage and current that could hurt your comoponents including your arduino. So you need some kind of protection or isolation. Also be sure to put some capacitors on the motor as well to help with noise.

As for the IR receivers, your a hacker right? Go salvage them from old electronics that have been thrown away or don't work anymore.

If you wanna make the thing really cool, forget the IR stuff and use DTMF.
http://www.electronics-diy.com/dtmf-decoder-using-mt8870.php
That way you can plug in a cell phone, call the cellphone from anywhere in the world, and control the car by pushing buttons.

Oh, and here is a site I frequent that might help with ideas and what-not
http://letsmakerobots.com/
« Last Edit: February 12, 2013, 07:04:00 PM by techb »
>>>import this
-----------------------------

Offline WirelessDesert

  • Knight
  • **
  • Posts: 356
  • Cookies: 10
  • I think...
    • View Profile
Re: Moving car, school project!
« Reply #8 on: February 12, 2013, 08:31:35 PM »
You don't need a Due, your Uno will work just fine. You will either need a voltage shifter
https://www.sparkfun.com/products/8745

Or use diodes to drop the voltage.

For speed control, use PWM. Also a note on the motors, if they spin freely like down a hill or something they will generate voltage and current that could hurt your comoponents including your arduino. So you need some kind of protection or isolation. Also be sure to put some capacitors on the motor as well to help with noise.

As for the IR receivers, your a hacker right? Go salvage them from old electronics that have been thrown away or don't work anymore.

If you wanna make the thing really cool, forget the IR stuff and use DTMF.
http://www.electronics-diy.com/dtmf-decoder-using-mt8870.php
That way you can plug in a cell phone, call the cellphone from anywhere in the world, and control the car by pushing buttons.

Oh, and here is a site I frequent that might help with ideas and what-not
http://letsmakerobots.com/

Thank you techb, I did say that I had some remotes at home that I can use, I will take them apart when need to. However, I tried to find a ir receiver, but I didn't find one.

For the due, I would also like to have it because it seems awesome.

And wow, dtmf seems awesome!

« Last Edit: February 12, 2013, 08:35:48 PM by WirelessDesert »
Check out my arduino project: Moving car - School project!
"I'm like current, I always take the easiest route."

Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
Re: Moving car, school project!
« Reply #9 on: February 12, 2013, 09:14:31 PM »
Arduino's are cool and all, and great for beginners, but you really should learn to code the AVR itself and learn not to rely on pre-built dev boards.

Just my $0.02, and I am willing to help with your project if you need any questions answered.
>>>import this
-----------------------------

Offline WirelessDesert

  • Knight
  • **
  • Posts: 356
  • Cookies: 10
  • I think...
    • View Profile
Re: Moving car, school project!
« Reply #10 on: February 13, 2013, 12:35:28 PM »
So, I'm thinking about how I will put this all together.


I will probably use DTMF, as it would be so awesome. Else, IR.
I want to use H Bridges to make the car go backwards.
The car will have lamps made out of LED's.
Turning left/right will be done by changing the output to the DC-engines.
Speed will be controlled with Pulse-width modulation.
I think the engines will be 3V ones, I'm not quite sure.


Well, that concludes it.
I will start to make functions for going forward, left and right today, maybe the speed too. I'm open for suggestion, talk to me at #Evilzone or here. :)
« Last Edit: February 13, 2013, 12:40:58 PM by WirelessDesert »
Check out my arduino project: Moving car - School project!
"I'm like current, I always take the easiest route."

Offline hanorotu

  • Dj Rapture
  • VIP
  • Majesty
  • *
  • Posts: 1173
  • Cookies: 98
  • ( ͡° ʖ ͡°)
    • View Profile
    • Rapture
Re: Moving car, school project!
« Reply #11 on: February 13, 2013, 04:58:46 PM »
I will be following this, thanks for the read!


Life is hard, then you get buried.
If you want to use my work all of my music is licensed under GNU General Public License v3 (GPL-3) - http://bit.ly/TfUOBA

Offline WirelessDesert

  • Knight
  • **
  • Posts: 356
  • Cookies: 10
  • I think...
    • View Profile
Re: Moving car, school project!
« Reply #12 on: February 14, 2013, 09:19:32 AM »
Have a question, how do I do a feedback for my motors?


and why do I need them?




Found a H-Bridge I think I will use.
IR2184PBF DIP-8.


and the File for it. http://upload.evilzone.org/download.php?id=5594887&type=rar



« Last Edit: February 14, 2013, 10:22:56 AM by WirelessDesert »
Check out my arduino project: Moving car - School project!
"I'm like current, I always take the easiest route."

Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
Re: Moving car, school project!
« Reply #13 on: February 14, 2013, 11:21:37 AM »
The only way to really get feedback from a motor is to use rotary encoders. Something like servos get feedback from potentiometers but have a min and max turn degrees.

So you will need rotary encoders to get feedback.

As for the hbridge, why not just use some transistors since the voltage is so low? Could even FETs if your worried about current draw.
>>>import this
-----------------------------

Offline WirelessDesert

  • Knight
  • **
  • Posts: 356
  • Cookies: 10
  • I think...
    • View Profile
Re: Moving car, school project!
« Reply #14 on: February 14, 2013, 11:25:19 AM »
The only way to really get feedback from a motor is to use rotary encoders. Something like servos get feedback from potentiometers but have a min and max turn degrees.

So you will need rotary encoders to get feedback.

As for the hbridge, why not just use some transistors since the voltage is so low? Could even FETs if your worried about current draw.


Yeah, I was thinking about doing that to, MOSFET NPN transistors should work.
Anyway, I've done some code today, whatdaya think guys?
http://liveworkspace.org/code/1vlDG1$3
(Changed it after founding some errors and stupid coding on my side)
« Last Edit: February 17, 2013, 02:38:46 PM by WirelessDesert »
Check out my arduino project: Moving car - School project!
"I'm like current, I always take the easiest route."

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.