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
ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Any controller chips can also be implemented with FPGAs, so that's fine.

If you're willing to dump $400 into this project, I'd buy a $20 picture frame first to try and hack it.

Adbot
ADBOT LOVES YOU

Hillridge
Aug 3, 2004

WWheeeeeee!
My project uses an FPGA as the LCD driver, so I see no problem with that. Unfortunately I can't share any of our FPGA code due to legal reasons. I didn't write it, so I'm not sure I could help anyway.

We have a separate custom micro controller to interface with the FPGA, but for your application you could probably do it all from the FPGA. I like the idea, and I think I may try to mess around with something similar on my development hardware. Cool idea!

clredwolf
Aug 12, 2006
Moving cities sucks, just started a new job and getting moved around kind of sucks. I moved out so fast I got whiplash (or at least my bank did, thanks for deactivating my card assholes)! Hopefully I can start actually visiting my threat more often, maybe even clean it up a bit (when I have time, hahaha).

On the plus side, I made a career jump from silicon to avionics, so now I get to make real stuff that does real things! Yay!


evilmonkeh posted:

Does anyone have any recommendations of somewhere in the UK where I can order some pin headers + connectors and some nice multi-core cables so that I can knock up some decent connections between circuits? Fed up of having rubishy wires everywhere! Thanks!

Get yourself some nice D-Shell connectors. It's sooo worth the effort. Use DE9s for small stuff, DB25s when you need to route a bus, and DD50 when you want to use a serious(ly large) cable.

Solder is a pain in the rear end on those connectors, that's the big downside. At work we have crimp connectors, which are an absolute godsend. They're prohibitively expensive for DIY stuff though (I'm not paying $14 for a DE9 connector), but oh so sexy.

Mouser has a UK site, their prices seem reasonable to me. Here are some searches I ran:

0.1" headers, crimp and solder cup: http://uk.mouser.com/Interconnects/Headers/_/N-28bzo?P=1z0wxp6Z1z0z4xuZ1z0xbxz

DSub connectors, solder wells, sorted by price: http://uk.mouser.com/Interconnects/D-Subminiature-Connectors/_/N-2d8uj?P=1z0xbc4Z1z0xbxzZ1z0z6siZ1z0z2lh&Ns=Pricing|0

Aluminum Record
Feb 2, 2008

When you rip off the breakaway pants, thrust your pelvis toward the bachelorette.
Hoping someone can tell me if I'm thinking about this right. I'm taking Physics 2 and I'm trying to understand just what exactly is happening at the electron level (and a typical alkaline battery) in a basic circuit.

Let's just say we've got a typical 1.5V AA battery connected to a resistor. The battery is creating an electrical potential of 1.5V, by separating positive and negative charges. While we think about the current "flowing" out of the positive terminal of the battery, what in fact is happening is that the electrons are being "pushed" away from the negative terminal and "pulled" toward the positive terminal by the electric field created by the batter. For that to happen, they have to pass through the resistor, where they slow down. To slow them down, you have to do work, which for a resistor is in the form of heat.

I also wanted to understand what is happening in the battery, so I looked up the half-reactions for an alkaline battery. At the cathode (the positive terminal), the half-reaction is:
2MnO2(s) + H2O(l) + 2e− -> Mn2O3(s) + 2OH−(aq)
The way I understand it, the manganese dioxide reacts with water and 2 electrons. The "limiting reagent" in this reaction is the electrons, which it gets through the electrolyte connecting the positive and negative terminals (the electrolyte allows electrons to flow between the two without allowing the reactants at the anode and cathode to react with each other). At the anode, the reaction is:
Zn(s) + 2OH−(aq) -> ZnO(s) + H2O(l) + 2e−
So this reaction essentially yanks 2 electrons off of the solid zinc, so they can flow through the electrolyte to be reacted with the manganese dioxide at the cathode. The battery "goes dead" when there one of the reactants at either the anode or cathode runs out.

Is this pretty much what is happening in a circuit as simple as that?

clredwolf
Aug 12, 2006

Aluminum Record posted:

Hoping someone can tell me if I'm thinking about this right. I'm taking Physics 2 and I'm trying to understand just what exactly is happening at the electron level (and a typical alkaline battery) in a basic circuit.

Let's just say we've got a typical 1.5V AA battery connected to a resistor. The battery is creating an electrical potential of 1.5V, by separating positive and negative charges. While we think about the current "flowing" out of the positive terminal of the battery, what in fact is happening is that the electrons are being "pushed" away from the negative terminal and "pulled" toward the positive terminal by the electric field created by the batter. For that to happen, they have to pass through the resistor, where they slow down. To slow them down, you have to do work, which for a resistor is in the form of heat.

I also wanted to understand what is happening in the battery, so I looked up the half-reactions for an alkaline battery. At the cathode (the positive terminal), the half-reaction is:
2MnO2(s) + H2O(l) + 2e− -> Mn2O3(s) + 2OH−(aq)
The way I understand it, the manganese dioxide reacts with water and 2 electrons. The "limiting reagent" in this reaction is the electrons, which it gets through the electrolyte connecting the positive and negative terminals (the electrolyte allows electrons to flow between the two without allowing the reactants at the anode and cathode to react with each other). At the anode, the reaction is:
Zn(s) + 2OH−(aq) -> ZnO(s) + H2O(l) + 2e−
So this reaction essentially yanks 2 electrons off of the solid zinc, so they can flow through the electrolyte to be reacted with the manganese dioxide at the cathode. The battery "goes dead" when there one of the reactants at either the anode or cathode runs out.

Is this pretty much what is happening in a circuit as simple as that?


Depends on how deep down the rabbit hole you want to go, but prettymuch yes.

One thing to understand though is that the electrons smack into other atoms, which cause them to eject electrons. That way, the 'flow' is much like water through a pipe, where it may take quite some time for one molecule of water to exit the pipe but when one molecule enters the pipe, another molecule comes out the other end very quickly.

Wires in fact are resistors, there's nothing really that special between the two. Wires have a well known resistance, depending on the material and the geometry. The difference is that wires typically have much smaller resistance, down in the milliohm range or less, where resistors are typically 0.1 ohms up to millions of ohms. They use materials like carbon and nichrome, which have a higher resistivity/lower conductivity. In those, it is much harder for electrons to 'jump' from atom to atom imposing an energy loss we see as heat. Metals typically have many free unbounded electrons, which move around from atom to atom nearly freely. There are superconductors now too, which have genuinely free movement of electrons and create some crazy effects.

(It gets much more complicated, some materials don't behave nice and have complex resistances, others can change their resistance based on a variety of factors like temperature, voltage, and even light)

If you hook a wire to the two terminals of the battery, it will get hot. It's a resistor, just a very small one, so current flows very freely.

So...yes.

Aluminum Record
Feb 2, 2008

When you rip off the breakaway pants, thrust your pelvis toward the bachelorette.

clredwolf posted:

Depends on how deep down the rabbit hole you want to go, but prettymuch yes.

One thing to understand though is that the electrons smack into other atoms, which cause them to eject electrons. That way, the 'flow' is much like water through a pipe, where it may take quite some time for one molecule of water to exit the pipe but when one molecule enters the pipe, another molecule comes out the other end very quickly.

Wires in fact are resistors, there's nothing really that special between the two. Wires have a well known resistance, depending on the material and the geometry. The difference is that wires typically have much smaller resistance, down in the milliohm range or less, where resistors are typically 0.1 ohms up to millions of ohms. They use materials like carbon and nichrome, which have a higher resistivity/lower conductivity. In those, it is much harder for electrons to 'jump' from atom to atom imposing an energy loss we see as heat. Metals typically have many free unbounded electrons, which move around from atom to atom nearly freely. There are superconductors now too, which have genuinely free movement of electrons and create some crazy effects.

(It gets much more complicated, some materials don't behave nice and have complex resistances, others can change their resistance based on a variety of factors like temperature, voltage, and even light)

If you hook a wire to the two terminals of the battery, it will get hot. It's a resistor, just a very small one, so current flows very freely.

So...yes.

Aye, I knew about some of those things (we learned about the resistivity of materials, calculations involving it, and drift velocity of electrons and such. I just wanted to make sure I had the right idea in that the electrons are actually flowing from negative to positive terminals on the battery.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Aluminum Record posted:

Aye, I knew about some of those things (we learned about the resistivity of materials, calculations involving it, and drift velocity of electrons and such. I just wanted to make sure I had the right idea in that the electrons are actually flowing from negative to positive terminals on the battery.

Yep. There are two ways of teaching electricity: Conventional current flow and electron flow. Conventional current is + to -, electron flow is how electrons move, - to +.

Both work just fine; the sign just comes out different when doing current calculations.

orange lime
Jul 24, 2008

by Fistgrrl

ShoulderDaemon posted:

The actual Arduino language is, in fact, C. The header file that gets included adds a lot of macros and there's a decent library of prewritten code, but it's just C compiled by a C compiler.

BattleMaster posted:

What are you talking about, it's not like C, is C. They call it the "Arduino Language" but it's standard C except that the preprocessor automatically includes a header file with a bunch of basic I/O functions and ease of use macros in it.

ante posted:

What do you think a compiler does?

Man, a lot of hostility here. Bad phrasing maybe, but what I was attempting to say is that the macros and I/O functions, which basically define the Arduino environment, are written in such a way that writing code in the Arduino environment reminds me more of writing Java than writing C. Thanks for all the insulting comments though.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

babyeatingpsychopath posted:

Yep. There are two ways of teaching electricity: Conventional current flow and electron flow. Conventional current is + to -, electron flow is how electrons move, - to +.

Both work just fine; the sign just comes out different when doing current calculations.

You'll also never use electron flow outside of a physics class.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


ante posted:

You'll also never use electron flow outside of a physics class.

My Electrician's Apprentice course is teaching electron flow for some reason. Made semiconductors really confusing being that I'd learned everything in conventional flow, so all the arrows were pointed all crazy.

In other "release the smoke" news, I repaired my wife's electric roasting pan.

I'd left it on overnight and burned out the heating element. I calculated the resistance of the old element based on the wattage given. then I went to McMaster Carr and looked at their nichrome wire. Selecting one, I found the resistivity and density of the alloy, then calculated the correct length, and therefore weight. I bought a spool of the right size and some mica tape, and made my own heating element.

It works great, now that it's burned in; the wire ships with some kind of oil on it.

BattleMaster
Aug 14, 2000

orange lime posted:

Man, a lot of hostility here. Bad phrasing maybe, but what I was attempting to say is that the macros and I/O functions, which basically define the Arduino environment, are written in such a way that writing code in the Arduino environment reminds me more of writing Java than writing C. Thanks for all the insulting comments though.

I have no clue how you found any of those replies to be insuling, though I guess the last one may have been construed as a tiny bit hostile. Either you need to stop being so sensitive about being corrected, or if that's not the case then I guess you need to work on your phrasing a little more because it seems you may have some difficulty expressing yourself properly.

isagoon
Aug 31, 2009

by Peatpot

BattleMaster posted:

I have no clue how you found any of those replies to be insuling, though I guess the last one may have been construed as a tiny bit hostile. Either you need to stop being so sensitive about being corrected, or if that's not the case then I guess you need to work on your phrasing a little more because it seems you may have some difficulty expressing yourself properly.

BattleMaster doesn't seem to like the Arduino kits very much. He already got into a multiforum flame war with me about it.

Yes it's C
Yes it has a few macros to make it easier for newbies
Yes it is just an Atmel atmega328/168 with a board that integrates a few easy to use features
Yes there is a little bundled Java applet to make compiling/writing to serial/etc easier

All of the above makes up the whole "Arduino" package.

BattleMaster
Aug 14, 2000

So what you're agreeing with me? Sounds like everything I've said in the thread :confused:

As for the kit itself I like them and think that they're great learning kits. They're about a billion times better than the terrible BASIC stamps which previously used to be the best newbie learning tools. I just don't like how people make them out to be a magical black box that takes code and shits out rainbows and is generally the be-all-end-all of embedded computing. Sites like Hackaday went from cool poo poo like "this guy made a cattle prod out of a junked computer monitor" to "this guy figured out how to blink two lights alternatively with an ARDUINO!!!! WOW!!! ARDUINO ARDUINO" almost overnight because of that weird cult built around it.

Edit: Though I don't know any of this has anything to do with you being butthurt over something or other

BattleMaster fucked around with this message at 07:14 on Mar 3, 2010

orange lime
Jul 24, 2008

by Fistgrrl

BattleMaster posted:

Sites like Hackaday went from cool poo poo like "this guy made a cattle prod out of a junked computer monitor" to "this guy figured out how to blink two lights alternatively with an ARDUINO!!!! WOW!!! ARDUINO ARDUINO" almost overnight because of that weird cult built around it.

You do realize that even Hack-a-day itself makes fun of people like you? Their comments are full of so many people making GBS threads on a project just because it uses an Arduino that the editors actually pre-emptively make sarcastic comments about it if a post mentions the unspeakable word. The only thing that's more annoying than the morons on Instructables posting sample sketches from the Arduino IDE is the ultra-:smug: people on HAD talking about how THEY would have done it with an FPGA or an op-amp or a pile of wire and a quartz crystal.

I completely agree with you that some of the crap that got posted on Hack-a-day really doesn't deserve to be there (eg: light blinking, for real), but that's something you should blame on the editors, not the platform. Besides, for every 10 "look I made an ARDUINO spin a motor around" there's some cool hack that wouldn't have been built if the inventor had had to buy and learn an AVRISP or a Stamp or some other crap. The Arduino has lowered the barrier to entry into physical computing to, literally, $30 and whatever parts you can scrounge from old printers and game controllers and stuff, and for that it's gold.

BattleMaster
Aug 14, 2000

That's just the thing - loads of people do lots of cool stuff even with easy stuff like the Arduino. There's so much cool poo poo around that there's no need for people to go wild every time someone posts that they made a light blink... but they still do.

Cool poo poo is cool poo poo but lame poo poo is lame poo poo no matter what you implement it with.

Edit: At some point the evangelizing got a bit out of hand, though. There was a thread posted in SHSC asking for information on building old-school microcomputers (you know, PCs before they were called PCs) from components. It was flooded pretty quickly with "why would you want to do that just buy an Arduino" people

BattleMaster fucked around with this message at 07:16 on Mar 3, 2010

Delta-Wye
Sep 29, 2005

orange lime posted:

You do realize that even Hack-a-day itself makes fun of people like you? Their comments are full of so many people making GBS threads on a project just because it uses an Arduino that the editors actually pre-emptively make sarcastic comments about it if a post mentions the unspeakable word. The only thing that's more annoying than the morons on Instructables posting sample sketches from the Arduino IDE is the ultra-:smug: people on HAD talking about how THEY would have done it with an FPGA or an op-amp or a pile of wire and a quartz crystal.

I completely agree with you that some of the crap that got posted on Hack-a-day really doesn't deserve to be there (eg: light blinking, for real), but that's something you should blame on the editors, not the platform. Besides, for every 10 "look I made an ARDUINO spin a motor around" there's some cool hack that wouldn't have been built if the inventor had had to buy and learn an AVRISP or a Stamp or some other crap. The Arduino has lowered the barrier to entry into physical computing to, literally, $30 and whatever parts you can scrounge from old printers and game controllers and stuff, and for that it's gold.

As if Battlemaster's problem with his example was it used an Arduino, and not that it was stupid simple and not really much of a hack. If Arduino's are so easy to use, why aren't the projects people are building even more involved?

You seem bizarrely butthurt over this C/Java thing. Those aren't insults, they are friendly corrections. You were wrong, being told you are wrong isn't an insult. Bleh.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Delta-Wye posted:

As if Battlemaster's problem with his example was it used an Arduino, and not that it was stupid simple and not really much of a hack. If Arduino's are so easy to use, why aren't the projects people are building even more involved?

(foolishly)Taking a moment to answer a rhetorical question earnestly, I would guess that the problem is that people buy the board and some components with a head full of vague ideas, bang through some examples and one of their simpler ideas, then hit a brick wall. Sometimes the wall is that they want to move on to a much more complex project and balk at the learning curve for a moment, sometimes it's that they can't scrounge components they need nor afford to buy them, sometimes they had rather less immediate ideas for physical computing and embedded systems than they thought, sometimes it's general enthusiasm dropoff that kicks in a week after getting a new gadget, or whatever.

The result is that they have this cool thing that could be a gateway to a ton more even cooler things that instead winds up collecting dust, another project that they really mean to get around to right after they fix the squeak of the garage door and patch the roof on their shed. The videos of simon says or tic-tac-to thrown together with an arduino board are a testament to the early trivial enthusiasm phase of this, along with Hack a Day's meh editors.

cakesmith handyman
Jul 22, 2007

Pip-Pip old chap! Last one in is a rotten egg what what.

Greetings oh mighty enormous electronics megathread. I have a question I feel you guys may be better able to answer: I've been asked to buy/make/source a display for two of the machines at work & am having trouble sourcing the components.

I want 12 (4 of 3 digit) large (100-200mm tall) 7 segment LED displays with built-in BCD drivers. I don't have the time to make them myself and would normally farm this job out to one of our factoring agents but they've quoted £6k for what is essentially 2 of metal box with 6 display segments & some wire.

Can anyone suggest a supplier, preferably in the UK or Europe? I'm happy to wire these together & fit them into an enclosure, just don't have the time to solder together a bunch of circuits.

No Arduino involved, promise, just Allen Bradley 5/80's

Hillridge
Aug 3, 2004

WWheeeeeee!
I don't quite understand what you are trying to find. Does it look like this or are all 6 in a row, or something else?

If one isn't available I can build some for a lot less than 6k.

Only registered members can see post attachments!

RussianBear
Sep 14, 2003

I am become death, the destroyer of worlds
They seriously want $9k for that? Just get 12 of these these and 12 of these these. Done. I'll even solder everything together for you for only £3k! Half price!

cakesmith handyman
Jul 22, 2007

Pip-Pip old chap! Last one in is a rotten egg what what.

Kind of, it's 2 of 3 digit displays per machine, so basically 4 separate displays. Outputs from the press are a spare 1771 digital output card, 24 outputs required to run 6 digits, we have that easily.

Yeah, it's ridiculous how much money they want, I have a Dennki 100mm display unit on my desk, 7 segment display with built-in BCD driver combo, just perfect for what I want but it's been through the wars so there's no ID marks other than the makers name. I tried getting in touch directly with Dennki but they won't talk to me about less than 1000 units.

Is it possible to get the BCD driver on a card already made up? I could throw cards & displays together easily.

edit: it should end up looking like this:
88.8___88.8
1st 3 digits are target speed, last 3 are actual. I'll snag a pic of the units already in use to make it clear.

cakesmith handyman fucked around with this message at 07:23 on Mar 4, 2010

RussianBear
Sep 14, 2003

I am become death, the destroyer of worlds
If you have general purpose outputs why not consider something with a different interface? These have an SPI-like interface. Chain them together, hook up 4 wires, you're done. No soldering involved.

Or you could just find a 7-segment display and BCD that you like and throw together a really simple PCB. That's probably cheaper and easier than getting anything custom made.

RussianBear fucked around with this message at 09:44 on Mar 4, 2010

cakesmith handyman
Jul 22, 2007

Pip-Pip old chap! Last one in is a rotten egg what what.

Here's what the current setup looks like:

Those are the original displays, no details inside them at all. They're run by BCD signals from generic output cards, as described above.

I'll have a look at the SPI jobbies, thanks for those.

Also, the kit we need the timers for, 'cause everyone likes big machines:



A 600ton capacity blanking press, 4.2m Pitch, 1.8m width & 3.2mm thick capacity (not all at once mind) 35ton coils of steel are fed in the right end, uncoiled, levelled, pit-looped to buffer delivery speed, then fed into the die & stamped at up to 80 strokes per minute. After that the twin pilers (far left) make neat stacks of the blanked steel.

BattleMaster
Aug 14, 2000

drat, if it's connected to something like those you should just shell out for the commercially produced signs. That way if something goes terribly wrong someone other than you can take the blame.

cakesmith handyman
Jul 22, 2007

Pip-Pip old chap! Last one in is a rotten egg what what.

Pff, all it does is display the strokes-per-minute so there's a bit of pressure on the Operator to hit target speed. There's a smaller display at the Main Operators Panel and the Max speed is pre-set by part & can't be hosed with by the operator.

So, basically, no worries!

Also, I found a couple of possibilities:
Sakae Denki, products with SEG in the part number, as such:



Only 85mm, but display & driver built in, nearly perfect. I've set our favourite Japanese factoring company on the job.

Twerpling
Oct 12, 2005
The Funambulist
Does anyone know the distinction between a resonator, an oscillator, and a crystal? Is there any real reason to use one over the other aside from temperature frequency variance and footprint? Is there even a distinction between the three or are these synonyms?

I was under the impression that a crystal and a resonator were both some sort of resonating dielectric except a resonator had built in caps, where an oscillator was just an RC circuit.

The reason I ask is I am going to use a resonator in a circuit I made rather then the crystal I breadboarded it with and I want to avoid unpleasant surprises.

Twerpling fucked around with this message at 03:55 on Mar 8, 2010

Cyril Sneer
Aug 8, 2004

Life would be simple in the forest except for Cyril Sneer. And his life would be simple except for The Raccoons.
A crystal is a two-pin device and is just the piece of crystal itself. This alone does not product a signal - it needs to be part of some sort of feedback circuit in order sustain oscillations.

A resonator or oscillator, when referring to an IC, generally means a 4-pin device that includes a crystal and appropriate circuitry all built in - you supply Vin and GND, and it gives you your oscillating signal.

ANIME AKBAR
Jan 25, 2007

afu~

Twerpling posted:

Does anyone know the distinction between a resonator, an oscillator, and a crystal? Is there any real reason to use one over the other aside from temperature frequency variance and footprint? Is there even a distinction between the three or are these synonyms?

I was under the impression that a crystal and a resonator were both some sort of resonating dielectric except a resonator had built in caps, where an oscillator was just an RC circuit.

The reason I ask is I am going to use a resonator in a circuit I made rather then the crystal I breadboarded it with and I want to avoid unpleasant surprises.

A resonator simply refers to a system or component that exhibits resonance at one or more frequencies. Crystals and ceramic resonators are common forms of resonator because they are very cheap and precise, though you can make resonators out of lots of things.

Oscillators come in two varieties. Resonant oscillators are amplifiers with resonance in their feedback look, causing them to oscillate at their resonant frequency. These are usually based on crystals or LC tanks. Relaxation oscillators use some sort of state machine (usually as simple as a comparator or a single latch) to toggle between two states forever at some predictable frequency. The frequency is usually determined by a capacitor and one or two resistors. The 555 timer IC is a good example of a relaxation oscillator.

Ceramic and crystal resonators are generally interchangeable when used in pierce oscillators (the kind used in most ICs that require external resonators for a clock source). Ceramic resonators have poorer quality factor than crystals, but have superior mechanical robustness. Just make sure you use the right load capacitance.

ANIME AKBAR fucked around with this message at 07:05 on Mar 8, 2010

Keebler
Aug 21, 2000
Does anyone have any recommendations on logic analyzers? I'm at a point on a project where I both need and can finally afford one (project was shelved while I was unemployed :( ). The one that stands out and seems to be getting the most press these days is:

http://www.saleae.com/logic/

It's priced right but I'm a little put off by the max speed, it has no internal buffer and is bound by the USB port speed (though it's fine for what I need right now). Are there any other alternatives that I should be looking at? I'm looking to spend around $250 or less.

Squashy Nipples
Aug 18, 2007

Please help me select a variable resistance unit...

Ok, I have a small desk fan that runs on 3 AA batteries. Yes, I KNOW that batteries suck, but I work at a massive, soulless corporation that doesn't allow me to plug any devices in at my cube. The property engineer confiscated my transformer, and when I bitched the solution was a regular allotment of AA batteries. :shrug:

First problem, the switch broke, so I need to replace that (right now I have to pop a battery out to shut it off).

Second problem, fan speed varies as the batteries discharge, from too fast to too slow.

My plan is to replace the battery compartment with an external battery pack. 4 batteries instead of 3, so I can keep it going a little longer when the batteries are near death.
http://www.radioshack.com/product/index.jsp?productId=2062244

Then, a simple interrupter switch for on/off.

Finally, I want a pot/rheostat so I can adjust the voltage/fan speed, slowing it down a bunch when the batteries are at full charge, and reducing it down to zero additional resistance when the batteries get low.

Problem is, I don't know how to spec the resistance device...
What Ohm range is appropriate, and what should the power rating be?

Simple project, I know, but it will make me comfy at work, and make the batteries last longer, too. Thanks for any advice.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Don't worry about power rating, a few AAs won't be able to heat up any decent sized pot enough to damage it.

I'm really not sure what typical internal resistance values for batteries are when they're near-death. Energizer has some datasheets that say new ones are 0.2-1ish ohms.
I also don't know the current draw of your fan.

Your best bet would be to get a couple cheap pots($1-$3 at any electronics place) and see what works.
Get a 1 MOhm and 1kOhm and see what happens. If the effective values are 0-50% on the 1k pot, you should be able to find a 500 Ohm one somewhere.

Experiment, it should be pretty hard to cause any damage to anything with just batteries.

macpod
Jan 29, 2006
What the hell was that about?

Keebler posted:

Does anyone have any recommendations on logic analyzers? I'm at a point on a project where I both need and can finally afford one (project was shelved while I was unemployed :( ). The one that stands out and seems to be getting the most press these days is:

http://www.saleae.com/logic/

It's priced right but I'm a little put off by the max speed, it has no internal buffer and is bound by the USB port speed (though it's fine for what I need right now). Are there any other alternatives that I should be looking at? I'm looking to spend around $250 or less.

What do you need/plan on analyzing and what speed did you want for future projects?

For commercial, the saleae unit seems the way to go in terms of price/what you (will) get. It currently has windows software written for it, and the dev is working on a re-write which will support linux and macs.. but they sure are taking their sweet time to do it.

For cheaper solutions you could check out the bus pirate (serves a similar purpose)
http://code.google.com/p/the-bus-pirate/

Or you can look at this too.. I just saw it on hackaday a few days ago:
http://www.seeedstudio.com/depot/preorder-open-workbench-logic-sniffer-p-612.html?cPath=61_76&zenid=f53caf8808b1db9949be509e86234c9f

edit: Definitely do some research before buying any of these, I just wanted to make you aware they existed :)

macpod fucked around with this message at 00:24 on Mar 9, 2010

Delta-Wye
Sep 29, 2005

Squashy Nipples posted:

Please help me select a variable resistance unit...

Ok, I have a small desk fan that runs on 3 AA batteries. Yes, I KNOW that batteries suck, but I work at a massive, soulless corporation that doesn't allow me to plug any devices in at my cube. The property engineer confiscated my transformer, and when I bitched the solution was a regular allotment of AA batteries. :shrug:

First problem, the switch broke, so I need to replace that (right now I have to pop a battery out to shut it off).

Second problem, fan speed varies as the batteries discharge, from too fast to too slow.

My plan is to replace the battery compartment with an external battery pack. 4 batteries instead of 3, so I can keep it going a little longer when the batteries are near death.
http://www.radioshack.com/product/index.jsp?productId=2062244

Then, a simple interrupter switch for on/off.

Finally, I want a pot/rheostat so I can adjust the voltage/fan speed, slowing it down a bunch when the batteries are at full charge, and reducing it down to zero additional resistance when the batteries get low.

Problem is, I don't know how to spec the resistance device...
What Ohm range is appropriate, and what should the power rating be?

Simple project, I know, but it will make me comfy at work, and make the batteries last longer, too. Thanks for any advice.

I would guess something in the 1K range should be fine - you may find that you only use half of the sweep, and then you pretty much have a 500 ohm pot with half the physical range on the knob (for something imprecise like fan speed, you may not care).

The proper solution, especially if you are adding a 4th AA batter, is a voltage regulator. This takes the (over time) decreasing input voltage from the batteries, and outputs a steady lower voltage constantly. You set the circuit up so that it runs the fan at the right speed and then just leave it until the batteries run down. If you never change the fan speed, two resistors would be fine, and if you like to turn it up and down, a resistor and a pot can be used to vary the output voltage.

http://www.circuit-innovations.co.uk/LM317.html

A pot and the batteries will work, but you will be chasing a moving target as the batteries run down. You can get by without the capacitors for this use. Hell, if you get the lm317 working, you could probably run it off of a USB port if you have a computer in the cube.

evilmonkeh
Apr 18, 2004
meh

Delta-Wye posted:

A pot and the batteries will work, but you will be chasing a moving target as the batteries run down. You can get by without the capacitors for this use. Hell, if you get the lm317 working, you could probably run it off of a USB port if you have a computer in the cube.
A voltage regulator will be the best choice. If you use a pot or some combination of resistors you're going to be wasting a lot of energy over the resistive components. You could do something like this, but replacing the resistors with 1 pot.

jacteh
Jul 10, 2007
.

evilmonkeh posted:

A voltage regulator will be the best choice. If you use a pot or some combination of resistors you're going to be wasting a lot of energy over the resistive components. You could do something like this, but replacing the resistors with 1 pot.

A linear reg will waste just as much energy. Both just bleed the excess off as heat. A switching circuit is what you want

eg http://www.bit-tech.net/modding/2001/12/03/pwm_fan_controller/1

There are a bunch of ways you could do it, from a 555 timer to a lm2575 switch mode reg. Google has plenty more circuits.

ANIME AKBAR
Jan 25, 2007

afu~
The best way would be almost certainly be with a PWM. Driving it with a 555 would work, as posted above. If it draws little power, then the 555 could drive it directly. Otherwise you'd need a mosfet or something.

ANIME AKBAR
Jan 25, 2007

afu~
Also, I wanted to throw something out there.

The tesla orchestra group at my school recently acquired several hundred sweet electrolytic capacitors. We'll likely use some in our coil, but we'll be selling off most of them as fundraising. They're rated 6800uF, 400V (I think, I know its between 350 and 450V), and they're quite suitible for delivering pulsed power, so if any of you were planning anything diabolical (coil guns, rail guns, quarter shrinkers), then this should interest you. We'll likely sell them at $10-15 each, but I won't be handling sales. Let me know if your interested, my email is mdt24 at case dot edu

Squashy Nipples
Aug 18, 2007

Thanks for the input, guys! I did ME for my undergrad, so I'm not good with anything beyond basic circuits...

However, the single BEST suggestion is to run it off my USB port. I would probably have to hide the cord each evening, but at least I wouldn't have to feel bad about throwing away so many drat batteries.

I will report back once I start tinkering.

Delta-Wye
Sep 29, 2005

jacteh posted:

A linear reg will waste just as much energy. Both just bleed the excess off as heat. A switching circuit is what you want

eg http://www.bit-tech.net/modding/2001/12/03/pwm_fan_controller/1

There are a bunch of ways you could do it, from a 555 timer to a lm2575 switch mode reg. Google has plenty more circuits.

A switching circuit is probably not what he wants - I'd wager it's overkill for this situation. An lm317 can be put together with 3 parts (4 if you count the usb plug) and he won't be left scratching his head when it doesn't switch properly.

You are right about the linear regulator - they bleed the excess off as heat, which he would be doing with a potentiometer, the big difference being a voltage regulator lets him set the fan speed and not the voltage drop. Although if Dr. Squashy Nipples wanted to go all out and build some real electronics, a switch mode circuit would be totally :allears:

Adbot
ADBOT LOVES YOU

Hillridge
Aug 3, 2004

WWheeeeeee!
3xAA batteries is 4.5V, whereas USB delivers 5V. If you go the USB route all you will need is a potentiometer of 1k or less. If the fan speed isn't too high at 5V, and the current draw doesn't exceed 500mA, you may be able to just attach a USB cord directly to the fan. I'd try that first since it's the easiest way.

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