Help with Pump Overrun Timer Please

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

Although it is working though, something strange is going on, twice now after the countdown has finished when I re apply power to the call the chip restarts and the last time it did it the i2c lcd display backlight went off so it must of missed the turn backlight on command, do you have any ideas what might be causing this ?

Thanks
Stuart

EDIT: Should my unused pic pins be earthed ?
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by medelec35 »

Hi Stuart,
In the past I have said to matrix staff that I have never had a fully working project that involves the 16F18xxxx Range.
Reason being they always randomly reset or just freeze.
I have 16F1824 that reset when it read a particular ADC channel.
When I used a 16F166 instead with the same flowchart (just changed configuration settings) then no more resets.
I have just developed a DS3231 instant programmer that shoes the current time,date & day of the week.
When a key is pressed it instantly updates RTC with PC time.
I used a 16F1828 and that is the first 16F18xxxx that does not reset.
you can post flowchart so I can look at configuration settings, but I don't think I will be much help to be honest.
acestu wrote: EDIT: Should my unused pic pins be earthed ?
No there could be no need to ground unused pins.

Martin
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

I have done some searching on the internet and people are talking about high frequency interference from the relay coil and adding snubber caps across the coil and some say put an electrolytic cap on the chip vcc its a bit of a mine field really, I suppose if nobody knows then its a case of experimenting

Thanks
Stuart

p.s. these are my config settings:
config.jpg
config.jpg (64.44 KiB) Viewed 13921 times
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by Steve001 »

Hi Start,

Some things you could try . Cannot guarantee that it will work tho .

1. Place a capacitor net work across the pic supply pins (10uf + 100nf in parallel )
2. place a transzorb across the pic supply pins
3. replace D1 for a 5V1 Zener diode (the one across the relay coil)

Transzorb Data Sheet (farnell and rs sell them) look at the ones that start clamping around 5.8 V

http://www.vishay.com/docs/88369/p6ke.pdf

explanation of how to use TVS Diodes and how they work

http://www.vishay.com/docs/88436/appnote.pdf


Steve
Success always occurs in private and failure in full view.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Steve,

Thanks for your suggestions, I will order some parts as soon as I can and have a go at resolving the issue.

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Steve,

Would I be right in thinking that the P6KE6.8A is the right type ? and the capacitors in the network are they electrolytic polarised ?

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by Steve001 »

some farnell part numbers
P6KE6V8A - 101 - 7776
BZW04-5V8B - 980 - 2209
BZX-C5V1 109 - 7236

Yes the capacitor is a Electrolytic type and a plastic or ceramic for the 100nf, they need connecting as close to the pic as close as possible

Steve
Attachments
capacitor.JPG
capacitor.JPG (23.92 KiB) Viewed 13860 times
Success always occurs in private and failure in full view.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Steve,

Thanks for the info, I have ordered some and they should be here on Friday.

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by Steve001 »

Just had a thought some pic micros have a register you can interrogate it to see why it has reset maybe benj can help you with that . I could be wrong on this one it may be a feature on the higher end micros .

Think its RCON ? or some thing like it


Steve
Success always occurs in private and failure in full view.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Steve,Martin,

All the parts came this morning and I have soldered them all in place, after testing on the bench the third time the relay was activated instead of restarting the pic just freezes and does nothing else, I will have a look into the log register that you talk about, Martin from what you were saying about these chips always locking up would I be better using another device like the pic16f877a ?


I will do some more testing but it dosen't look good :(


Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi,

I have done some more testing and the first time I restarted after the overrun had timed out the chip restarted, so No difference really apart from freezing as well as restarting...

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi,

Could the vtx power supply be insufficient, I have an i2c piggy back lcd display, 5 volt songle relay, pic16f1824 with an external 196600 crystal ?

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by Steve001 »

Hi Stuart,

If You connect Your scope across the 5volt rails. You Will soon See if the transformer Is too small as You Will See the output drop .
Don't know if You Have ever had a scope across a pic supply pins before , the wave form Is awfull. Lots of noise

Steve.
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by medelec35 »

Hi Stuart,
If it was me and I was not sure if its the pic chip or PSU then I would first use a very basic flowchart that enables everything and not have any inputs as I suspect that could be the issue.
So just LCD on and toggle relay every 10 seconds.

Measure supply voltage. if stays at 5V with relay on and off then I would just use a different target device thatI would have laying around like 16F1937 (since only testing doe not matter if loads of pins are not used).
Load the new target device with the flowchart that was resetting the other target device.
If it does not reset or freeze we then know it a target related issue.

Martin
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Steve, Martin,

Thanks for your suggestions, I will try them and post back when I have some results..

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi,

I programmed the chip with a basic flowchart ie lcd on with backlight and a loop that turned the relay on and off every 5 seconds, when I powered up it was flawless and I tried it a few times, no dimming of the lcd so I suppose the power supply is adequate, but where do i go from here ?

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by medelec35 »

Hi Stuart,
acestu wrote:but where do i go from here ?
The last part of my message:
medelec35 wrote:if stays at 5V with relay on and off then I would just use a different target device thatI would have laying around like 16F1937 (since only testing doe not matter if loads of pins are not used).
Load the new target device with the flowchart that was resetting the other target device.
If it does not reset or freeze we then know it a target related issue.
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

The circuit is on a pcb and not a breadboard so I will have to get a chip with the same number of pins and is supported by flowcode, could you recommend a good i2c 14 pin pdip device, or should I start all over again with a pic16f877a that I already have ?

thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by medelec35 »

What about getting a 16F616, 16F684 or 16F688 as these are pin to pin compatible with 16F1824.
You will need to use software I2C as its not built in, but could end up working.
I'm currently using DS3231 in software mode and have not got any issues so far.

Martin
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

Right I will order some, they should be here mid week.

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by medelec35 »

As a test for IC2 LCD are you able to connect it to your EB006 and select I2C software mode.
At least then you can have an indication on how well its going to work.
By the way 16F616 and 16F684 does not have that much ROM although enough for your timer.

I would recommend 16F688 since has more ROM so is more suitable for other projects as well.

Martin
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Help with Pump Overrun Timer Please

Post by acestu »

Hi Martin,

I have just bought 2 of each of them so I have a few to try,

I am not that familiar with the eboo6 because I never use it, I always use my pickit3

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

Post Reply