Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: spizzak on July 11, 2009, 06:43:46 PM
-
Hey everyone here is my problem. When I tried programming my chip it gave me an error of the programmer header being connected wrong. It seemed right to me so i started checking my circuit with a continuity indicator and here is what I found:
With the power supply connected i have continuity between the input and ground but only if my multimeter is hooked up with the black wire to the input and red wire to ground.
However with the powersupply disconnected I get continuity for short bursts (maybe half a second) only if I alternate which way im hooking up the multimeter. Does this have something to do with the capacitor?
anyway, this doesn't seem right to me can anyone give me any ideas of what might be causing this? Or maybe its the way its supposed to be? :S
Thanks
-
Ok first all all what programmer cable are you using? What software program are you using to upload it? (AVR Studio or PonyProg)
Have you wired your board identical to that in the tutorial and have you made absolute sure that your programming pins are wired up correctly. Also check which way you plug the cable into the board as that would reverse all connections.
What does the error message say exactly?
-
Hi,
[...] with the powersupply disconnected I get continuity for short bursts (maybe half a second) only if I alternate which way im hooking up the multimeter. Does this have something to do with the capacitor?
Yes, that's what you'll see with a large capacitor
I'm not sure what you mean by "with the power supply connected/disconnected. Is it the voltage regulator you are referring to?
-
I'm not sure what you mean by "with the power supply connected/disconnected. Is it the voltage regulator you are referring to?
i think he means with the battery plugged in/unplugged...
how do you disconnect the voltage regulator ???
-
i think he means with the battery plugged in/unplugged...
Why don't we just let spizzak answer that instead of assuming we know something we don't?
how do you disconnect the voltage regulator ???
By Weller magic ;D
You know, it's a tool like a screwdriver with a string tying it to the workbench to keep it from getting lost and it's got a hot end and a very very hot end (the latter shouldn't be touched directly).
When prototyping, I use sockets to be able to make quick changes (since I never use a breadboard for anything beyond 5..10 discreetes, as they introduce lots of noise and parasitics).
-
1. Yes I did mean with the battery plugged in/unplugged. However, I have got it programmed now, its just not working exactly like it should.
2. It only seems to work in really high light and even then not the greatest. The other thing is when it sees the same amount of light in both sensors one wheel spins forward and the other backwards.. I think this is because if both the servos spin in the same direction and are mounted symmetrically on opposite sides of the chassis then they will actualy spin backwards, so I'm not sure what to do about that.
3. Anyway I think i'm gonna try to reconstruct my photosensors.
4. Just to be clear, where do I plug in left/right servo? Does left go in PD0 and right in PD1 or the other way around? And what about the sensors, which one do the left and right go in?
Thanks again!
-
Also, a few more things:
1. I noticed my LED is never on (when is it supposed to be on?)
2. My photoresistors decrease in resistance with light (not sure if this affects how the robot responds)
3. Is there anyway to test the photoresistors?
-
The left servo should be connected to PD0 (pin 2) and the right servo to PD1 (pin 3). You can find this information in the SoR_Utils.h file, where the servo_right() en servo_left() functions are defined.
If you want your LED to light up, you should change one line in the Photovore_v1.c file, change LED_off() to LED_on(). It's line 50 in the original file.
Your photoresistors should decrease in resistance as the brightness of the light increases, so I think the resistors themselves at least are working as they should.
-
Why does PORT_OFF(PORTD, 4) turn the led on instead of PORT_ON?
-
if you want the sensors to be more sensitive you can play around with the threshold in the code.
int threshold=8;//the larger this number, the more likely your robot will drive straightyou can play around with the 8 until it gets better if you want.
-
Why does PORT_OFF(PORTD, 4) turn the led on instead of PORT_ON?
Because the LED is wired such that when port D4 gets a ground (off) it lights the LED.
-
How could I replace the light sensors with a switch? I have some 2 way switches with three leads like the light sensors, but I don't know if I can just plug them in the same. Does anyone know why the light sensors have 3 leads (ie. what each one does)??
Thanks!