Society of Robots - Robot Forum
Software => Software => Topic started by: dannytemmerman 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
-
$50 robot MCU only has 6 ADC, but you can use any other pins as a digital input (like buttons).
-
eeee..... use a better processor...atmega16
-
maybe multiplex your inputs, not too sure how well it works with AVR's but I know it works nicely with PIC's
-
could you not use a seperate adc and use digital pins?
-
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
-
do you mean which ports are analogue? also what are your sensors?
-
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.
-
why do you need to measure the voltage?
-
why do you need to measure the voltage?
To check if the battery is okay or if it needs charging.
-
so does this little thing go dock itself when the battery is low?
-
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.
-
does it keep its power on while charging or does it go to 'sleep' while charging?
-
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.
-
that would be cool. a robot that you never have to replace the batteries on.
-
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?
-
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
-
attached is all pins of atmega8 and what they do. the $50 robot doesn't have all of these but they are available.
-
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.
-
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?
-
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.
-
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.
-
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?
-
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?
-
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.
-
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
-
yep, so its screwed if it wonders into another room! maybe an ir led trail?
-
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?
-
Roomba only has one IR sensor and it can still dock ;) You can do anything with the right coding.
-
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 (http://www.schursastrophotography.com/robotics/dockinglogic.html)