Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

current reducer 1A to 250 mA

Status
Not open for further replies.
if that all my problem is than it would be easy to fix...
actually I was not at my computer when i created it and just drew a quick one up in paint. I also left out caps on the oscillator, i left out the temperature sensor, a gas sensor, pressure sensor...

none of which help me answer the question on why the PIC keeps resetting.

It works fine when powered by the Pickit2 and does not when connected to the DC/DC.

Although the current levels and voltage levels seem to be fine for the PIC.
 

none of which help me answer the question on why the PIC keeps resetting.

they do. you just don't know, yet.
 

**broken link removed**

an updated one, with values.

I temporarily disconnected the motor and even put in a 7805 after the DC/DC converter... (with caps) just to see if it would help.
The DC/DC converter says it is a regulated output however, but I thought it couldnt hurt. But it also did not help.
The pic still resets.

ignore the connection to the pickit2, since i am not connecting it, and just take a look at this circuit.

Thanks all for your help.
 
Last edited:

there are much simpler ways to test that but since every road goes to Rome, ... :)

I temporarily disconnected the motor and even put in a 7805 after the DC/DC converter... (with caps) just to see if it would help.

I think you should really read the 7805 datasheet to see if it would help. Somehow, I think the engineers who designed that chip know a thing or two about the chip that you don't.

driving a car with a blindfold on certainly is a way of driving a car but hardly the most efficient.
 

I have removed the 7805 that is not an issue.

---------- Post added at 11:32 AM ---------- Previous post was at 11:31 AM ----------

I have checked the circuit with the schematic and it matches.
I now have the pressure sensor wired in as well.

---------- Post added at 11:33 AM ---------- Previous post was at 11:32 AM ----------

I still get the PIC to continuously reset.

when i power it with the pickit 2 there are no issues.

---------- Post added at 11:36 AM ---------- Previous post was at 11:33 AM ----------

**broken link removed**
an updated schematic...

---------- Post added at 11:39 AM ---------- Previous post was at 11:36 AM ----------

https://www.cincon.com/data/products/dcdc1_2/EC4A.pdf
the DC/DC converter...

---------- Post added at 11:41 AM ---------- Previous post was at 11:39 AM ----------

**broken link removed**
pressure sensor...

**broken link removed**
RTCC....
 
I am not familiar with that processor and cannot look it up at the moment but should MCLR have a pull-up resistor? Maybe it is internal to the PIC.

You have a diode in series with the output of the DC-DC converter so your 5V supply will be less than 5V. Have you monitored the 5V supply?

Keith
 
but should MCLR have a pull-up resistor? Maybe it is internal to the PIC
.
18F4550 has no internal pullup. It must be provided externally unless MCLR isn't disabled in the configuration fuses. Otherwise it can cause unwanted resets.
 
@keith1200rs that's true!
the pickit2 has a pull-up (or should have, as i don't have one, but any programmer need it to proper programming)

if you leave this pin (MCLR) disconnected of course you will have many unwanted reboots...
just add a pull-up resistor(10K commonly) from MCLR to VCC. even it should not interfere with the programming trough the PICkit...

this is a common issue, but i don't remember reading in your firsts posts, about that it worked when connected to the Pickit, only about the DC/DC powering...
this is an important detail. when you got it to work and when not...


also i think you disable the watchdog by CONFIG huh?

---------- Post added at 01:56 AM ---------- Previous post was at 01:51 AM ----------

mmmm... i suggest adding an 100uF after your VCC diode (which i hope is a low-drop, fast-switching diode, 1n5819 or so) any way, a drop up to 4.5v will be unnoticed... as the data-sheet says... i can power down to 4.2v without any regrets...
 
i have added a 10k pullup to MCLR.

for the fuses i have NOBROWNOUT, NOWDT, NOMCLR...
(#fuses NOWDT, NOPROTECT, NOBROWNOUT, NOPUT, NOLVP, XT, NOMCLR)

in my earlier posts I had not connected the DC/DC converter yet.
now that I do i get resets.

If i completely disconnect the motor and the tip42 I still get the resets.

Should I also add a small capacitor on MCLR... i have read a 1-10nf helps.

updated schematic: **broken link removed**


I have also heard the 4550 is partularly buggy when it comes to resets. (?)
Even with the 10K it still resets.

i have tried previously adding a 7805 thinking that the DC/DC was not regulated well.
This did not help. Then I tried a 5V MCP1702... with 1uF caps and this did not help.

the small drop in the diode is good enough... wont affect the pic at all since it has a wide voltage range. It also does not seem to bother the LCD at all.

I am at a loss... i have checked the circuit numerous times. I have added the pullup resistor.

on the 'Brightness' pin, I could not get the backlight to light up at all without it. Just doing a PWM didnt seem to work.
If i disconnect them both and just run a line straight to Vdd it is very bright, but then I cannot adjust it.
Maybe I will try to remove this from the circuit. since I have not added a screen yet for adjusting it anyways. But again, when the PICKIT2 is connected it is not an issue.

Would it be better to enable MCLR and keep the 10k resistor?

---------- Post added at 02:08 AM ---------- Previous post was at 02:03 AM ----------

I will try to add the 100uf cap as well. I think I may have a fast switching one around, but i dont know its P/N off hand so I am not sure of the voltage drop. I believe it is small though (just judging from its size :/

This 100Uf cap you are proposing should also stay in series i presume?

thanks again all of you... After it is all working I wil post some good pictures of the whole project for you. As well as the zipped code.
 
Last edited:

(i have an ICD, i'm not sure if it has a similar option but)
when working with the Pickit, did you used the option to power the target from the Pickit or just use the powered target?(try this options if you can)

your are sinking TOO MUCH CURRENT with your bright control!!!!!!!!! (sorry i didn't check well this part until you mentioned!)
with 20ohms, when the pin is OUTPUT LOW it sinks (5/20) = 250mA THAT TOO MUCH for a single PIN!!!!!!!
USE a transistor (common emiter) or any current amplifier to do that part!!!!!!!!!!!!!!

also set a pull-down for PGM just in case...

also re-enable MCLR! (take out the option NOMCLR !!! i forgot this pic has this option...) but leave the pull-up mentioned (i never disable the MCLR with this pic, but i have some issues with the internal mclr in a lower pic)

also check for different configurations for the Brown Out and Power-on Reset (PWRT) i usually disable the brownout and enable the poweron Reset
 
Thank you Kurenai_ryu...

Will do.

I which change out the brightness pin with a small transistor, when i am able... I will probably just disconnect it for now to eliminate that from a possibility.

I will be able to try these other options in the morning. Unfortunately I did not bring the circuit with me this afternoon So it is not with me.

When you say pull-down on PGM, you do me PGM and not PGC or PGD correct ??

I am also using portB 4-7 for the buttons. PGM is portB.5 (B5) PGC is portB.6 and PGD is portB.7.

I can always move these buttons and change the interrupt if this could be an issue. The intent is to not connect the pickit at all however.



Here are my possible fuses however: (using CCS 4.093)

1.00 PLL1 No PLL PreScaler
1.00 PLL2 Divide By 2(8MHz oscillator input)
1.00 PLL3 Divide By 3(12MHz oscillator input)
1.00 PLL4 Divide By 4(16MHz oscillator input)
1.00 PLL5 Divide By 5(20MHz oscillator input)
1.00 PLL6 Divide By 6(24MHz oscillator input)
1.00 PLL10 Divide By 10(40MHz oscillator input)
1.00 PLL12 Divide By 12(48MHz oscillator input)
1.03 CPUDIV1 No System Clock Postscaler
1.03 CPUDIV2 System Clock by 2
1.03 CPUDIV3 System Clock by 3
1.03 CPUDIV4 System Clock by 4
1.05 USBDIV USB clock source comes from PLL divide by 2
1.05 NOUSBDIV USB clock source comes from primary oscillator
1.08 INTXT Internal Oscillator, XT used by USB
1.08 INTHS Internal Oscillator, HS used by USB
1.08 HS High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD)
1.08 HSPLL High Speed Crystal/Resonator with PLL enabled
1.08 XT Crystal osc <= 4mhz for PCM/PCH , 3mhz to 10 mhz for PCD
1.08 XTPLL Crystal/Resonator with PLL enabled
1.08 EC_IO External clock
1.08 EC External clock with CLKOUT
1.08 ECPIO External Clock with PLL enabled, I/O on RA6
1.08 ECPLL External Clock with PLL enabled and Fosc/4 on RA6
1.08 INTRC_IO Internal RC Osc, no CLKOUT
1.08 INTRC Internal RC Osc
1.14 NOFCMEN Fail-safe clock monitor disabled
1.14 FCMEN Fail-safe clock monitor enabled
1.15 NOIESO Internal External Switch Over mode disabled
1.15 IESO Internal External Switch Over mode enabled
2.00 NOPUT No Power Up Timer
2.00 PUT Power Up Timer
2.01 BROWNOUT_SW Brownout controlled by configuration bit in special file register
2.01 BROWNOUT_NOSL Brownout enabled during operation, disabled during SLEEP
2.01 BROWNOUT Reset when brownout detected
2.01 NOBROWNOUT No brownout reset
2.03 BORV46 Brownout reset at 4.6V
2.03 BORV43 Brownout reset at 4.3V
2.03 BORV20 Brownout reset at 2.0V
2.03 BORV28 Brownout reset at 2.8V
2.05 NOVREGEN USB voltage regulator disabled
2.05 VREGEN USB voltage regulator enabled
2.08 NOWDT No Watch Dog Timer
2.08 WDT Watch Dog Timer
2.09 WDT128 Watch Dog Timer uses 1:128 Postscale
2.09 WDT64 Watch Dog Timer uses 1:64 Postscale
2.09 WDT32 Watch Dog Timer uses 1:32 Postscale
2.09 WDT16 Watch Dog Timer uses 1:16 Postscale
2.09 WDT256 Watch Dog Timer uses 1:256 Postscale
2.09 WDT512 Watch Dog Timer uses 1:512 Postscale
2.09 WDT8 Watch Dog Timer uses 1:8 Postscale
2.09 WDT4 Watch Dog Timer uses 1:4 Postscale
2.09 WDT2 Watch Dog Timer uses 1:2 Postscale
2.09 WDT1 Watch Dog Timer uses 1:1 Postscale
2.09 WDT32768 Watch Dog Timer uses 1:32768 Postscale
2.09 WDT16384 Watch Dog Timer uses 1:16384 Postscale
2.09 WDT8192 Watch Dog Timer uses 1:8192 Postscale
2.09 WDT4096 Watch Dog Timer uses 1:4096 Postscale
2.09 WDT2048 Watch Dog Timer uses 1:2048 Postscale
2.09 WDT1024 Watch Dog Timer uses 1:1024 Postscale
3.08 CCP2C1 CCP2 input/output multiplexed with RC1
3.08 CCP2B3 CCP2 input/output multiplexed with RB3
3.09 PBADEN PORTB pins are configured as analog input channels on RESET
3.09 NOPBADEN PORTB pins are configured as digital I/O on RESET
3.10 LPT1OSC Timer1 configured for low-power operation
3.10 NOLPT1OSC Timer1 configured for higher power operation
3.15 MCLR Master Clear pin enabled
3.15 NOMCLR Master Clear pin used for I/O
4.00 STVREN Stack full/underflow will cause reset
4.00 NOSTVREN Stack full/underflow will not cause reset
4.02 LVP Low Voltage Programming on B3(PIC16) or B5(PIC18)
4.02 NOLVP No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
4.05 ICPRT ICPRT enabled
4.05 NOICPRT ICPRT disabled
4.06 NOXINST Extended set extension and Indexed Addressing mode disabled (Legacy mode)
4.06 XINST Extended set extension and Indexed Addressing mode enabled
4.07 NODEBUG No Debug mode for ICD
4.07 DEBUG Debug mode for use with ICD
5.00 NOPROTECT Code not protected from reading
5.00 PROTECT Code protected from reads
5.14 CPB Boot Block Code Protected
5.14 NOCPB No Boot Block code protection
5.15 CPD Data EEPROM Code Protected
5.15 NOCPD No EE protection
6.00 WRT Program Memory Write Protected
6.00 NOWRT Program memory not write protected
6.13 WRTC configuration registers write protected
6.13 NOWRTC configuration not registers write protected
6.14 WRTB Boot block write protected
6.14 NOWRTB Boot block not write protected
6.15 WRTD Data EEPROM write protected
6.15 NOWRTD Data EEPROM not write protected
7.00 EBTR Memory protected from table reads
7.00 NOEBTR Memory not protected from table reads
7.14 EBTRB Boot block protected from table reads
7.14 NOEBTRB Boot block not protected from table reads
 
Last edited:

as you left your RB4:RB7 disconneted when the buttons are open... i would add 10k pull-down (from pin to GND) just to be sure...

i was suggesting the PGM pull down just in case LVP is mis-configured...
 
I did get the issue with the resetting solved...

It ended up being the 20 ohm resistor for 'brightness'.
I will change all that to an NPN later... for now i removed the PWM wire.

I did add 1k ohm resistors for pulldown... on the buttons... you think these are too small?

Also, i changed the PNP (tip42a) to an NPN (tip41a) and i get the pic to startup with no resets now, but it locks at the first screen. (odd)...

so before i changed anything else i switched it back to a PNP and it works fine again.
This seems odd to me, since it should have been an NPN to start with.

Thanks again. It is now powering very well.
 

mmmm... seems very odd... but its going a good way.. hope you get all your issues solved...

as i suggested a 10k 20k pull down should be enough ...
but your 1k will drawn 1mA from the power supply not the pic, so it doesn't care
 

I have been trying to get the tachometer working correctly on this project as well.

An update on the schematic: **broken link removed**

I am using a TIP41A NPN for the speed.

I am checking the voltages with both an oscilloscope and a multimeter.
I am pulling the tach up to 5V.

I get the proper signal from the motor, but am only measuring an average voltage on my interrupt pin of 3.5 V.

on my interrupt routing I am only running a counter. (i.e. ticks++)

I check every second how many ticks I get. It seems to be only showing about 10 ticks per second... I should be getting about 140 per second on this motor.

Can anyone see anything wrong with using the TIP41a in this way ?


thanks as always.
 

maybe it's too slow... (but a tip 41 has a low hfe it's more appropiated for power amplifier did you check the output of the TIP41 or just the input????)
i suggest using a 2n3904 (NPN) in common emiter (say emmiter to GND, tacho with a 10k series resistor to base and a 10k pull-up resistor to collector... collector is output...) this only if your tacho is TTL/CMOS output...

if tacho is OC (output collector...) mmmm i would use 2n3906 also in common emiter :) (emitter to VCC, tacho to a 15k pull-up (same) and a 10k resistor to base, 10k resistor from collector to GND... also collector is output...)

i never liked the common collector mode, as it always drops the output voltage....
 

I agree that maybe the tip41 is too slow. I have checked the output and get a good frequency however.

I will keep looking at it this evening.

My only concern with the 2n3904 and 3906 are the voltages.

I have a pullup of the tachometer to 48V (although i think i am showing the 5v on the schematic... i have changed it) I could change this back to 5V however and try it.

Thank you again.
 

you sounded like a blind person trying to find his way out of a maze - given the large number of errors in the hardware design, that's to be expected.

I think the fastest way for you to find your way out of the problem is to stop working on it, learn about the very basics of hardware design first.

good luck because you will need lots of it.
 

you are a plethora of wisdom millwood...
I think I will drop everything I do and go order some electronics magazines straight away.
 

you got it deeperkin.

sometimes the fastest way to get where you want to go is to slow down. going back to basics is exactly what you need.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top