Author Topic: programming $50 robot with sharp ir  (Read 4446 times)

0 Members and 1 Guest are viewing this topic.

Offline nckspecTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
programming $50 robot with sharp ir
« on: March 24, 2008, 12:24:01 PM »
can it be done for a basic stamp

Offline bulkhead

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 0
Re: programming $50 robot with sharp ir
« Reply #1 on: March 25, 2008, 02:45:40 AM »
What do you mean?  The $50 robot can be built using a bs2 but it will probably cost more than $50, and you would have to write your own code in pbasic instead of C, so I guess it no longer counts as "the $50 robot".  The sharp IR can be used with the bs2 (basic stamp).

Offline shimniok

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
    • Bot Thoughts
Re: programming $50 robot with sharp ir
« Reply #2 on: March 25, 2008, 07:28:11 AM »
I've been wondering how much one can do for $50.  The question is, can you build an *interesting* robot for that kind of money?  I have a $10 HEXBUG that is cool and a marvel in its own right but it doesn't do much. :)

Anyway, if you can find a Basic Stamp on ebay for $25 or so then maybe.  But the BS2 won't read voltages, so you need to convert to frequency or use external ADC ($2-10?).  Or get an I2C sharp ranger for $11 or so (similar cost for normal rangers).

Probably the cheap way to go with MCUs is to get an AVR and build the board yourself.  I saw an article on building a simple Arduino board here: http://tinkerlog.com/2008/01/07/arduino-on-a-prototype-board/  (components run 4.50euro which would be what, about $10 US?)  The AVR programming tools are free/open source.

If the budget is a little higher, you could look at Pololu's Baby Orangutan + programmer combos ($40-50, includes motor controller), or real Arduino (stamp $40 or usb $35) e.g., from Sparkfun...

Michael
Michael Shimniok
http://bot-thoughts.com/

Offline nckspecTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: programming $50 robot with sharp ir
« Reply #3 on: March 25, 2008, 08:39:12 PM »
i was thinking about what you said about bs2 not being able to read voltages. What if you used something that said when the voltage is not 0 ( if portx=0 then go straight else go turn) then it wouldn't matter about exact voltages right.

Offline nckspecTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: programming $50 robot with sharp ir
« Reply #4 on: March 25, 2008, 08:50:05 PM »
also can bs2 output more than 5v?

Offline bulkhead

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 0
Re: programming $50 robot with sharp ir
« Reply #5 on: March 26, 2008, 01:40:23 AM »
Most microcontroller's signal output is only 5V, however this shouldn't be used to drive large loads (like motors).  The microcontroller only sends the signal that tells a motor to drive (or not).  It is important to realize that the most any microcontroller can do is turn on a few LED's at a time; anything more would damage it. 

shimniok is right, going the route of a BS2 would be more expensive probably.  I think the BS2 can "read voltages" using an RC type circuit and measuring the charge/discharge time of the capacitor.  However, this method of analog-digital converting (ADC, converting an analog voltage signal to a digital data (bytes you can manipulate in your program)) is slow.  Going with an external ADC chip for a few bucks would probably be easier.  Look up the ADC0834 or ADC0831 on digikey to see for yourself.

If you're interested in learning more about the BS2, check out the Parallax forums here http://forums.parallax.com/forums/

Offline benji

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: programming $50 robot with sharp ir
« Reply #6 on: March 27, 2008, 08:27:43 AM »
in case you want your mcu to control higher voltage stuff do the following

mcu pin >> transistor or buffer ic >> relay(24 v) >> contactor(up to 300v)
good ol' BeNNy

 

SMF spam blocked by CleanTalk