Printable Version | Subscribe | Add to Favourites
New Topic New Poll New Reply
Author: Subject: Calling all electronics genius's
Noodle

posted on 26/8/04 at 12:48 PM Reply With Quote
Calling all electronics genius's

I've been looking at doing some analogue to digital conversions from some small voltages (0-12v DC) to a PC or Palm serial port.

Many years ago I did something similar with a MAX232 IC, but I have pretty much forgetton everything I once new.

The thing is, I want the circuit to be multiplexed so I can sample many different voltages (up to 12 at an 8 bit resolution would be ample). So I would send a bit to enable device one, read contents, send a bit to enable device two, read contents, etc etc.

I'd write the software myself in C when I've scraped off my coding rust

So I suppose my question's two-fold:
i) Am I talking out of my hat?
ii) Does anyone where I can get a circuit design from or anyone who'd design me one?

Cheers,

Neil.





Your sort make me sick

View User's Profile Visit User's Homepage View All Posts By User U2U Member
ceebmoj

posted on 26/8/04 at 12:55 PM Reply With Quote
if you dont mind the using a pic then I have just the thing for you combining a 16f877 and a max 232 and you have a circuit that would be ample for youer needs.

ther are lots of other ways of doing it ovbviosly.

Blake

View User's Profile Visit User's Homepage View All Posts By User U2U Member
Noodle

posted on 26/8/04 at 01:07 PM Reply With Quote
Blake,

Tell me more! (In English )

Neil.





Your sort make me sick

View User's Profile Visit User's Homepage View All Posts By User U2U Member
ceebmoj

posted on 26/8/04 at 01:50 PM Reply With Quote
Hi,

Ok I have fired up the spellchecker.

well if you look up the microchip website (www.microchip.com) and look at the PIC range you will see that they are basically a processor memory and bunch of peripheral devices on a chip the 16f87X range I picked because I use them reasonably regularly

they operate at 20mhz or slower have a serial port, A to D and a whole host of other peripherals.

The below assumed you are using a 16f877 on a 20mhz clock speed (you can run it slower if power consumption in an issue however in a car there will be absolutely know problem as even at 20 mhz you will be drawing less than .5 amps)

So to knock up your application you will need the circuit to interface the analog signal on to the pins of the PIC (port A pin 2 to 8). A 20 mhz crystal and two capacitors to complete that part of the circuit (I can not remember any more pin number of the top of my head as I have been at the pub). Then a max232 (or equivalent) and associated charge pump capacitors. Finally a voltage regulator. So the whole lot can be put together with 2 ic’s 9 capacitors 1 crystal and 1 voltage regulator.

Finally you will need a small amount of firm where to decode the requests over the com port so that each of the 8 pins with an analog signal can be read back and transmitted over the com port to your device.

As for cost if you build it your self you can request a free sample of the pics from the web sight up to 3 of each type and 15 in total every month.

Blake

View User's Profile Visit User's Homepage View All Posts By User U2U Member
Noodle

posted on 26/8/04 at 02:31 PM Reply With Quote
OK, I'm starting to understand what you say.

The jibe about English was not a criticism of the written word, just asking you to describe you to describe any ideas in layman's terms. Apologies if I was misunderstood.

Reading the technical spec for the the 16f877 (now superceded by the 16f877A), I might as well be reading Chinese.

I circuit diagram I can build would be very useful. If you've anything like that I'd be most appreciative.

Cheers,

Neil.

p.s. Wish I'd been in the pub





Your sort make me sick

View User's Profile Visit User's Homepage View All Posts By User U2U Member
ceebmoj

posted on 26/8/04 at 02:49 PM Reply With Quote
Ok I will knock up a circuit diagram to night for you and post it on hear that way other people can spot the deliberate mistakes ;-).

As for the 16f877A there are not many differences if I remember correctly just the block size that is written to so you use a new version of the boot loader (assuming you are using a boot loader and as you have a serial port you might as well). There are a couple of other differences but I can remember what they are and I only have the A manual to hand (not that I look at them much).

Any way I will post the diagram in my photo archive by 8 to night with any luck

View User's Profile Visit User's Homepage View All Posts By User U2U Member
ceebmoj

posted on 26/8/04 at 04:58 PM Reply With Quote
ok it is now in my photoarchive
View User's Profile Visit User's Homepage View All Posts By User U2U Member
ChrisW

posted on 27/8/04 at 06:44 PM Reply With Quote
Was going to suggest the 877 too but looks like I've been beaten to it

Not sure I like your reset system though!

Chris





My gaff my rules

View User's Profile E-Mail User Visit User's Homepage View All Posts By User U2U Member
ceebmoj

posted on 28/8/04 at 07:57 PM Reply With Quote
well how about you sugest one? looking at the diagrem I did not realise that I had left the switch in as i did it in pant qicky (I had also been at the pub)
View User's Profile Visit User's Homepage View All Posts By User U2U Member
Noodle

posted on 29/8/04 at 08:47 AM Reply With Quote
Thanks for the diagram Blake. I've been looking into these PIC things since you pointed at them and it looks like another avenue of knowledge I'm eager to learn.

I can understand the IC connections, but why capacitors are placed where they are, or their ratings are what they are is beyond me at present.

Chris, do you regard the reset at too violent? What would you recommend instead?

Cheers,

Neil.





Your sort make me sick

View User's Profile Visit User's Homepage View All Posts By User U2U Member
ceebmoj

posted on 30/8/04 at 08:34 PM Reply With Quote
at a gues the problem isI am kinkinf the supply and the ground witch is not realy all that clever I will do a beter reset on / tusday some time.

the cpacitors on the circuit are quite simple realy the ones round the max 232 are just thoes on the dater sheat and are ther as a charge pump.

the two on supply are just ther to give a more stable supply.

blake

ps for a reset you could use a switch do discovet the supply for the pic and also conect the conections to ground so that ther is no direct path from + to ground.

blake

View User's Profile Visit User's Homepage View All Posts By User U2U Member
MikeRJ

posted on 13/9/04 at 02:42 PM Reply With Quote
If you need help with PIC's, it's what I do for a living (when not posting on here ).

If you really need a reset switch, then you simply connect a suitable value resistor (10k is fine) from MCLR to Vdd (+5 volts), and connect your reset switch from MCLR to Vss (i.e. ground). Don't be tempted to add a large value cap from MCLR to Vss as used to be common practice, this can destroy the PIC when you remove the supply voltage.

The PIC has built in brownout detection, so complex external reset circuits are rarely needed.

View User's Profile View All Posts By User U2U Member
ChrisW

posted on 13/9/04 at 07:52 PM Reply With Quote
Sorry, just noticed this post again.

Shorting out the supply line isn't a great idea to reset the system, even if the reg does have short circuit protection. Pulling MCLR to ground (with a pull up to +v) is a much better idea and less prone to stressing the power supply.

Chris





My gaff my rules

View User's Profile E-Mail User Visit User's Homepage View All Posts By User U2U Member
Northy

posted on 13/9/04 at 08:15 PM Reply With Quote
quote:
Originally posted by MikeRJ
If you need help with PIC's, it's what I do for a living (when not posting on here ).



Snap!

Please put a proper reset circuit in there....





Graham


Website under construction. Help greatfully received as I don't really know what I'm doing!


"If a man says something in the woods and there are no women there, is he still wrong?"

Built 2L 8 Valve Vx Powered Avon

View User's Profile E-Mail User Visit User's Homepage View All Posts By User U2U Member

New Topic New Poll New Reply


go to top






Website design and SEO by Studio Montage

All content © 2001-16 LocostBuilders. Reproduction prohibited
Opinions expressed in public posts are those of the author and do not necessarily represent
the views of other users or any member of the LocostBuilders team.
Running XMB 1.8 Partagium [© 2002 XMB Group] on Apache under CentOS Linux
Founded, built and operated by ChrisW.