Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Cross_
Aug 22, 2008

kaptainkaffeine posted:

edit: I don't know how much voltage each signal is, but I can check later. Also, would an audio taper work more effectively here than a linear? I thought linear at first because I just want to control the mix, not the volume, but after a little reading I'm not so sure they're different.

My guess is that you want linear for balance and log for volume. 10k seems to be the typical value.
ET: Oh, here's some interesting stuff for you http://sound.westhost.com/pots.htm

Cross_ fucked around with this message at 01:48 on Oct 29, 2008

Adbot
ADBOT LOVES YOU

fizban7
Aug 25, 2006
http://www.thinkgeek.com/geektoys/games/af4c/

Is this possible?!
How does this work?!
Can I make one?!


this is crazy.

ANIME AKBAR
Jan 25, 2007

afu~

fizban7 posted:

http://www.thinkgeek.com/geektoys/games/af4c/

Is this possible?!
How does this work?!
Can I make one?!


this is crazy.

well a vaan de graaf generator is a very simple device, and the only actual electronics is a motor. It's more of an application of electrostatic physics than of electronics. Wikipedia should explain it pretty well.

big shtick energy
May 27, 2004


mtwieg posted:

Ugh, grounding issues are always a pain in the rear end...

To rule out the possibility of it being emi, just connect the probe to its own ground. If you still see any signal, it means either a broken connection in the scope/probe or the signal is being induced magnetically.

Do a continuity check of the ground connections on your two channels. If they're shorted, then they're single ended (not pseudodifferential, as I said before. Psuedodifferential is different, my mistake). This is, in my experience, the most common configuration. It means you can measure potential between any two points, but the point that the ground clip is connected to will be connected to earth ground. This means that if your circuit doesn't already have an earth ground connection you can do pseudodifferential measurement**. Otherwise you can only clip the ground clip to the circuit's earth ground (since attaching it anywhere else would short it to ground).

**Also, if you use two channels on a single ended scope the ground clips of each probe must be on the same signal/potential. Again, otherwise you will be shorting the two points together.

That's why it's in some circumstances single ended inputs can function as pseudodifferential inputs. The ground clip connection will be a low impedance, but as long as that's the only low impedance connection then you can make the connection on any point in your circuit, allowing you to use any point as a reference.

here's a decent article on the stuff:
http://www.maxim-ic.com/appnotes.cfm/an_pk/1108

tell me what you observe (a model number for your scope would be good too) and we can go from there.

I see problems like this enough that I'll probably ask some of my professors about it.

Well I had another look and now I can't seem to replicate the issue (unless of course I disconnect the ground clip). Maybe I'd been using the bad probe and just hadn't noticed? It's hard to say.

Hillridge
Aug 3, 2004

WWheeeeeee!

kaptainkaffeine posted:

edit today: So I was thinking about it and it occurred to me that a linear pot would not simply have the 'middle' as equal and attenuate either signal when it's turned, but rather would attenuate both signals by half, and when turned would both boost one signal and attenuate the other till one is twice as loud (edit again: twice the voltage, a log taper pot would be twice as loud) and the other is gone. Is this accurate? I'm waiting for parts to come in so I can't test it.

Sort of.

You're right on the first part. When the pot is in the middle, both signals will have equal strength, but neither will be as loud as it would on its own. When you shift it all the way to one side, one signal will be back to its original volume, and the other will be much quieter. No boosting, you'd need an amplifier for that.

Also, are you just using a NES as a case for this project? I remember the NES as only having a mono sound output.

RivensBitch
Jul 25, 2002

I'm trying to interface an electret condenser microphone with a PIC 16F628A microprocessor. I just need a simple way to let ambient audio influence my program, so a simple circuit that flips a pin on the pic high or low based on a certain audio threshold would be great.

I have a LM324 quad op amp and a simple mic.

Any suggestions on a simple circuit to accomplish this?

BattleMaster
Aug 14, 2000

RivensBitch posted:

I'm trying to interface an electret condenser microphone with a PIC 16F628A microprocessor. I just need a simple way to let ambient audio influence my program, so a simple circuit that flips a pin on the pic high or low based on a certain audio threshold would be great.

I have a LM324 quad op amp and a simple mic.

Any suggestions on a simple circuit to accomplish this?

That PIC already has two comparators built into it. You may be able to make use of one of them for that.

Other than that, I'd be curious to know how to get that to work.

catbread.jpg
Feb 22, 2007

RivensBitch posted:

I'm trying to interface an electret condenser microphone with a PIC 16F628A microprocessor. I just need a simple way to let ambient audio influence my program, so a simple circuit that flips a pin on the pic high or low based on a certain audio threshold would be great.

I have a LM324 quad op amp and a simple mic.

Any suggestions on a simple circuit to accomplish this?

If levels are all you're interested in, then I suggest amplifying it with the op-amp, then rectifying and filtering the signal (to leave only the average or DC component) with a draining resistor on the filter output cap, chosen so that it will decay within an appropriate time period (your R*C time constant). Then you can read the logic level off the filter output, or use the internal ADC (if it has one!) to get a scaled reading.

You can fiddle with the op-amp gain to adjust the sensitivity. You should be able to get away with half-wave rectification, using a single diode.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


I did some stuff with PICs and electret mics. I sensed when the mic was transmitting by setting the comparator reference to the voltage supply pin and just sampling the output before the cap. The A/D has some pretty big (for a microcontroller) caps so if the voltage was above a certain level, I just assumed the mic was on. Fiddling with the A/D level to trigger at adjusted sensitivity well enough to turn an LED on.

RivensBitch
Jul 25, 2002

babyeatingpsychopath posted:

I did some stuff with PICs and electret mics. I sensed when the mic was transmitting by setting the comparator reference to the voltage supply pin and just sampling the output before the cap. The A/D has some pretty big (for a microcontroller) caps so if the voltage was above a certain level, I just assumed the mic was on. Fiddling with the A/D level to trigger at adjusted sensitivity well enough to turn an LED on.

Which PIC were you using in this scenario? I have a 16F628A which has a comparator but no ADC. I've never used the comparator so I'm going to have to read up on it in the manual. Are you saying I'd just connect +5V to one pin, and then connect the mic to another? Then in software read the pin? I'd probably need a variable resistor between the mic and the pic to set the sensitivity, no?

Is your method similar to this?

http://www.winpicprog.co.uk/pic_tutorial_joy_board.htm

quote:

To read the controls we discharge the capacitor (by setting the relevant port pin to an output and setting it low), then reset the port pin to be an input and wait until the capacitor charges enough to make the input switch high - during this time we maintain a 16 bit count

In which case I'd just be replacing the joystick with the mic?

kaptainkaffeine
Apr 1, 2003

Drug Free Since: Lunch

Hillridge posted:

Sort of.

You're right on the first part. When the pot is in the middle, both signals will have equal strength, but neither will be as loud as it would on its own. When you shift it all the way to one side, one signal will be back to its original volume, and the other will be much quieter. No boosting, you'd need an amplifier for that.

Also, are you just using a NES as a case for this project? I remember the NES as only having a mono sound output.

Right, I meant "boost" in the "goes back up to full volume" sense, not in the "greater than from the source" sense. That's actually pretty okay, seeing as how it will have to be sent to a mixer/PA anyway.

No, it's the NES itself. It does have mono output, but if you grab the audio directly off of the CPU pins, you can isolate the two pulse waves from the triangle/noise/sample channel, as they are on two separate pins. They also, coincidentally, correspond generally to "melody" and "rhythm".

Hadlock
Nov 9, 2004

So, I'm wiring up my old 12" crate amp with a separate line-in plug for when I buy my new amp head. I'm pretty sure the switch I'm using to switch between the two inputs (15w solid state amp, 5w valve amp "valve jr.") will be ok.

I'll be running 5w through a DPDT switch rated for 6A @ 250vAC. I'm reasonably sure you can use an AC rated switch for DC power. The price difference between a 6A @ 250 and 3A @ 120 was about 60 cents at radio shack. Oh and the speaker I'm using is a 4 ohm speaker. I'm not going to burn anything up, am I?

big shtick energy
May 27, 2004


Does nayone know what those little level indicators are called? As in the ones you'd see on an analog ammeter or as a signal level indicator on an old amp. Can anyone think of a cheap place to get oe?

Locker Room Zubaz
Aug 8, 2006

:horse:
~*~THE SECRET OF THE MAGICAL CRYSTALS IS THAT I'M FUCKING TERRIBLE~*~

:horse:

RivensBitch posted:

I'm trying to interface an electret condenser microphone with a PIC 16F628A microprocessor. I just need a simple way to let ambient audio influence my program, so a simple circuit that flips a pin on the pic high or low based on a certain audio threshold would be great.

I have a LM324 quad op amp and a simple mic.

Any suggestions on a simple circuit to accomplish this?

Wouldn't it be possible to use a bandpass filter for the frequency range you want to get and then a comparator that detects when your predefined threshold is met. You could then just have the comparators output connected to the external interrupt pin which would then do exactly what you want.

This is of course assuming PICs have external interrupt pins

BattleMaster
Aug 14, 2000

MAH POKEYMANS posted:

Wouldn't it be possible to use a bandpass filter for the frequency range you want to get and then a comparator that detects when your predefined threshold is met. You could then just have the comparators output connected to the external interrupt pin which would then do exactly what you want.

This is of course assuming PICs have external interrupt pins

All PIC16s have one external interrupt pin, but that particular one also has two built-in comparators with interrupt on match.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


RivensBitch posted:

Which PIC were you using in this scenario? I have a 16F628A which has a comparator but no ADC. I've never used the comparator so I'm going to have to read up on it in the manual. Are you saying I'd just connect +5V to one pin, and then connect the mic to another? Then in software read the pin? I'd probably need a variable resistor between the mic and the pic to set the sensitivity, no?

Is your method similar to this?

http://www.winpicprog.co.uk/pic_tutorial_joy_board.htm


In which case I'd just be replacing the joystick with the mic?

I was using a 12F675. I suspect you could connect a diode to the output of the mic before the output cap and use that to halfwave rectify the output, using that to charge the output cap, then sample your comparator from the output cap.

Hadlock
Nov 9, 2004

SecretFire posted:

Does nayone know what those little level indicators are called? As in the ones you'd see on an analog ammeter or as a signal level indicator on an old amp. Can anyone think of a cheap place to get oe?

VU meter or Volume Unit meter. No idea where you'd buy one.

Hadlock
Nov 9, 2004

Hadlock posted:

So, I'm wiring up my old 12" crate amp with a separate line-in plug for when I buy my new amp head. I'm pretty sure the switch I'm using to switch between the two inputs (15w solid state amp, 5w valve amp "valve jr.") will be ok.

I'll be running 5w through a DPDT switch rated for 6A @ 250vAC. I'm reasonably sure you can use an AC rated switch for DC power. The price difference between a 6A @ 250 and 3A @ 120 was about 60 cents at radio shack. Oh and the speaker I'm using is a 4 ohm speaker. I'm not going to burn anything up, am I?

Replying to my own question, the switch works flawlessly. Although you'd think the pinout, which looks like this - ::: - the pins to the left would correspond with the left switch position. As it turns out, switch to the left activates pins on the right, and vice versa. Switch in the middle = nothing works. So there was the heart-wrenchng moment when I turned it on and it didn't work.

Valve amps are cooool by the way. I'm not sure why, but my 5w valve jr. seems at least as loud as my 15w

Disobedient Horse
Nov 26, 2004

Disobedient Horse, did you eat this pie? NEIGH!

Hadlock posted:

VU meter or Volume Unit meter. No idea where you'd buy one.

Also known as panel meters. I bought one from https://www.futurlec.com recently, should be able to get them from any electronics supplier

Skier
Apr 24, 2003

Fuck yeah.
Fan of Britches
I'm using a Sensirion SHT-75 temp/humidity sensor combined with an ATmega168. I've had several of the SHT-75s work fine, reporting correct temperature and humidity compared to my Caliber III humidor sensor, but then the SHT-75s start going wonky and not reporting any changes in temp or humidity. It still reports back, but it's wrong.

The latest sensor, being driven by 4 volts instead of 5, responds to temperature correctly for longer than the previous ones worked, but the humidity isn't reading right. It's way too high and doesn't go down. Once again, it worked when it was first used.

The FAQ from Sensirion mentions decoupling the GND and Vin with 100 nF capacitors. I don't do this in my setup: could weird power fluctuations be causing my sensor to read wrong?

(edit)

Scratch that, the SHT7x packaging has the power/ground capacitor built in. So confused.

Skier fucked around with this message at 18:43 on Nov 6, 2008

ANIME AKBAR
Jan 25, 2007

afu~
additional bypass capacitors certainly won't hurt, and they would help if some kind of brownout or spike on the supply rails is causing the problem. It might also be a problem with your serial interface, either in hardware or software. Make sure you have pullup resistors on the serial lines and that the MCU and sensor have the same supply level. Also make sure you're not trying to communicate too fast, and that your wires aren't too long.

About how long does it take for the output to start messing up? Does it happen slowly or quickly? Does it immediately start functioning correctly again when the circuit is reset?

Skier
Apr 24, 2003

Fuck yeah.
Fan of Britches

mtwieg posted:

additional bypass capacitors certainly won't hurt, and they would help if some kind of brownout or spike on the supply rails is causing the problem. It might also be a problem with your serial interface, either in hardware or software. Make sure you have pullup resistors on the serial lines and that the MCU and sensor have the same supply level. Also make sure you're not trying to communicate too fast, and that your wires aren't too long.

About how long does it take for the output to start messing up? Does it happen slowly or quickly? Does it immediately start functioning correctly again when the circuit is reset?

Output was getting wonky after a couple weeks of constant use. This improved to well over a month after I dropped supply voltage. It happened quickly: correct results then it didn't register any change in the environment. Resetting the circuit doesn't change the behavior.

Delta-Wye
Sep 29, 2005
I want to try and make a metronome, and I'm at a bit of a loss with how to create the clicks. I'd like to get the output from a microcontroller to make the clicking sound, and mix it with an already present audio signal. A simple 2channel active mixer would be simple to design, but I'm not sure how to make the clicks. I suspect a simple high-low transition would result in an audible click, but would it be nicer sounding to do several transitions (say, at 440 Hz or whatever) for a very short amount of time to get more of a beep? Do you guys think that a short beep-styled signal would stand out and sound good?

ANIME AKBAR
Jan 25, 2007

afu~
so the sensor becomes permanently screwed? Definitely not a software error then. The dependence on supply voltage is strange. You might try lowering it further to around 3V to see if it helps more.

It really sounds like some environmental issue, perhaps some moisture finding its way into the MEMs sensor. MEMs devices can honestly be pretty unreliable, especially under any kind of stress. The manufacturer would probably be able to help you out.

ANIME AKBAR
Jan 25, 2007

afu~

Delta-Wye posted:

I want to try and make a metronome, and I'm at a bit of a loss with how to create the clicks. I'd like to get the output from a microcontroller to make the clicking sound, and mix it with an already present audio signal. A simple 2channel active mixer would be simple to design, but I'm not sure how to make the clicks. I suspect a simple high-low transition would result in an audible click, but would it be nicer sounding to do several transitions (say, at 440 Hz or whatever) for a very short amount of time to get more of a beep? Do you guys think that a short beep-styled signal would stand out and sound good?

well I suppose a click is just a pulse, and doing many pulses would give you a tone. Or perhaps you do want a tone, but you want its amplitude to diminish quickly. I'm not really sure what a click looks like as a signal. Maybe try recording some and looking at the wave forms in an oscilloscope. In any case a simple digital output may not be able to yield what you want, unless you do a digital to analog conversion via PWM or something.

Delta-Wye
Sep 29, 2005

mtwieg posted:

well I suppose a click is just a pulse, and doing many pulses would give you a tone. Or perhaps you do want a tone, but you want its amplitude to diminish quickly. I'm not really sure what a click looks like as a signal. Maybe try recording some and looking at the wave forms in an oscilloscope. In any case a simple digital output may not be able to yield what you want, unless you do a digital to analog conversion via PWM or something.

I only have my analog scope handy, which is great for periodic signals but looking at a single click would be a bit hard. I might just have to experiment a bit and see what the dealio is.

Locker Room Zubaz
Aug 8, 2006

:horse:
~*~THE SECRET OF THE MAGICAL CRYSTALS IS THAT I'M FUCKING TERRIBLE~*~

:horse:
I would think a click would just be a very low frequency square wave. To make a metronome it should be as easy as setting up the 8bit PWM in a microcontroller and setting it to trigger at the frequency you want for a very short time. Mixing it with another signal could probably be done on the atmel too provided you had a DAC.

It would look somehting like this I think

Source 1->ADC(within the microcontroller if it is fast enough)->PWM Source->Add ADC value with click value->External Dac

That is my great flowchart!

Edit: Remember you want to sample the ADC at 2x your highest frequency at least otherwise you will be losing tons of high frequency data.

catbread.jpg
Feb 22, 2007
A click is a effectively an appropriately distorted impulse. To get a good click you're going to want to go analogue for the generation and mixing.

http://www.next.gr/audio/musical-circuits/Metronome-Circuit-l4742.html

Keebler
Aug 21, 2000
Would anyone be able to help me out deciphering the data sheet for a flash chip I'm trying to read and write to from an ATMega?

The data sheet is available here:
http://jthirst.zerofold.com/files/AT29C512.pdf

I had thought that the sector programming operation was the just a series of byte load operations that occur to a sector within a specific time window. In looking at the waveform diagrams though it seems like they are different. !CE and !WE appear to occur at the same time and for the same duration for sector programming despite the description for a byte load indicating that it's used in programming a sector as well.

BattleMaster
Aug 14, 2000

Keebler posted:

Would anyone be able to help me out deciphering the data sheet for a flash chip I'm trying to read and write to from an ATMega?

The data sheet is available here:
http://jthirst.zerofold.com/files/AT29C512.pdf

I had thought that the sector programming operation was the just a series of byte load operations that occur to a sector within a specific time window. In looking at the waveform diagrams though it seems like they are different. !CE and !WE appear to occur at the same time and for the same duration for sector programming despite the description for a byte load indicating that it's used in programming a sector as well.

I'm pretty sure you're right about it just being a series of up to 128 successive writes with the same page address on A7-14.

It's kind of weird that the datasheet waveform shows !CE and !WE going active at the same time because that's contrary to the description of sectpr writes, but there shouldn't be any harm in making !CE and !WE/!OE active at the same time for any kind of operation. !CE is just used to enable the other pins on it, anyways.

BattleMaster fucked around with this message at 02:25 on Nov 11, 2008

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


I have a sensor that outputs high in idle and a low pulse train when detecting a signal.

I want to turn a motor on with this pulse train.

Can I do this with a single N-channel FET, or do I need some more signal conditioning? I've got resistors, capacitors, and some NPN and PNP transistors readily available.

Ideally, I'd have the sensor's output connected directly to the gate of the FET and the motor would run, but I'm not sure it's going to work that way.

ANIME AKBAR
Jan 25, 2007

afu~
"pulse train" can mean a lot of thing. Is it variable frequency? Duty cycle? Pulse width?

Do you want the motor to turn on at some specific signal level?

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


mtwieg posted:

"pulse train" can mean a lot of thing. Is it variable frequency? Duty cycle? Pulse width?

Do you want the motor to turn on at some specific signal level?

I'm not really sure of the duty cycle or frequency; I think it's about 30kHz or so with >50% duty cycle (more activated [off] than not when sensing) which should work fine for running a DC motor. I can filter it with a capacitor to smooth that out if need be, etc.

I'd just like to use a (very) small number of components to trigger the FET to "mostly providing current to the motor" when this thing is pumping out. Congruently, I'd like the motor NOT to run when it's NOT outputting low signal.

SovietSpyGuy
Jun 22, 2007
I was going to post a new thread but this is probably a more appropriate place for this question.

I'm currently a mechanical engineering student and plan on getting a EE degree as well. I've dabbled in electronics for a while but I want to get serious enough about it to where I can do truly awesome projects and hopefully make use of it in my future career. With that background out of the way, I present this age old question:


Which microcontroller should I learn to use? I am currently deciding between the PIC series and the Atmel AVR series. Both seem to have their pros and cons from what I hear, but I just can't make up my mind. I already have a few PIC chips as well as a serial port programmer breadboarded...but man oh man is that a pain in the rear end. All I want is to buy a good, reliable programmer (USB please, I'm sick of serial ports), and a good C compiler.

I have no qualms about learning both, but before I invest in the above things I need to make sure I'm making the right decision. Truth be told I don't think either of them will be the "wrong" decision but you understand.

My current interest is motion control. Servomotors, steppers, etc... as well as more involved things like input shaping and stabilization of unstable systems (an inverted pendulum is a good example). Eventually I want to branch out to PLCs and FPGAs, both things that I think will be extremely useful when I do graduate and start my career.

With that in mind, what do you guys suggest? I've found various AVR vs. PIC lists on the google but they don't really tell me all that much, and you all probably have lots of experience with those things.


With that out of the way, I have another question: for any serious electronics/MCU student guy, what things are absolutely essential to have, component wise? I like having lots of parts lying around because it is frustrating to try and experiment with something only to realize that you can't because you don't have .50 cent part or another. What are the "must-haves" as far as discrete components and ICs?

So far I have the following, give or take some random bits:

A 30 MHz oscilloscope
An old but adequate bench multimeter
A RLC meter
A signal generator
A pulse generator
A breadboard
Basic tools
Variety of electrolytic/ceramic caps
Wide assortment of 1/4 W resistors plus a few that are rated 1 W and above
Plenty of NPN and PNP signal transistors
A few power transistors, both types
A few power MOSFETs, both types
Bunch of various logic ICs
555 timers
Various signal and power diodes, and a few zener diodes
An oddball collection of inductors pulled from PC power supplies
A few 741 op-amps
PICs: 16F628A and 16F88
A bunch of signal and one power SCR
Lots of LEDs
On order: Darlington array, stepper motor driver, and L293D motor drivers.

What I need:
A good soldering station. I have an iron but it's a pain.
A good bench power supply, preferably with 2 outputs.
A good oscilloscope probe, or two.
A decent encoder of some sort for motion control projects
Anything necessary for PWM control of DC motors, if anything.

That's about all on the list for now. I hope this wasn't too painful to read, and I will be sure to go back and read the entire thread because I will feel like an rear end in a top hat if these have all been asked already.

If anybody would like to field these questions I will be eternally grateful. Thanks much and hopefully I can get back here soon to talk about more interesting things!

catbread.jpg
Feb 22, 2007
Fair warning, I'm an AVR guy, having no experience with PIC.

I highly recommend the AVR. The ATmega series is very versatile.

This is a really good STK500-compatible USB programmer. You'll need to bootstrap it with a programmed and fused AVR (it needs to be set to run off the timing crystal to achieve the speeds required to interface the USB)

http://tuxgraphics.org/electronics/200510/article05101.shtml

As far as compilation goes:

WinAVR, incorporating AVR-GCC.

AVRdude for loading firmware, or alternately Atmels AVR Studio, which supports STK500 natively.



That's a pretty drat good component and hardware list. What kind of logic ICs? You'll want some hex inverters, decoders/encoders, and possibly shift registers.

SovietSpyGuy
Jun 22, 2007

catbread.jpg posted:

That's a pretty drat good component and hardware list. What kind of logic ICs? You'll want some hex inverters, decoders/encoders, and possibly shift registers.


I got most of them from an electronics lab. At least a few of each, since the instructor didn't care and some of them cost a few bucks a piece.

8-bit shift register
8 bit DA converter
LED bar graph display driver
BCD decoder
Dual JK flip flop
4 bit up/down binary counter
8 input multiplexer
Quad 2 input gates: NOR, XOR, AND, NAND
LM556 timer chips
HEX inverter
Dual D flip flop
Dual 4 input multipexer
Quad 2/1 multiplexer (?)
A few opamps - LM741, LF351


What kind of decoders/encoders?

BattleMaster
Aug 14, 2000

If you have a language preference you should know that PICs are really fast and easy to program in Assembly, but the C support is lacking. I don't think there are any free compilers available and the official one supports PIC18s only and is really expensive.

I've seen a lot of people who say that the official PIC software tools suck, but I have had a decent time with them. MPLAB is okay, but the tools it provides an interface for are excellent. MPASM and MPLINK kick rear end and I just couldn't live without my ICD2 (hardware debugger).

Edit: MPLAB also comes with a pretty good PIC emulator if you want to debug your software but don't have a hardware debugger or you just don't have the specific PIC on hand.

BattleMaster fucked around with this message at 08:50 on Nov 17, 2008

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

SovietSpyGuy posted:

What kind of decoders/encoders?
Just standard 3 to 8 decoders are pretty useful, along with their encoder counterparts.
It's probably not a good idea to stock up on dozens of chips if you don't know that you'll have a use for them, though. Some of them you'll never find a need for, and they'll just sit in your drawer, taking up space. There are thousands of chips that do almost anything you need if you have a specific use in mind.

I've got a pretty complete collection of the basics, but I was working on a project a couple months ago that require as compact a PCB as I could get. I needed to count up to an eleven-bit number, and run some logic off that. What I didn't want to do was to use two 393 counter chips and a 555 because of the size requirements.
After a bit of googling I found one chip that that does both of those. It's a timer/11-bit counter.

The point is, find a good electronics store nearby that you can do runs to whenever you need something in particular.

ANIME AKBAR
Jan 25, 2007

afu~

babyeatingpsychopath posted:

I'm not really sure of the duty cycle or frequency; I think it's about 30kHz or so with >50% duty cycle (more activated [off] than not when sensing) which should work fine for running a DC motor. I can filter it with a capacitor to smooth that out if need be, etc.

I'd just like to use a (very) small number of components to trigger the FET to "mostly providing current to the motor" when this thing is pumping out. Congruently, I'd like the motor NOT to run when it's NOT outputting low signal.

What is the logic level of the output, and what voltage is the motor driven at? Would driving it with with a P-channel fet be okay? How much current? And again, do you want the motor to turn on fully when any signal is present, or do you want its strength to have a more linear relationship to the signal?

a datasheet for the sensor would help a lot.

Adbot
ADBOT LOVES YOU

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


mtwieg posted:

What is the logic level of the output, and what voltage is the motor driven at? Would driving it with with a P-channel fet be okay? How much current? And again, do you want the motor to turn on fully when any signal is present, or do you want its strength to have a more linear relationship to the signal?

a datasheet for the sensor would help a lot.

Logic level low for output.

Current is pretty low; probably 500mA max at 3V (1.5V motor overdriven).

P-channel is fine.

Fully on with any signal is fine; I'm regulating the speed with another circuit downstream of this one.

A datasheet for the sensor WOULD be great, but such is not available.

I'm really trying to avoid buying more components, so if I have to build a latch with PNP transistors, I'll do it.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply