ttl switching 12V supply

Status
Not open for further replies.
Please try my Code! and make sure your Reset Pin has Pull-up or is disabled, and your power is blocked with 100nF Cap!

AND the Watch-dog timer is disabled!
 
Hi ptewright,

Obviously you have a 12V supply which does not supply enough current for the motor.

Try Jay's code and my hardware connection of adding a diode and a 470uF or higher value capacitor.

Sorry Jay, I don't know you do not speak C because I saw your posting about C compiler.
 

Attachments

  • mycircuity.gif
    12 KB · Views: 500
eblc1388 said:
Sorry Jay, I don't know you do not speak C because I saw your posting about C compiler.
That's OK, I don't speak it now, but I want to learn it soon, so I was searching for compillers... (I got C18 pretty cheap)
 
eblc1388 said:
Hi ptewright,

Obviously you have a 12V supply which does not supply enough current for the motor.

Try Jay's code and my hardware connection of adding a diode and a 470uF or higher value capacitor..
Also add 100nFcappacitor, it is very important! And check the MCLR and WDT settings!
 

My ammeter shows that the circuit only consumes 0.5A when the motor is on. My power supply is rated for 3A.
It didn't work.
 
Ok, that is not your problem :cry:

Try my code... :roll:
 
ptewright said:
My ammeter shows that the circuit only consumes 0.5A when the motor is on. My power supply is rated for 3A.
It didn't work.

Is it so difficult to try the addition of a diode and a capacitor?

You'll never know until you have tried. I promise you I would not explain to you why it works.
 

Where do I added the 100nF capacitor?
I decided to disable MCLR by setting the config register to 0x2101;
 
Yep, just try it 8)
 

Sorry, but adding that didn't help....
 
 
Post the picture of the asembled device.
 

I couldn't get your code to work with my PIC.
Why is the BOREN bit set. What does the brown-out do?
 
BOREN stands for Brown-out RESET, when there is a power drop below valid operational voltage of the PIC, it will RESET the PIC to ensure that everything will execute correctly.

What's wrong with the Code?
 
Jay.slovak said:
What's wrong with the Code?

Ok the code does work.
when ran without the motor connected, it turns on/off every 5s.
when hooked up to the motor, that varies.
where do i hook up the 100nf capacitor that you mentionned earlier.

About the brown-out. Other then setting the boren bit in the option register, what else do i need to set for it to work (I'm programming it in C)

thanks for all your help
 
The Cap goes from +5V to GND, it is important!
Just set the BOREN bit, and that's it. Nothing to set in software.
(Only If you want to know what sort of reset happened, you need to check PD and TO bits in STATUS reg, check Datasheet).
 
Jay.slovak said:
The Cap goes from +5V to GND, it is important!
check PD and TO bits in STATUS reg, check Datasheet).

In my circuit I already have a 1uF between the 5V output from the regulator and ground, is that not ok? should i replace that with a 100nf?
 
Just add it there, ceramic 100nF will effectively damp any HF noise (due to high-speed character of the PIC).

I remember that once I forgot to put it there, and the PIC started to oscilate, turn very Hot and almost poped in my face...
 

Is it possible to write up what you did in your .hex file?
I would like to write that in C.
 
I can send you the ASM file or I will describe it "oraly"...

So you say, the whole thing works OK?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…