Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Robotics Chat


Robotics Chat Specific to discussions about robots and the making of.

Reply
 
Thread Tools Display Modes
Old 30th April 2008, 02:55 PM   (permalink)
Experienced Member
 
ericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud of
Default

hi Alex,
Copied it, I will give a spin, let you know.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now   Reply With Quote
Old 30th April 2008, 02:58 PM   (permalink)
Experienced Member
zanes has a spectacular aura about
Default

Well I'm absolutely clueless now, with LEDs on the outputs working as intended, and the PIC running the H-bridges fine when not using inputs from the sensors. I must be nearly there!!
zanes is offline   Reply With Quote
Old 30th April 2008, 03:19 PM   (permalink)
Experienced Member
 
ericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud of
Default

Quote:
Originally Posted by zanes
Well I'm absolutely clueless now, with LEDs on the outputs working as intended, and the PIC running the H-bridges fine when not using inputs from the sensors. I must be nearly there!!
Hi,
Running in Sim OK.

Observed Operation:
RA2 and RA3 low NO flashing RB0 and RA0 are both Low
;
RA2 high starts RB0 flashing.
RA3 high starts RA0 flashing
;
RA2 and RA3 high start RB0 and RA0 flashing.

Observed flashing rates are the same for both pins, when operating separately or together.

What are your sensor voltage levels.? going into the PIC pins.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now   Reply With Quote
Old 30th April 2008, 03:47 PM   (permalink)
Experienced Member
zanes has a spectacular aura about
Default

Should be flashing very quickly though? Sensor voltage levels I am not sure, but it's enough to trigger an LED, so is obviously triggering the PIC program.
zanes is offline   Reply With Quote
Old 30th April 2008, 04:20 PM   (permalink)
Experienced Member
 
ericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud of
Default

Quote:
Originally Posted by zanes
Should be flashing very quickly though? Sensor voltage levels I am not sure, but it's enough to trigger an LED, so is obviously triggering the PIC program.
hi,
In real time, not the Sim, they will be flashing very quickly, you have no Wait states.

The input threshold voltage is just over +2V for a +5V supply.
Do you have a DVM.?
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now   Reply With Quote
Old 30th April 2008, 04:35 PM   (permalink)
Experienced Member
zanes has a spectacular aura about
Default

In the labs at uni, or at home. It triggers an LED on the outputs though, so it is obviously triggering it. Or is the output somehow (linearly?) related to the input voltage?
zanes is offline   Reply With Quote
Old 30th April 2008, 04:59 PM   (permalink)
Experienced Member
 
ericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud of
Default

Quote:
Originally Posted by zanes
In the labs at uni, or at home. It triggers an LED on the outputs though, so it is obviously triggering it. Or is the output somehow (linearly?) related to the input voltage?
hi,
No, there is no relationship between the digital input and output voltages.
When you say it triggers an LED, do you mean it lights an LED.?

Can you post a diagram on how you have connected one LDR and one output pin, just a quick sketch would do, include all the components connected to the input and output pin.

As you are driving an H Bridge, why are toggling the output pin at such a high rate.? rather than at a fixed voltage level.
At a rough estimate, the Port output pin is toggling around 30KHz.!
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now   Reply With Quote
Old 30th April 2008, 05:16 PM   (permalink)
Experienced Member
zanes has a spectacular aura about
Default

Hmmm.... I think the problem may lie in my hbridge, as I have just been doing some testing with the PIC loaded up, and I've got some weird results. I'll probably cop out and buy a controller IC!
Yes, it lights an LED. The reason I have my program setup this way is that is the easiest way I could think of implementing my design on my PIC!
zanes is offline   Reply With Quote
Old 30th April 2008, 05:20 PM   (permalink)
Experienced Member
 
ericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud of
Default

Quote:
Originally Posted by zanes
Hmmm.... I think the problem may lie in my hbridge, as I have just been doing some testing with the PIC loaded up, and I've got some weird results. I'll probably cop out and buy a controller IC!
Yes, it lights an LED. The reason I have my program setup this way is that is the easiest way I could think of implementing my design on my PIC!
hi,

Code:
Main
	;bcf porta,0 ;turns both 
	;bcf porta,1
	;bcf portb,0 ;motors off
	;bcf portb,1
	btfsc porta,2 ;tests light on right LDR
	goto rightlight		;if light,goto rightlight 
             bcf portb,0;;turn off if not called
	btfsc porta,3 ;tests light on left LDR
	goto leftlight		;if light,goto left light
	bcf porta,0;turn off if not called 
	goto Main
rightlight
Make these small changes to the program, the outputs dont toggle, they stay high when called and go off if not called.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now   Reply With Quote
Old 30th April 2008, 05:46 PM   (permalink)
Experienced Member
zanes has a spectacular aura about
Default

Brilliant!! It works-perfectly!
Shows how much I need to learn. Thankyou!!
zanes is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Drive 33 Servos With One PIC + USART wschroeder Micro Controllers 40 14th July 2008 02:22 PM
Magic: The Mini-magic Switchboard should I make it a kit? blueroomelectronics Electronic Projects Design/Ideas/Reviews 207 23rd June 2008 02:55 AM
End my elevator nightmares fearlesss Electronic Projects Design/Ideas/Reviews 20 29th March 2008 02:39 AM
need help... imisendo_4036 Micro Controllers 0 20th February 2008 01:14 AM
Changing the hex code anthony123 Electronic Projects Design/Ideas/Reviews 22 16th February 2008 04:11 AM



All times are GMT. The time now is 06:38 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.