Forums

Components Bin, Power Supply, & General Electronics

Started by Extrarius September 6, 2004
I posted mostly the same questions to sci.electronics and exactly the
same questions to c.a.e.piclist, but received no reply after several
days, so I'm posting it here in the hopes that people here will be
more able to help:

I'm new to electronics in that I've never actually built anything
before (I know the basic theory/forumals though, and have drawn up
schematics, etc, but I've never actually built anything), and recently
I have become interested in electronics as it applies to
microcontrollers.

I'm fairly certain I'll have no problems with the microcontrollers
themselves(the PIC12F675, PIC16F877A, and PIC18LF4539 for now) since
I've done assembly programming on several platforms before and the
data sheets from microchip seem to be very complete with respect to
programming. However, the electronics part is giving me some problems.

I want to do many random projects, but I'd like to work toward making
an NES-level game by both assembling the hardware and programming the
software myself. I don't mind using several PICs as 'dedicated cpus',
since I know things like sound processing and video processing might
be difficult to do in the middle of such a 'processor intensive'(for
PICs) game's code.

My primary problem is that I don't have any parts at all since I've
just become interested in electronics. I do have the extreme basics -
some assorted resistors, LEDs, a multimeter, and some wire. I need
some help figuring out what other components I'll need to do general
tinkering with PIC-based circuits.

I know I'll need a PIC programmer, but I'd rather not buy one of the
$100+ programmers. I do want one that works on multiple chips, so I'm
thinking about the $13 "Serial Port Programmer - Socketed" from
www.sparkfun.com. Is that a good choice for a <$50 programmer?

I'm guessing that for simple projects, I'll probably need some
capacitors(of various values - which ones are common in digital
circuits?), some transistors, maybe some more resistors, maybe an LCD
display for graphical output, some resonators/crystals to drive the
chips, and maybe some various other ICs(like what? perhaps a
multiplexer, maybe some 555 timer chips, anything else?).

I'm also fairly certain that I'll need a breadboard, since I don't
want to solder every little thing for each minute change. Again, I'd
rather not spend too much, so I'm looking at part # 383-K326 from
Mouser.com. It doesn't have a power supply since those with them are
too expensive, and seperate power supply units are extremely expensive
as well, but is it a good choice other than that? Since it lacks
power, I'm looking into 'building' a power supply using an AC Adapter
(or rechargable NiMH batteries, but they cost much more), but really
I'm not sure how I do that.

It seems that my options are to either get an AC Adapter rated to
output exactly the voltage level and max current level(not sure what
this number would be) I'd need OR to get one that outputs more of both
than I need and then get a voltage and current regulator (I'm hoping
this would help deal with minor spikes/dips, would it?). Either way
I'd need whatever kind of socket it plugs into to wire to the
breadboard, right? And for the regulation, I'd need the parts listed
on the data sheet to build both the current and voltage regulators
(the chip I found performs only one function at a time, so I'd need
two). Is this the proper way to go about it?

From the PICs data sheets, the desired volage is 4.2V to 5.5V with a
desired 10mA if I'm reading it correctly, but I'm not complete sure I
am (they're on microchip.com if you'd like to look and help me with
this).


In summary, I'm looking for any good pointers/ information/ resources/
books/ websites/ etc on what inexpensive parts are good to have when
tinkering with PIC-based circuits, on how to build an inexpensive
power supply for such projects, and any other general information on
electronics/digital circuits that you think is important.

PS: If you reply via electronic mail, include "comp.arch.embedded"
(with or without the quotes) in the subject or it will get filtered to
the trash.
> I want to do many random projects, but I'd like to work toward making > an NES-level game by both assembling the hardware and programming the
Interesting idea. Most of the difficult work in this will be generating the tiles and sprites, and collision detection. This would be considerably easier to implement in programmable logic (FPGA) than on a PIC, IMHO. And on the PIC you have irritating memory addressing limits. I'd suggest you start with something substantially less ambitious than a NES-alike, though. Maybe a Pong-alike (which has been done in a PIC, BTW). Later, work your way up to emulating those multi-game ASICs AY-3-8500 and AY-3-8610A (search google to see what I mean). I'm told these chips were really masked, customized PICs anyway (though I don't 100% believe it).
> some assorted resistors, LEDs, a multimeter, and some wire. I need > some help figuring out what other components I'll need to do general > tinkering with PIC-based circuits.
For the _extremely_ complex waveforms you will be working with in this project, a scope is mandatory equipment. It doesn't have to be high-end - 20-40MHz would be adequate. Storage capability is exceedingly useful. I use a Tektronix TDS210 for these sorts of low-speed circuits.
> capacitors(of various values - which ones are common in digital > circuits?),
Your proposed circuit isn't digital, though - it's mixed-signal (unless you were planning to drive a TTL monitor and you don't want sound). There are kits available from Digi-Key, All Electronics (cheaper), Jameco, et al. I've been in your sort of position a few times (had to throw away all my component stash due to moving house) and I handled it by designing my next project on paper first, then ordering a 10x oversupply of the passives I'd calculated on paper, as well as two steps either side of the calculated value. Given the tiny cost of these parts, it's not much of an investment. A tube of op-amps is always useful to have, I keep LM358s lying around for random experiments. You'll probably also, for your specific project, want an audio power amp - the LM386 is the hobbyist's friend. I don't immediately see why you'd need 555s, but there are many fun circuits you can build around them, it can't hurt to buy some. By the way, look on eBay for components. For example "resistor kit" and "capacitor kit". LOTS of prototyping material there.
> as well, but is it a good choice other than that? Since it lacks > power, I'm looking into 'building' a power supply using an AC Adapter > (or rechargable NiMH batteries, but they cost much more), but really
You need a smoothed, regulated, adjustable current-limited power supply, preferably with integral voltage and current meters so you don't have to probe everywhere with your multimeter. Something like a BK Precision 1610A would be suitable. If you want to build your own, search google for "bench power supply schematic" and be selective. For instance, <http://my.integritynet.com.au/purdic/power4.htm> is voltage-adjustable but not current-limited. If you like to live dangerously...
larwe@larwe.com (Lewin A.R.W. Edwards) wrote in message news:<608b6569.0409070701.6d404964@posting.google.com>...
> [...] This would be considerably easier to implement in programmable > logic (FPGA) than on a PIC, IMHO. [...]
Perhaps, but I've found MUCH, MUCH more information on PICs, and they are much closer to what I already know (I've done tons of normal PC programming as well as assembly for the Z80 and 68k, which from what I've seen is quite a bit closer to PIC assembly than the hardware design languages for FPGAs). Perhaps if you know of some good resources on FPGAs I could look into them more.
> [...]I'd suggest you start with something substantially less > ambitious than a NES-alike, though.[...]
I'm not starting with a 'NES-alike', I just want to work toward that. By that, I mean I want to eventually learn through smaller projects all that I'd need to create that kind of game.
> [...]For the _extremely_ complex waveforms you will be working > with in this project, a scope is mandatory equipment.[...]
Unfortunately, even the inexpensive scopes I can find are out of my range for now. I just don't want to spend much on this yet since I'm not sure I'm really going to dig in deep. Maybe if the low-end projects get me hooked I'll shell out for the fancy(even a low end scope is such IMO) equipment. I'll do TV signals last, probably B&W first as demonstrated by several sites out there.
> [...]There are kits available from Digi-Key, All Electronics > (cheaper), Jameco, et al. I've been in your sort of position a few > times (had to throw away all my component stash due to moving house) > and I handled it by designing my next project on paper first, then > ordering a 10x oversupply of the passives I'd calculated on paper, as > well as two steps either side of the calculated value. Given the tiny > cost of these parts, it's not much of an investment.[...]
That sounds like a good idea, but really its been so long since I did any kind of electronics at all (the little bit I did in my physics class) that I'm not sure I could design something on paper. At the very least I'd need a good book on it or somesuch, and that was part of the reason for this post (to find a good book on electronics in general and digital or analog specifically)
> [...]A tube of op-amps is always useful to have, I keep LM358s lying > around for random experiments. You'll probably also, for your > specific project, want an audio power amp - the LM386 is the > hobbyist's friend. I don't immediately see why you'd need 555s, > but there are many fun circuits you can build around them, it can't > hurt to buy some.[...]
What are op-amps used for? Obviously they amplify something, but I thought they were only used to boost audio output or the like?
> [...]By the way, look on eBay for components. For example > "resistor kit" and "capacitor kit". LOTS of prototyping > material there.[...]
I did so for capacitors, and the only inexpensive results were from a uk website selling kits. The shipping isn't too bad either. The only thing that sticks out to me is that the voltage ratings are much higher than I'd need(63V when I'm using 5V). Does that really make a difference as long as it is high enough? I'm remebering less than I thought I would about basic electronics.
> [...]You need a smoothed, regulated, adjustable current-limited power > supply, preferably with integral voltage and current meters so you > don't have to probe everywhere with your multimeter. Something like a > BK Precision 1610A would be suitable. > > If you want to build your own, search google for "bench power supply > schematic" and be selective. > [...]If you like to live dangerously...[...]
It isn't that I want to build my own really, its just that I'm not willing to spend that much on something I might not stick with. Also, I don't need something so complex as being adjustable(as in knobs and buttons) etc, because I don't mind having to set up a different circuit on the breadboard to control a simple plugin AC adapter or the like.
> Perhaps, but I've found MUCH, MUCH more information on PICs, and they > are much closer to what I already know (I've done tons of normal PC > programming as well as assembly for the Z80 and 68k, which from what
Implementing this kind of thing in software on a PIC is a real pain in the ass. It's best implemented as hardware logic. Your choice - wire together hundreds of gates, counters and so on by hand, or draw the schematic in a CPLD/FPGA design tool and have it generate the right upload file for you. I'm speaking specifically of the NES thing here. There's a lot of data that needs to be combined in complex ways. For the simpler projects, yes you could do them all in firmware on small micros.
> That sounds like a good idea, but really its been so long since I did > any kind of electronics at all (the little bit I did in my physics > class) that I'm not sure I could design something on paper. At the
Huh? How exactly do you expect the design process to work, then? Are you planning to glue together components randomly until something happens?
> What are op-amps used for?
<http://www.national.com/appinfo/amps/0,2175,967,00.html> is good reading. Particularly read AN-31.
> uk website selling kits. The shipping isn't too bad either. The only > thing that sticks out to me is that the voltage ratings are much > higher than I'd need(63V when I'm using 5V). Does that really make a
The tradeoffs are cost, MTBF and size (among other things), and neither of those really affect you. Yes, you can use "63V" caps in 5V applications. Look at seller "nfceramics" on eBay (no, this is not me, or anyone I know; I've just bought a couple of things from him). For instance he sells an interesting little LM358 experimenters' kit with various R/C values and some 358s.
> I don't need something so complex as being adjustable(as in knobs and > buttons) etc, because I don't mind having to set up a different
If you're only working with a 5V circuit, then, you can use any old AC plugpack with high enough output voltage, four diodes, a capacitor and a 7805 to get the power supply you want.
On Wednesday, in article
     <Vzt%c.10187$Vl5.7586@newsread2.news.atl.earthlink.net>
     larwe@larwe.com "Lewin A.R.W. Edwards" wrote:

>> Perhaps, but I've found MUCH, MUCH more information on PICs, and they >> are much closer to what I already know (I've done tons of normal PC >> programming as well as assembly for the Z80 and 68k, which from what > >Implementing this kind of thing in software on a PIC is a real pain in >the ass. It's best implemented as hardware logic. Your choice - wire >together hundreds of gates, counters and so on by hand, or draw the >schematic in a CPLD/FPGA design tool and have it generate the right >upload file for you. > >I'm speaking specifically of the NES thing here. There's a lot of data >that needs to be combined in complex ways. For the simpler projects, yes >you could do them all in firmware on small micros.
Having dealt with all sorts of complex data regimes with video I could not agree more here.
>> That sounds like a good idea, but really its been so long since I did >> any kind of electronics at all (the little bit I did in my physics >> class) that I'm not sure I could design something on paper. At the > >Huh? How exactly do you expect the design process to work, then? Are you >planning to glue together components randomly until something happens? > >> What are op-amps used for? > ><http://www.national.com/appinfo/amps/0,2175,967,00.html> is good >reading. Particularly read AN-31.
Another good resource is TI App Note Op Amps for Evryone http://www-s.ti.com/sc/psheets/slod006b/slod006b.pdf For general Electronic books if you can afford it The Art Of Electronics by Horowitz and Hill -- Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.gnuh8.org.uk/> GNU H8 & mailing list info <http://www.badweb.org.uk/> For those web sites you hate
"Lewin A.R.W. Edwards" <larwe@larwe.com> wrote in message news:<Vzt%c.10187$Vl5.7586@newsread2.news.atl.earthlink.net>...
> [...] > > That sounds like a good idea, but really its been so long since I did > > any kind of electronics at all (the little bit I did in my physics > > class) that I'm not sure I could design something on paper. At the > > Huh? How exactly do you expect the design process to work, then? Are you > planning to glue together components randomly until something happens? > [...]
Well, I was hoping for a reccomendation on a good book or two that would help me get started again. This post had 3 main parts: what components do I need, how to build a simple power supply, and information/resources/books/etc on electronics (in general or on each type specficially).
Extrarius wrote:
> In summary, I'm looking for any good pointers/ > information/ resources/ books/ websites/ etc on > what inexpensive parts are good to have when > tinkering with PIC-based circuits, on how to build > an inexpensive power supply for such projects, and > any other general information on electronics/digital > circuits that you think is important.
Here's a really good starter electronics book - it steps through the basics using practical projects (incl a benchtop power supply): http://www.amazon.com/exec/obidos/ASIN/0071360573/860710993-20 For your purposes, the power supply need be little more than an 5v LDO regulator and a power pack running at ~6v. (Higher will work, but the LDO will run hotter.) When you start getting into the MCU arena, this is a great book: Designing Embedded Hardware http://www.amazon.com/exec/obidos/ASIN/0596003625/860710993-20 This one's more high-level, but also good: http://www.amazon.com/exec/obidos/ASIN/1578200733/860710993-20 Art of Electronics of a great text too, but not for starting out, IMO: http://www.amazon.com/exec/obidos/ASIN/0521370957/860710993-20 HTH, Richard
Extrarius <filtered@psychosanity.com> wrote:
> larwe@larwe.com (Lewin A.R.W. Edwards) wrote in message news:<608b6569.0409070701.6d404964@posting.google.com>...
>> If you want to build your own, search google for "bench power supply >> schematic" and be selective. >> [...]If you like to live dangerously...[...]
> It isn't that I want to build my own really, its just that I'm not > willing to spend that much on something I might not stick with. Also, > I don't need something so complex as being adjustable(as in knobs and > buttons) etc, because I don't mind having to set up a different > circuit on the breadboard to control a simple plugin AC adapter or the > like.
If you have access to electronic surplus dealers, you should check them out for power supplies. When I'm breadboarding stuff I usually use a PSU I got from a dealer in Silicon Valley. I think it was from some sattelite TV system or something. It provides me with +- 5V & +- 12V, though for most things +5 & +12 would be fine. Cost me SFA. -- Burn the land and boil the sea, You can't take the sky from me.
Extrarius <filtered@psychosanity.com> wrote:

> Well, I was hoping for a reccomendation on a good book or two that > would help me get started again. This post had 3 main parts: what > components do I need, how to build a simple power supply, and > information/resources/books/etc on electronics (in general or on each > type specficially).
As well as books, www info, etc, you need experience. Do some small projects and work your way up to the more ambitious stuff. -- Burn the land and boil the sea, You can't take the sky from me.
paul$@pcserv.demon.co.uk (Paul Carpenter) wrote in message news:<20040908.0806.302632snz@pcserv.demon.co.uk>...
> [Book recommendation]
Richard <rh86@no.spam> wrote in message news:<413F360D.2CECF30@no.spam>...
> [Book Recommendations]
Thanks for the recommendations. After some searching, both: Tab Electronics Guide to Understanding Electricity and Electronics The Art of Electronics were highly recommended, so I ordered them both. I'm more of an academic at heart than an engineer so I'm more willing to buy books =-) Hopefully they'll guide me into practical experiementation in electronics and help me overcome that difficulty. I also have a book on VHDL coming because its the text for one of my college courses. The course won't go into depth because it is an into class, but perhaps the text will. That will hopefully help me put my head around how an FPGA would be better.