Timer Circuits or PIC

--
Copying to notepad won\'t help...

If this is what you mean:

             
       t0-->|_                     t0-->|_
Trigger  ___| |_________________..._____| |_____________________
     ____                             __________________________
InZ  ____|______________________...__|
             _______________                           
A  _________|               |___..._____________________________
            ||                            
                                         _______________
B  _____________________________..._____|               |_______
                                        ||   
                 ___                        ___
C  _____________|   |___________...________|   |________________
       2s-->|   ||   ||   ||   |So what is the best way of implementing this. Should I use a combination of 
>timer circuits to do this but with having 5 of these it would become a mass 
>of timer circuits. Alternatively I could program a PIC or PICs do to this (I 
>have never done PIC programming - well other than some traffic light thing 
>during electronics at Uni, but should be able to pick it up as I am a 
>programmer/tester by day)
Reply to
John Fields
Loading thread data ...

I am working on a project where I am going to be controlling a number of rams. These are triggered using solenoids. I am trying to work out the best method of controlling these. The whole setup will have 5 instances of the setup described below (this may effect how you suggest doing this). I am working in a environment with a supply voltage of +12v.

I have a single pulse trigger which I need to subsequently operate 2 outputs using delays using a 2nd input to decided what to trigger. In Summary.

Trigger input pulses High If Input Z if ground Then Output A must go high for X (approx 5-10) seconds & Output C must delay for X (probably 2), then high for X seconds (probably 2) else Output B must go high for X (approx 5-10) seconds & Output C must delay for X (probably 2), then high for X seconds (probably 2) end else

or pictorally

Trigger ___|-|_______________________ InZ _____________________________ A ____|-------------------|____ B _____________________________ C __________|--|_______________

OR

Trigger ___|-|_______________________ InZ ----------------------------- A _____________________________ B ____|-------------------|____ C __________|--|_______________

(Copy above to notepad if it displays incorrectly)

So what is the best way of implementing this. Should I use a combination of timer circuits to do this but with having 5 of these it would become a mass of timer circuits. Alternatively I could program a PIC or PICs do to this (I have never done PIC programming - well other than some traffic light thing during electronics at Uni, but should be able to pick it up as I am a programmer/tester by day)

Cheers for any advice

Rob

Reply to
Rob Convery

I agree strongly with John. Even if the hardware did not present such a compelling case, I still think a micro-controller would be better in this case, based on your requirements. They included the terms "approx" and "probably" 6 times, indicating there is some possible variability in what you need to do.

Ed

Reply to
ehsjr

Your use of the word "ram" conjures visions of maiming or other destruction when things go horribly wrong. Might want to invest in some position sensors, watchdog timers and maybe even external solenoid drive gates in case the processor goes horribly wrong. A cap on the gate function of a solenoid driver kicked by a watchdog timer gives you two levels of protection. PIC lends itself well to including these safety featurs at virtually no extra cost or complexity. Writing the code forces you to think about what might go wrong and what might be done to minimize the destruction. mike

--
Return address is VALID but some sites block emails
with links.  Delete this sig when replying.
.
Wanted, PCMCIA SCSI Card for HP m820 CDRW.
FS 500MHz Tek DSOscilloscope TDS540 Make Offer
Wanted 12" LCD for Compaq Armada 7770MT.
Bunch of stuff For Sale and Wanted at the link below.
MAKE THE OBVIOUS CHANGES TO THE LINK
http://www.geocities.com/SiliconValley/Monitor/4710/
Reply to
mike

"Rob Convery" schreef in bericht news: snipped-for-privacy@individual.net...

___ Trigger ______| |___________________________

InZ _______________________________________

______________________ A _______| |________

B ________________________________________

______ C __________________| |______________

__________ Chelp ________| |_____________________

Redraw (part of) your pulse diagrams to make sure I understand what you want to achieve. A circuit that behaves like this can be build using two dual monostable ICs like the old CD4098B or the CD4538B along with four Rs and four Cs for the timing and one inverter. One IC should be used to make the A- and the B-pulse. Connect the TR+ inputs to the Trigger, one TR- input to InZ and the other TR- input to the inverted InZ. The second IC can make the C-pulse. One monostable (making Chelp) is triggered by the raising edge Trigger, the second is triggered by the falling edge of the first. If the circuit is one of a kind *and* you have plenty of space for the components

*and* you have neither the skills nor the equipment to program PICs this is the way to go. But in all other cases I'd prefer an eight pins PIC (or a collegue, a tiny AVR) to do the job. Keep in mind that a PIC requires 5V (common types) power. Which means an 7805 and two caps. PICs also do not like pulse >5V on their inputs so you may need a voltage divider for both inputs. You will also need output transistors as neither the monostables nor the micros are able te drive a solenoid.

petrus bitbyter

Reply to
petrus bitbyter

--
I don\'t do PICs because I like Motorola (Freescale) better, but this
will get you going if you want to use Microchip\'s stuff...

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=64

Also, some of the other guys around here and on sed use PIC\'s so
maybe you\'ll get some info from them. 

Then there are also the comp.arch.embedded newsgroups.
Reply to
John Fields

Thanks - I suspected so. Now the nest question. As I have not done PIC progamming since uni what is the easiest way to get into this? Is there a decent kit out there etc? Also any specif place for support i.e. newgroups/forums?

Cheers

Rob

Reply to
Rob Convery

If you're comfortable with assembly language programming, maplab will do what you need for free. There are also several other free or cheap programming environments. But if this is your job and your boss cares about your efficiency, go buy PIC Basic Pro. It turns fairly complex situations into simple statements and can dramatically reduce your error rate.

Use a 16F877A 40-pin dip. Download a free bootloader. Once you get the serial port hooked up, you'll be able to modify the program and be back testing it in seconds. The serial port connection comes in very handy to report real-time status of your system. You only need the PIC programmer to install the bootloader the first time. After you get it all debugged, you can think about switching to a smaller part, but it's probably not worth the effort unless you wanna make thousands...or the big chip won't fit in the box. There are newer parts, but then you gotta go find newer tools...

I've made a lot of assumptions about what you're doing and made recommendations on what I KNOW works. You'll get lots of arguments over individual pieces, but you need a system that works. YMMV

Email me if you wanna discuss further. mike

--
Return address is VALID but some sites block emails
with links.  Delete this sig when replying.
.
Wanted, PCMCIA SCSI Card for HP m820 CDRW.
FS 500MHz Tek DSOscilloscope TDS540 Make Offer
Wanted 12" LCD for Compaq Armada 7770MT.
Bunch of stuff For Sale and Wanted at the link below.
MAKE THE OBVIOUS CHANGES TO THE LINK
http://www.geocities.com/SiliconValley/Monitor/4710/
Reply to
mike

A PIC-AXE (Google it) is by far the easiest way to program a micro. No harwdare needed and it uses simple commands in BASIC. A PIC-AXE is a regular PIC chip with a BASIC interpreter pre-programmed into it. So you don't need to know anything about the PIC architecture in order to program it. They are CHEAP too. A PIC-BASIC Pro compiler with the PIC hardware programmer is more complicated than a PIC-AXE.

BASIC-Stamps are similar but are a more expensive "module" solution. PIC-AXE kills it for an apllication like this.

Dave :)

Reply to
David L. Jones

John gave you the link to the microchip site, but here's a sample of what's out there:

formatting link

I've also download their MPLAB IDE package, although I haven't got too heavily into it yet.

Have Fun! Rich

Reply to
Rich Grise

use a PLC :)

...

if you know PIC assembler (or programming and any assember) it shouldn't be a tough task to implement each on a separate microcontroller

if you want to make it a tougher task implement all 5 on a single chip :)

Bye. Jasen

Reply to
Jasen Betts

There's comp.sys.embedded but I stopped reading that as *.electronics.* is keeping me busy enough.

as for hardware any serious electronics store (amy many hobbiest electronics stores) will have development kits of some kind. there's plenty of software out there on the internet.

Bye. Jasen

Reply to
Jasen Betts

I would suggest using a PICAXE rather than a PIC - they are just as cheap, but the mfg provides a free programmer which allows you to program in BASIC on a Windows box, and you only need a simple Serial port lead and two resistors to enable on board downloading. And of course there is lots of free stuff on the web to get you started

They also have a number of development boards, kits etc

As a starting point have a look at

formatting link
- you will find other links there as well

David

mike wrote:

Reply to
quietguy

Oh, yeah, sounds great, except for the "step-by-step" instructions:

formatting link

Step 1, select a chip, Step 2, write the program, Step 3, connect the cable directly to the project board...

Wait a minute? Where did this "project board" come from????

Thanks, Rich

Reply to
Rich Grise

It appears as soon as the right amount of money disappears?

;)

Jon

Reply to
Jonathan Kirwan

The project board can be one they sell, or you just use some veroboard etc or any project type board you may have. Depending on the PICAXE you buy - eg 8 pin, 18 pin etc, the board needs to have a socket for the PICAXE, 2 resistors (serial input for programming) , and the usual provision for connecting a 5volt supply. Plus of course you might want some leds etc to play with. You also need to make up or buy a lead - serial (RS232) plug one end, perhaps a 3.5mm stereo plug the other end - so you can program the PICAXE

I gather you thought it was some expensive rip off thing, but that isn't the case. I did buy a (18X) project board, but am also making another one from a small piece of veroboard for the 08M PICAXE (A$4.95) to make a musical toy for my grandson.

David

Rich Grise wrote:

Reply to
quietguy

I've got the serial cable, a protoboard (The white rectangular one with the strips of plug-in contacts), and a supply - are you saying that I can plug in the chip, power it, two resistors, and plug in the serial port, and I'm ready to go? That'd be kewl. Where's the schematic for this arrangement?

Thanks, Rich

Reply to
Rich Grise

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.