Author Topic: More Inputs on $50 board  (Read 5216 times)

0 Members and 1 Guest are viewing this topic.

Offline dannytemmermanTopic starter

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 0
More Inputs on $50 board
« on: March 28, 2009, 12:14:55 PM »
What code do I need to modify to have more than 6 inputs on the $50 robot. I am trying to build an autominus cleaning robot, but I have more than 6 sensors.So please someone help.


Danny

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: More Inputs on $50 board
« Reply #1 on: March 28, 2009, 12:18:31 PM »
$50 robot MCU only has 6 ADC, but you can use any other pins as a digital input (like buttons).

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: More Inputs on $50 board
« Reply #2 on: March 28, 2009, 01:11:05 PM »
eeee..... use a better processor...atmega16
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline galannthegreat

  • Supreme Robot
  • *****
  • Posts: 615
  • Helpful? 4
  • Blue-Lensed Blue LEDs?! What?! Impossible!!
Re: More Inputs on $50 board
« Reply #3 on: March 28, 2009, 01:43:30 PM »
maybe multiplex your inputs, not too sure how well it works with AVR's but I know it works nicely with PIC's
Kurt

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: More Inputs on $50 board
« Reply #4 on: March 28, 2009, 04:41:58 PM »
could you not use a seperate adc and use digital pins?
Howdy

Offline dannytemmermanTopic starter

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 0
Re: More Inputs on $50 board
« Reply #5 on: March 29, 2009, 01:10:18 AM »
could you not use a seperate adc and use digital pins?

Yes, but I don't quite know how you should do that. And which ports I need to use and which code?


Danny

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: More Inputs on $50 board
« Reply #6 on: March 29, 2009, 01:22:57 AM »
do you mean which ports are analogue? also what are your sensors?
« Last Edit: March 29, 2009, 01:28:39 AM by SmAsH »
Howdy

Offline dannytemmermanTopic starter

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 0
Re: More Inputs on $50 board
« Reply #7 on: April 02, 2009, 11:23:58 AM »
Sorry I have made up my list again and I just have 6 sensors.
Sorry for the trouble.


Here is my sensor list.
I have 2 IR sensor for picking up the signal from the docking station.
I have 1 LDR sensor for seeing if it is day or not.
I have 1 bumpersensor.
I have 1 voltage sensor for measuring the voltage.
I have 1 sensor that sees if the docking station is locked.


Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: More Inputs on $50 board
« Reply #8 on: April 03, 2009, 01:00:20 AM »
why do you need to measure the voltage?
Howdy

Offline dannytemmermanTopic starter

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 0
Re: More Inputs on $50 board
« Reply #9 on: April 03, 2009, 09:34:49 AM »
why do you need to measure the voltage?

To check if the battery is okay or if it needs charging.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: More Inputs on $50 board
« Reply #10 on: April 03, 2009, 02:40:09 PM »
so does this little thing go dock itself when the battery is low?
Howdy

Offline dannytemmermanTopic starter

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 0
Re: More Inputs on $50 board
« Reply #11 on: April 04, 2009, 02:34:27 AM »
so does this little thing go dock itself when the battery is low?

Yes, its search where the dock is with his 2 IR "eyes" when his battery is almost empty.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: More Inputs on $50 board
« Reply #12 on: April 04, 2009, 02:39:04 AM »
does it keep its power on while charging or does it go to 'sleep' while charging?
Howdy

Offline Miles

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: More Inputs on $50 board
« Reply #13 on: April 28, 2009, 05:30:00 AM »

Here is my sensor list.
I have 2 IR sensor for picking up the signal from the docking station.
I have 1 LDR sensor for seeing if it is day or not.
I have 1 bumpersensor.
I have 1 voltage sensor for measuring the voltage.
I have 1 sensor that sees if the docking station is locked.




With the bump-sensor you can use that as a digital input so you won't have to waste the ADC. Also because you are only using the LDR to detect two scenarios you can using that as a digital input to. Just have a circuit so that when the LDR gets passed a certain value (resistance) it turns on a transistor which supplies one of the ports with 5V so it can detect on or off.

Offline dellagd

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
    • Exodus Rocketry
Re: More Inputs on $50 board
« Reply #14 on: April 28, 2009, 06:39:49 AM »
that would be cool. a robot that you never have to replace the batteries on.
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline dannytemmermanTopic starter

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 0
Re: More Inputs on $50 board
« Reply #15 on: April 28, 2009, 08:11:59 AM »

Here is my sensor list.
I have 2 IR sensor for picking up the signal from the docking station.
I have 1 LDR sensor for seeing if it is day or not.
I have 1 bumpersensor.
I have 1 voltage sensor for measuring the voltage.
I have 1 sensor that sees if the docking station is locked.




With the bump-sensor you can use that as a digital input so you won't have to waste the ADC. Also because you are only using the LDR to detect two scenarios you can using that as a digital input to. Just have a circuit so that when the LDR gets passed a certain value (resistance) it turns on a transistor which supplies one of the ports with 5V so it can detect on or off.

The bump sensor is made of 2 switches with each a different resistor so a digital input is not used.

Which ports are digital and how do you use them in code?

Offline Miles

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: More Inputs on $50 board
« Reply #16 on: April 29, 2009, 02:14:28 AM »

The bump sensor is made of 2 switches with each a different resistor so a digital input is not used.
[/quote]

What does the bump sensor look like? a picture may be usefull. Does the sensor have two things on either side of the robot so it detects what side it hits? You may be able to (if your clever) to have one switch going to one input and the other going into a different input

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: More Inputs on $50 board
« Reply #17 on: April 29, 2009, 02:17:51 AM »
attached is all pins of atmega8 and what they do. the $50 robot doesn't have all of these but they are available.
Howdy

Offline dannytemmermanTopic starter

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 0
Re: More Inputs on $50 board
« Reply #18 on: April 29, 2009, 05:00:51 AM »

The bump sensor is made of 2 switches with each a different resistor so a digital input is not used.

What does the bump sensor look like? a picture may be usefull. Does the sensor have two things on either side of the robot so it detects what side it hits? You may be able to (if your clever) to have one switch going to one input and the other going into a different input
[/quote]

yes, its to see which side got it.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: More Inputs on $50 board
« Reply #19 on: April 29, 2009, 05:12:42 AM »
i would say for the bumper switches go digital,
I have 1 sensor that sees if the docking station is locked.
how is that going to work?
Howdy

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: More Inputs on $50 board
« Reply #20 on: April 29, 2009, 10:14:19 AM »
All the ports on the MCU can be configured as digital. The MCU doesn't have analog ports and digital ports, everything is digital. It is just that 6 of those digital ports have an analog to digital converter.

Offline dannytemmermanTopic starter

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 0
Re: More Inputs on $50 board
« Reply #21 on: April 29, 2009, 10:39:34 AM »
i would say for the bumper switches go digital,
I have 1 sensor that sees if the docking station is locked.
how is that going to work?

If its gets voltage the sensor is gets a value.
If it get voltage from the docking station.

Offline Miles

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: More Inputs on $50 board
« Reply #22 on: April 29, 2009, 07:42:52 PM »
How does it find the docking station? you said it uses 2 IR sensors but how does that actually work? I'm just asking for my own personal knowledge because i might build a robot with similar features (able to find its way back to a docking station)? Also what does the docking station have on it to help the robot find it?

Offline dellagd

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
    • Exodus Rocketry
Re: More Inputs on $50 board
« Reply #23 on: April 29, 2009, 07:57:08 PM »
the only way I could see that that would work would be with a GPS. I mean would it just roam till it found it?
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: More Inputs on $50 board
« Reply #24 on: April 30, 2009, 12:22:28 AM »
pretty much yes. and if its just in your house gps would not work as it is only accurate to 10m or so. it will find the docking station by looking for the infared leds with the infared detector.
Howdy

Offline Miles

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: More Inputs on $50 board
« Reply #25 on: April 30, 2009, 12:48:27 AM »
pretty much yes. and if its just in your house gps would not work as it is only accurate to 10m or so. it will find the docking station by looking for the infared leds with the infared detector.
[/quote


Ok but how does the robot use the ir to go to the docking station? Would it just use two ir detectors on either side and if one sensor detected more infrared it would turn one way
« Last Edit: May 01, 2009, 12:33:21 AM by Miles »

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: More Inputs on $50 board
« Reply #26 on: April 30, 2009, 01:03:12 AM »
yep, so its screwed if it wonders into another room! maybe an ir led trail?
Howdy

Offline Miles

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 1
Re: More Inputs on $50 board
« Reply #27 on: April 30, 2009, 01:10:14 AM »
ir trail. Hmmmmm....... Might work but not sure how the robot will follow it. Perhaps closing the door might help lol

Dosn't ir go through walls?

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: More Inputs on $50 board
« Reply #28 on: April 30, 2009, 06:01:54 AM »
Roomba only has one IR sensor and it can still dock  ;)  You can do anything with the right coding.

Offline dannytemmermanTopic starter

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 0
Re: More Inputs on $50 board
« Reply #29 on: April 30, 2009, 10:30:19 AM »
How does it find the docking station? you said it uses 2 IR sensors but how does that actually work? I'm just asking for my own personal knowledge because i might build a robot with similar features (able to find its way back to a docking station)? Also what does the docking station have on it to help the robot find it?

See tihs site


http://www.schursastrophotography.com/robotics/dockinglogic.html

 


Get Your Ad Here