Pic16f84

userxyz

Member
Join Date
May 2002
Location
any
Posts
2,768
skuller

I know, it's not really the right place to ask this, but I have a problem with a microcontroller. I program S7-300 CPU's and I've got a big project for the moment. I work in the carpet industry (www.awe.be) and we are going to change the whole color kitchen by 1 CPU S7-300 with 2 ET200 stations on a profibus network. No more matrix for selecting the right tank, but controlled from the machine. Also there will ben an OP17 for visualize the measurement of the flowmeters.

The electronic boards for measuring the level of the paint in the screen have te be changed also. They're to old and we can't order the solid state relais that are used on the boards, to old.
The level sensing part of the paint in the screen is measured with a current. If the current is below 20mA, the pump doesn't run, this for no longer then 20 secs or there will be an alarm. If the current is above 20mA the pump will run. When the current is above 80mA, there will be an alarm ( sensor to ground = no isolation ).
For that part I had the Idea to make new electronic boards with
PIC16F877 microcontroller, or with a PIC16F84 and some Opamps.
Is there anybody who has experience with microcontrollers, because this is my problem:
The PIC16F84:
I can use timers, make a subroutine for a counter, can use AND, OR functions, etc...
But, can I SET a bit, I mean: for example, press once on a button and a bit is high and stays high, press another time and it's low again, (pulsrelais). If I can't do that, then I have to use flipflops, and I don't like that :)
How about the current, can I do that is some way ?

Please HELP
 
The electronic boards for measuring the level of the paint in the screen have te be changed also. They're to old and we can't order the solid state relais that are used on the boards, to old.

Hummm!! Hard to get ...

How about you go and tell your boss you are going to build a device which NOWHERE in the whole world you can get of the shelf.

...a device that only can be built by hand...

...not a stock item... NOWHERE...

BUT... you like it like that!
 
I agree with Pierre... Don't cobble together your own "home brew" stuff... :rolleyes:

If you need a current operated switch, BUY a current operated switch... Don't make your own. If you want to build stuff, build it for home use.
Current operated switches are readily available from companies like NK Technologies (<--link). Even if it is a custom item, at least it will have a part number that someone can readily order in the future.

As far as those obsolete SSRs on the board... Have you researched a replacement? Just because the original manufacturer doesn't make them anymore, doesn't mean that no one makes an equivalent. Any idea how many relay manufacturers are out there?

What's the specific relay that you can't find? Perhaps we can help out.

-Eric
 
Save time & money, and avoid problems : follow Eric's advices, or select a compact size PLC with analog input and Profibus port.
 
Aiaiai

Look,

I would do the whole thing with a PLC if I could, but no. Thanks for the reply's, but I got the code I needed. The level sensing can't be done as simple as you guys think, it's paint in screens !! Therefore: build my own board, the old ones are made by an employer also BTW.
I found the code I needed, the important thing was to be able to set a bit. It's not 100% the right way to do it, but it works, example routine:

include 16f84_4
include jlib

pin_b1_direction = output
pin_b3_direction = input
pin_b4_direction = input

const bit aan = low
const bit uit = high

var byte x = 0

pin_b1 = uit


forever loop

If pin_b4 == aan then
x = 15
end if

If x > 0 then
pin_b1 = aan
end if

If pin_b3 == aan then
x = 0
pin_b1 = uit
end if

end loop


Programmed in JAL
 
Re: Aiaiai

Combo said:
...the old ones are made by an employer also BTW.

Our point exactly... :rolleyes:

But I still question the fact that: If the level of paint in the screen is related to current flow (through the paint I assume?), why not just measure the current with the PLC?

-Eric
 
idd

You are right eric,

but: tell this to my bos, not me :p


The old boards will not start a pump in my new project, my boss want to use a contact that starts the pump from the card and use it as an input in the PLC.

Measuring the current = i agree, but, u have to supply current, agree ?
 
Re: idd

Combo said:
but: tell this to my bos, not me :p
Pass along his e-mail address and I will! ;)
Measuring the current = i agree, but, u have to supply current, agree ?
Agreed! But I don't consider connecting a power supply and maybe a current-limiting resistor as "home brew"... As long as you don't wind your own resistor! :rolleyes:

Think of the things you can do with this information within the PLC!

Things like:
Instead of just tripping an alarm when the current exceeds 80ma, you can anticipate the current rising and maybe do something to prevent the alarm condition?

Or maybe automatically adjusting the process for different paint characteristics when you run different products? No more adjusting (and wearing out)pots on boards!

You can probably think of a bunch of things!

beerchug

-Eric
 
Eric, tis a waste. I deal with this daily. Old guy is lead and decides/convinces engineering echelon what is needed. Other guy is boisterous/outspoken and convinces management.

This is other guy. He has decided on a way but doesnt know how so had to ask HOW. Now he has to show/prove.

Personally I agree with you, the board **** could have been eliminated altogether, either use a level sensing device or change the specs to conform to a plc analog input(eliminating the board).
 
Back
Top Bottom