Jump to content


Photo
- - - - -

Devices and hardware


  • Please log in to reply
10 replies to this topic

#1 Shadowdog1998

Shadowdog1998

    elite

  • Members
  • 118 posts
  • Country:
  • Gender:Male
  • Location:Texas

Posted 24 April 2008 - 05:20 PM

If you havnt ever heard about it, vex is kinda cool to check out. http://www.vexrobotics.com/ Anyway i do the programming for a school robotics team of mine. These bots have a brain(cpu) that receives its own special programing, its a piece of cake drag and drop a few things and you have 4 motors running, a servo (think of a windshield wiper motor, only goes so far 180 degrees and back) and what ever. What im wondering is how do you program for other hardware. Stuff that is not already set up for idiots. Say I have a controller and I want the computer to receive input from it, or if i have a motor that I want to run at a certain speed for a certain amount of time. I am imagining all the electrical engineering here ^_^ thats not what is getting me, its that I have no clue how you would even go about setting up programs for something like this or if thats even what you would do.

Example: A fan that you want to run at a certain speed, so to get it to this speed you need to control the amount of electricity going to it.

If you can point me in the right direction I will be quite thankful.

Edited by Shadowdog1998, 24 April 2008 - 05:22 PM.


#2 Cortex M3

Cortex M3

    Will I break 10 posts?

  • Members
  • 2 posts

Posted 24 April 2008 - 05:33 PM

You can control the fan speed using PWM (Pulse Width Modulation)
By switching voltage to the load with the appropriate duty cycle; the output will approximate a voltage at the desired level. Use an inductor and a capacitor to remove noise!

Or you can use a DAC (Digital to Analog Covertor) to output the correct voltage! but i think you better use the PWM method!

Regards

#3 Ohm

Ohm

    I could have written a book with all of these posts

  • Members
  • 3,209 posts
  • Gender:Male
  • Location:Maine, USA

Posted 24 April 2008 - 05:48 PM

  • Learn some basic electronics. Don't be afraid, it's not hard. A good place to start reading is here. You don't need to master this stuff, but you do need a good understanding.
  • Learn how to solder. Assuming you actually want to build projects, you'll need to know how to solder. Again, this isn't hard so don't be afraid! You can get everything you need for soldering for under $20 at radio shack.
  • Build an AVR programmer. You need a "brain" and that would be a microcontroller. The AVR microcontrollers are nice, and you can program them almost directly from a serial port on your computer so the hardware needed to program the chips is very easy to build. This is a nice one. Order this kit (which is really most useful for the PCB) and get started.
  • Buy some AVR chips. These range in size from 8-pin tiny guys with just a few pins for controlling things to huge 40-pin behemoths. They can be programmed in C, assembly or BASIC and are generally more versatile than other microcnotrollers. They're pretty cheap too.

You can get started for under $50 and be programming AVR chips in no time. Once you get the basics down, you're limited by only your imagination.

#4 Shadowdog1998

Shadowdog1998

    elite

  • Members
  • 118 posts
  • Country:
  • Gender:Male
  • Location:Texas

Posted 24 April 2008 - 07:14 PM

You can control the fan speed using PWM (Pulse Width Modulation)
By switching voltage to the load with the appropriate duty cycle; the output will approximate a voltage at the desired level. Use an inductor and a capacitor to remove noise!

Or you can use a DAC (Digital to Analog Covertor) to output the correct voltage! but i think you better use the PWM method!

Regards

i was actualy asking more in general and that was just an example but thanks for that info

#5 Shadowdog1998

Shadowdog1998

    elite

  • Members
  • 118 posts
  • Country:
  • Gender:Male
  • Location:Texas

Posted 24 April 2008 - 07:16 PM

  • Learn some basic electronics. Don't be afraid, it's not hard. A good place to start reading is here. You don't need to master this stuff, but you do need a good understanding.
  • Learn how to solder. Assuming you actually want to build projects, you'll need to know how to solder. Again, this isn't hard so don't be afraid! You can get everything you need for soldering for under $20 at radio shack.
  • Build an AVR programmer. You need a "brain" and that would be a microcontroller. The AVR microcontrollers are nice, and you can program them almost directly from a serial port on your computer so the hardware needed to program the chips is very easy to build. This is a nice one. Order this kit (which is really most useful for the PCB) and get started.
  • Buy some AVR chips. These range in size from 8-pin tiny guys with just a few pins for controlling things to huge 40-pin behemoths. They can be programmed in C, assembly or BASIC and are generally more versatile than other microcnotrollers. They're pretty cheap too.

You can get started for under $50 and be programming AVR chips in no time. Once you get the basics down, you're limited by only your imagination.

thanks, yeh i know a decent bit about electronics and when i need help with that i know the guys to go to
those electronics online books are great
and thanks for pointing me in the right direction now that i know what im looking for "microcontrollers" i might actualy get some where xd

Edited by Shadowdog1998, 24 April 2008 - 07:48 PM.


#6 Ohm

Ohm

    I could have written a book with all of these posts

  • Members
  • 3,209 posts
  • Gender:Male
  • Location:Maine, USA

Posted 24 April 2008 - 07:49 PM



Follow this video, it is good.

#7 jfalcon

jfalcon

    Hakker addict

  • Agents of the Revolution
  • 593 posts
  • Location:Living within the ether

Posted 24 April 2008 - 09:28 PM

I'm doing something the same as that now.

I ended up buying a Parallax Servo Controller and talk to my device via USB/Serial. Then I found a serial library for the language I needed, just add code and attach it to hooks. Voila! There are a few tweaks in the PSC that I don't really care for and it's a little overkill for my needs (in terms of ports.. I got 16 when I only need 2-4...) but it's working!

#8 LUCKY_FUCKIN_CHARMS

LUCKY_FUCKIN_CHARMS

    TCP/IP....PI/MP

  • Members
  • 1,493 posts
  • Gender:Male
  • Location:Las Vegas

Posted 24 April 2008 - 10:29 PM

lego mindstorm sets.

#9 Ohm

Ohm

    I could have written a book with all of these posts

  • Members
  • 3,209 posts
  • Gender:Male
  • Location:Maine, USA

Posted 24 April 2008 - 10:47 PM

The chips are so cheap, there's no harm is getting a larger chip than you need.

As for controlling servos, it's trivial. That thing can control 16 servos but for $40 it's a bit much. You probably could have built the same thing for $5. Controlling a servo is nothing but a variable width pulse you can generate easily with timer/counters.

#10 Pharoh

Pharoh

    SUP3R 31337

  • Members
  • 154 posts
  • Location:MI, USA

Posted 24 April 2008 - 11:23 PM

lego mindstorm sets.

My school uses these, and they do indeed make building robots quite easy. There are also a variety of programming languages available to use with them instead of the drag and drop programming tool included in the set. I, personally use NQC (Not Quite C), however, C++ and Java are also available to use along with a few others I believe. There are also some very good competitions in my area that schools from many states from across the country come to. (Robofest.net)

Also, I have been trying to get into microcontroller programming lately with something such as a PIC but I must wait for a while as robofest is this weekend and I need to finish programming.

#11 Shadowdog1998

Shadowdog1998

    elite

  • Members
  • 118 posts
  • Country:
  • Gender:Male
  • Location:Texas

Posted 25 April 2008 - 03:10 PM

lego mindstorm sets.

My school uses these, and they do indeed make building robots quite easy. There are also a variety of programming languages available to use with them instead of the drag and drop programming tool included in the set. I, personally use NQC (Not Quite C), however, C++ and Java are also available to use along with a few others I believe. There are also some very good competitions in my area that schools from many states from across the country come to. (Robofest.net)

Also, I have been trying to get into microcontroller programming lately with something such as a PIC but I must wait for a while as robofest is this weekend and I need to finish programming.

trust me check out the vex robot kits, you actualy have the option to drive them via controllers plus building them you have a lot more options
where im at in indiana we have an area robotics competition sponsored by General Electric. Some of there engineers build us a game every year, and then 14 or so schools compete. Students have to build the bot and program it. Each round is 2 minutes long and for the first 30 seconds your bot has to drive on its own in autonomic mode, then 1:30 it can be drove by up to 2 drivers.
http://www.youthbotin.org/
and yeh im in the picture on the main page xd but im not going to tell you which one is me

Edited by Shadowdog1998, 25 April 2008 - 03:24 PM.





BinRev is hosted by the great people at Lunarpages!