Pic program

Thread Starter

ConradH

Joined Oct 5, 2010
7
Can anyone out there please program a PIC/AVR/ for me. I obviously will provide full details later on , but the basic outline is a stand-alone sequential relay switchbox (1-16) with single input trigger. There are some delays involved as well.

ConradH
 

tom66

Joined May 9, 2009
2,595
Can anyone out there please program a PIC/AVR/ for me. I obviously will provide full details later on , but the basic outline is a stand-alone sequential relay switchbox (1-16) with single input trigger. There are some delays involved as well.

ConradH
I can program a PIC and now an AVR (recently got an AVRISP programmer.) However, it's going to be far better sending your code to Microchip who will program chips for you and ship them to you.
 

ke5nnt

Joined Mar 1, 2009
384
Are you wanting someone to actually write the code for you, or do you have code and just need it flashed into the PIC?
 

Thread Starter

ConradH

Joined Oct 5, 2010
7
Hi all

Thank you very much for the response. To answer the questions. I am from South Africa and need a programmed chip in a working circuit. I do have access to various CAD programs, so component layout etc. is not yet requiered (but if you insist).

Just to add - our ROE makes using the bigger companies quite prohibitive.

60 Euro equates to approx R750.00 excluding bank charges and that is enough to put a damper on any project.

Cheers

Conrad
 

retched

Joined Dec 5, 2009
5,207
Tell us what you need friend, then me can help.

Is this something you dont want to talk about in the open?

If not, let it be known, and get your answer.

I do not have a problem programming a chip and sending it to you, others will also.

You pay for the uC, the shipping and a sandwich ;)

Do you have any idea what uC you want to use?

If you need the coding done, and you need a micro to take an input and convert that to 16 outputs (to close relays I am guessing) that is not too difficult.

Adding additional delays (from as short as a microsecond or so) is also not difficult.

What is the shortest and longest delay you will need?

For the coding, you will have to upgrade the sandwich to a lunch. ;)
 

Thread Starter

ConradH

Joined Oct 5, 2010
7
Hi everyone

No, there is nothing "secret" about the project. The aim here is to synchronize the probe-arm of an autosampler (scientific instrument) with the switching of solenoids. The arm - via its own software - selects a sample and send it to the instrument to get analyzed. The idea is to monitor up to 16 sample lines repetitively and in sequence (important). My first circuit used a microswitch to select the solenoid (as trigger) and with some gates complete the sequence (4017). Together with 555 timers I managed to get it to work quite well, but it was very cumbersome. I am also now limited to the amount of reset inputs for synchronization as I do not want to rebuild the whole circuit. If it easier for you guys out there, a trial program will work for now, as I can then provide input in the final outcome before the final flash.
Has anybody heard of "modbus"?. It is used in some PLC circuits. The one manufacturer ( Adam? ) uses it in its external IO boards. They have a very nice unit available which have a processor ( 8051 ), input lines, serial port and relays on board. If it makes things easier, we can go that direction as well

Thank for all the interest.

Conrad
 

thatoneguy

Joined Feb 19, 2009
6,359
So you need to poll the logic level of 16 lines, and have 16 outputs?

What are the timing requirements and voltage levels for each of the inputs and outputs?

This is pretty straightforward if it isn't a Mhz level clock, it could be done with a 20 pin PIC using 4-1 Logic ICs for more I/O. Speed is sacrificed, but if it is a simple:
"poll input, if x, set output y if true/false, else poll next input" thing with kHz polling requirements, it would suffice, and the program would be fairly simple to write.

Debugging might be an issue, though, without more information.
 

Thread Starter

ConradH

Joined Oct 5, 2010
7
Looking at the formula is the exact reason why I am asking that somebody else do this for me.


The input trigger is a micro/opto switch at 5volt dc. To make things easier the output level can be logic high, as I would then just use a driver cct afterwards. I want the outputlines to be user adjustable for up to 16 lines. What about a bcd thumbwheels switch, or a bank of dipswitches? somewhere in the dataline inputs??
If possible I would like the output delays to be adjustable as well. i.e the solonoid staying switched for this set time
Dipswitces/bcd thumbwheels or pot in delays of about 10 secs to 2 mins?
The accuracy is not that critical (5%), so I would assume Khz polling would be good enough.
I am trying to get a flow chart going (EXCEL) and would send it on if requiered.

Conrad

As I described in previously, I have built the circuit using gates and 555 timers, but it really is cumbersome.
 

tom66

Joined May 9, 2009
2,595
The accuracy is not that critical (5%), so I would assume Khz polling would be good enough.
Accuracy doesn't have anything to do with the polling frequency. The polling frequency of a few kHz would be sufficient for slow changing inputs.

Do you have an oscilloscope? It won't be crucial, but will make debugging much easier.
 

thatoneguy

Joined Feb 19, 2009
6,359
Conrad correct me if I misunderstood:

16 inputs (TTL @ 5 Volts dc)

16 relays with clean contacts (Com; No + Nc)

Each relay will be activate when the corresponding input is triggered high (or low, to be decided).

Each relay will be de-activated when corresponding input goes low (or high) + the setted time delay (10 secs to 2 mins for the each relay)

Since it will be too costly to use 16 pots for setting the time delay then delays in my project will be set via serial port (RS232) with a dedicated windows program.

Circuit professionaly assembled and wired on a veroboard.

Board working @ 12 Volts dc min required 1.5 - 2 Amps (no PS supplied)

If you like it we can make the deal.

Cheers

Alberto
This sounds like the best deal you will find so far, ConradH!

For varying the number of I/O, you could simply leave the unused inputs tied to +5V or GND (Depending on high or low logic), and ignore the extra outputs, as they wouldn't change. This is assuming that looking at each input only 1000-2000 times per second is fast enough.

Having the delays software configurable as above, as well as number of active I/O through a dedicated PC Program, as mentioned in the post by Alberto, would seem to solve any of he debugging issues I had.
 

Thread Starter

ConradH

Joined Oct 5, 2010
7
Hi Guys

No, it is 1 input (trigger), with up to 16 sequentially switched outputs (current ic mc 4017) The trigger input is about 5 minutes apart, with the switched relay on for that predetermined adjustable time. When the sequence is complete it must start again with relay 1
 
Top