Voltage regulator for inputs?

buntay

Senior Member
Hello again all,

Hopefully this question can be answered simply.
I have been commissioned to retro fit a piece of equipment for my place of work due to the fact that the electronics and PLC are so out of date that the company doesnt even have the program for one even if we found a plc.

Here is the question.
the whole system uses a 24v,dc parts, I know 24v will blow out an input or maybe the whole chip.
I thought about using voltage dividers but wouldnt it just be simpler to use something like a 78L05 regulator?
do these regulators force 100Ma or will picaxe just take what it needs? Response time isnt critical but voltage spiking would not be desirable. They would be used on a proximity sensors that sends out 24v,dc.

also what would be the best way to do the outputs? Again, i need to go from 5v to 24. I thought about relay boards from ebay. Is there an easier way?

I would ideally like to encapsulate everything and just have a 25 pin D-sub connector to the terminal strip due to washdown conditions. They would like 5 PLC's, 1 and 4 backups ( i guess they figure that by the time those would be used up they will get rid of it for scrap) I have to pay for the prototype (will be re-embersed if it works) and then they will pay for all the parts for the other 4 so I need cheap, yet reliable electronics. Any ideas on how to make sure the system never sees 24v where its not supposed to would also be deeply appreciated.

Thanks all,
F
 

rq3

Senior Member
Hello again all,

Hopefully this question can be answered simply.
I have been commissioned to retro fit a piece of equipment for my place of work due to the fact that the electronics and PLC are so out of date that the company doesnt even have the program for one even if we found a plc.

Here is the question.
the whole system uses a 24v,dc parts, I know 24v will blow out an input or maybe the whole chip.
I thought about using voltage dividers but wouldnt it just be simpler to use something like a 78L05 regulator?
do these regulators force 100Ma or will picaxe just take what it needs? Response time isnt critical but voltage spiking would not be desirable. They would be used on a proximity sensors that sends out 24v,dc.

also what would be the best way to do the outputs? Again, i need to go from 5v to 24. I thought about relay boards from ebay. Is there an easier way?

I would ideally like to encapsulate everything and just have a 25 pin D-sub connector to the terminal strip due to washdown conditions. They would like 5 PLC's, 1 and 4 backups ( i guess they figure that by the time those would be used up they will get rid of it for scrap) I have to pay for the prototype (will be re-embersed if it works) and then they will pay for all the parts for the other 4 so I need cheap, yet reliable electronics. Any ideas on how to make sure the system never sees 24v where its not supposed to would also be deeply appreciated.

Thanks all,
F
If you replicate the Picaxe programming circuit (22K current limit, 10K pulldown, Schottky snubber) at each input you should be fine to well over 24 volts. For the outputs, not enough info. Logic level MOSFETS?
 

lbenson

Senior Member
If you are trying to determine 24V or 0V on various Picaxe inputs, you could use voltage dividers, or optoisolators like the 4N25 (there may be newer, better parts). I'm not sure why 78L05s would be simpler.

What are your inputs and outputs?
 

premelec

Senior Member
@buntay What are the PLCs connected to? That could be more of an issue than input 1/5 voltage divider [ca. 47k to 10 K for instance]... Isolation often a good idea but overall circuit and nature of loads needs to be considered. Particularly inductive loads can zap you. What outputs does the existing PLC use? Relays?
 

buntay

Senior Member
If you are trying to determine 24V or 0V on various Picaxe inputs, you could use voltage dividers, or optoisolators like the 4N25 (there may be newer, better parts). I'm not sure why 78L05s would be simpler
I am trying to make it as robust as possible. my thought was that by using the 78's was that it would be my best assurance that if I would get any >24v spikes or brown outs I would still have my 5v input.

If you replicate the Picaxe programming circuit (22K current limit, 10K pulldown, Schottky snubber) at each input you should be fine to well over 24 volts. For the outputs, not enough info. Logic level MOSFETS?
Yes I would prefer to use solid state devices for the outputs, they will be controlling 24v coils for air solenoids on a manifold. I would also know if mosfets (or the similar) is a safe way to prevent 24v from getting back to the output pins of the picaxe.
 

premelec

Senior Member
what CURRENT to solenoids? In short how much power are you switching at 24VDC? What's this about brownouts? The PICAXE power supply should be well regulated but the inputs can have a lot of droop without effect.
 

Buzby

Senior Member
Hi buntay,

Building the equivalent of a PLC by using a PICAXE needs a lot more than just a few components and a bit of code.

PLCs are built to industrial standards, and are modular for easy and quick repair. Nobody wants to be soldering onsite !.
Using off-the-shelf solid state I/O modules for both input and output is the cleanest way to achieve both these requirements.

Boards like the G4PB16H take 16 IO modules ( inputs and outputs ) and interface to your PICAXE either by 16 digital connections, or by a serial line, which is usually better as it provides diagnostics as well as significantly less wiring..

Using any custom parts ( such as home brew IO ) does not lend itself to rapid onsite repairs, best to use a ready built PICAXE board and commercially available serial IO.

To complete your 'PICAXE PLC' you will need to equally robust software, with such things as watchdog timer and diagnostics.

Good luck !,

Buzby
 

Dartmoor

Member
I am no expert - but here's my view anyway!
As lbenson says, opto-isolators would seem best for the inputs. Easy, affordable & reliable.

Perhaps 2803 darlington chips (or MOSFETS) for the outputs. That depends on the current, as premelec says. The 2803 can handle 24v, has diode protection built in and two darlington arrays can be wired in parallel from one picaxe o/p (as per picaxe manual). Your reference to a "25 pin D-sub connector" suggests that the output current is probably not very high?

You should be able to write the code to be robust. Most important is to make sure nothing unsafe/costly happens if the picaxe gets reset by a spike &/or break in power supply.

I would also use a more substantial power source for the picaxe than a 7805.

Buzby's comment "Nobody wants to be soldering onsite !." is probably irrelevant since you mention "encapsulate everything and just have a 25 pin D-sub connector" and "They would like 5 PLC's, 1 and 4 backups . . ."?

No guarentee I am right, but hope it helps & good luck!
 

Goeytex

Senior Member
What does the system do? How critical is downtime? What is the budget?

In a commercial/production environment where downtime costs significant $$$, I would take the approach offered by Buzby. It may be more expensive in initial cost, but that cost (NRE/ Non Recurring Expense) will offset by robustness and ease of repair. With spares on hand, downtime will be minimal and $$$ saved.

However, if the bosses are cheapskates and won't provide an adequate budget for a top quality system then you will need to compromise. I would stay away from Ebay relay stuff or at least consider the specified lifetime of the relays. Solid state switches do not wear out.

Edit: I re-read the initial post and see that you are required to pay for the initial prototype and will only be reimbursed if it works. This is a REALLY BAD "contract" that I would decline. If you do not have the financial resources to provide a commercial quality system and "cheap" is the main specification then this will likely come back to bite you.

Edit2: Perhaps you could approach the bosses and propose a "shared risk" arrangement where the company puts up the money or at least 50% of the money for the prototyping hardware, while you mainly provide your time and expertise. As it is, the company is asking you to take 100% of the risk. Seems rather cheesy of them. If they are not willing to share any of the risk, then my rate would double.

I might also consider putting a 'time bomb' in the working prototype code where it stops working after a certain amount of time or a certain number of power on cycles. This can be disabled AFTER you get paid. I certainly would not provide any code until payment was made. I would be very careful with any company that is not willing to fund a prototype.
 
Last edited:

geoff07

Senior Member
If the circumstances won't let you use commercial equipment with all that implies in terms of reliability and maintainability, and assuming there is no safety-critical element, then I would use opto for both input and output. Digital inputs via opto are simple enough, with a pull up and the opto pulling down the input when illuminated. For outputs I would use opto to trigger a mosfet to turn on a 24v relay. I would keep 24v entirely off the Picaxe pcb, with opto as the interface to the board. Then I would program it very carefully with testing in mind, and document the whole thing very thoroughly.

If they are going to pay if it all works then you don't want cheap, you want good.
 

Buzby

Senior Member
25 pin D-Sub to the terminals ?

Please post a few pictures of the existing control system, then we might have some better idea as to what might be a good replacement.
 

rossko57

Senior Member
I have been commissioned to ... that the company doesnt even have the program for one even if we found a plc.
You may know much more about it than you are telling us (as its not relevent to your original hardware questions)
... but ...

Presumably, this black box controls some sequence of events in a production process, with input from switch/sensors, and with safety interlocks etc.
Do you have any idea or written description of what it does now? Simple observation may not be enough - is it important if that solenoid is on for 1.0 or 1.5 seconds? What is supposed to happen under this fault condition or with that unexpected input?
If you cannot flowchart the thing, is pointless worrying about hardware.

From a business viewpoint, I would concur that they are taking the mickey expecting you to fund a prototype. (Unless you are expecting to make a fortune selling to others as well!)
 
Top