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
evilmonkeh
Apr 18, 2004
meh
I've had a PCB made with an STM32 and some other bits and pieces, and mostly it seems to work great apart from some instability when I first power it up; sometimes it crashes. If I then reset it it works fine, which suggests to me that it is a power supply issue. Does anyone know any good techniques for debugging this sort of thing? I have an oscilloscope!

Adbot
ADBOT LOVES YOU

Dielectric
May 3, 2010

Delta-Wye posted:


On a similar topic, does anyone know if you have to correct for the unequal voltage in the ac waveform? I haven't gotten far enough in my triac experiments to figure this out, but I've always assumed that the jump from 75%-65% and 35%-25% is smaller than the jump from 55%-45% because most the energy is in the middle of the waveform where the voltage is greatest, so you would have to have a nonlinear duty cycle steps to get a linear change in brightness.


Yes you do, plus if you're playing with brightness you have to account for the logarithmic response that your eyes have. Because of the triac holding current you can't get too low either (not sure if an SSR cares, but I imagine it does). And it's nice to pulse the triac gate a few times to get it to latch nicely. PITA.

I've done the correction with lookup tables in the past. It really does make a huge difference in the perceived linearity of the dimming curve.

ANIME AKBAR
Jan 25, 2007

afu~

DahtBard posted:

Nope! Powered straight through the mains. Here's a pretty simplistic picture I just threw together in Eagle though.



The signal is just the Arduino sending out 5v. The SSR has a (in my opinion) odd turn-on voltage of 1.4V, hence the resistor. The "XMAS" LED represents the strand of about 20 LEDs, all in series. It works perfectly well for just on and off, but as I said, we're slightly confused on how to get dimming to function. Some people have suggested looking into back to back BJTs or MOSFETS, but I've heard stories of reverse biasing though leading to bad results for your control logic.
You really shouldn't drive LEDs off of AC. LEDs in general do not tolerate reverse bias well, and you'll probably burn them out eventually. At the very least throw in a blocking diode in series with them.

It also makes dimming much more difficult. Theoretically it's possible to use phase dimming on LEDs, but their nonlinear characteristics make it hard to get consistent and linear brightness out of them.

evilmonkeh posted:

I've had a PCB made with an STM32 and some other bits and pieces, and mostly it seems to work great apart from some instability when I first power it up; sometimes it crashes. If I then reset it it works fine, which suggests to me that it is a power supply issue. Does anyone know any good techniques for debugging this sort of thing? I have an oscilloscope!
Many microcontrollers have a register whose contents tells the cause of the last reset, and maybe the contents of the CPU status registers before the reset (like exception flags, etc). If yours has such information then it's worth checking out.

Other things to consider:
1. Check whether a brownout detector is being used. Try enabling/disabling it.
2. If the MCU has multiple supply voltage (for I/O, CPU, analog, etc) make sure they come up in the order recommended in the datasheet (most datasheets will mention this somewhere).
3. Make sure there are no odd transients in your power supply on turn on.
4. Maybe your oscillator is having issues?

If all else fails, make your own power on reset (POR) circuit.

ANIME AKBAR fucked around with this message at 03:57 on Jan 27, 2012

Slanderer
May 6, 2007
So one of my friends needs help making an LED lighting system for some art / architecture project. However, outdoor electronics just isn't my thing...

If I make an LED controller, for LED strings that are already waterproof, how should I protect it? Should i get some sort of conformal coating compound, and cover the main PCB? Should I submerge the whole thing in potting compound? Or should I just get a waterproof enclosure with water resistant connector gaskets?

I'm sorta outta my element with this. I don't know if potting compounds have any particular limits on temperature (since I'll be dissipating a bit of heat), so I don't know what will work. And while I get get water resistant buttons and switches for an external control panel board, should the wires just come straight out of the potting material, or is there some special strain relief?

And what about the connections that need to be made in the field? I'll have to prefab the controller, and then hook up the LEDs and power in the field...but I don't know how much isolation things will need in order to be good. Screw terminals, at least, I can space far enough apart that 12 or 24V won't be a problem. But it'll be hooking up the switching AC-DC supply that's an issue...

DethMarine21
Dec 4, 2008
Can anyone recommend a company that will do PCB manufacturing and board assembly for the best price? I haven't gotten any quotes from Screaming Circuits or the other companies I found through Google yet but I thought I'd check here for any recommendations.

e; I only need a short run, probably ~50 boards.

DethMarine21 fucked around with this message at 20:45 on Jan 29, 2012

Krenzo
Nov 10, 2004

DethMarine21 posted:

Can anyone recommend a company that will do PCB manufacturing and board assembly for the best price? I haven't gotten any quotes from Screaming Circuits or the other companies I found through Google yet but I thought I'd check here for any recommendations.

e; I only need a short run, probably ~50 boards.

Try http://www.ultimatepcb.com. I have only used their PCB fabrication, but they were really cheap for that.

Slanderer
May 6, 2007

DethMarine21 posted:

Can anyone recommend a company that will do PCB manufacturing and board assembly for the best price? I haven't gotten any quotes from Screaming Circuits or the other companies I found through Google yet but I thought I'd check here for any recommendations.

e; I only need a short run, probably ~50 boards.

I've always liked Advanced Circuits, and I *think* they do assembly too now. But their website seems to be down atm (they have to still be in business, though, just got holiday emails from them a month ago).

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
I've got this Icom PCR-100 that I have wanted to hack on for a while. I added a 10.7 MHz IF out a while back, but wanted to rig it up to be controlled by something other than a PC, as the software out there is terrible, and I figured if I'm going to write software I'm going to do a hardware UI as well. It has a proprietary but documented serial control protocol, just hook up at 9600 and go.

I dug up the command spec and schematics and started looking. First problem was that it has a real RS-232 in, whereas my Uno only has TTL. I reasoned that nothing really speaks RS232 levels internally, so I started looking for a level converter chip on the radio, and found it. After finding the datasheet for that, it appeared to have an enable pin that when high would cause the chip to convert RS232 to TTL, and when low would float all the ins and outs. Found the line from the CPU to the enable pin on the converter, as well as the TX and RX pins, and lifted a side of the diode that provided the high signal.

From there it was easy to tack two wires on to the CPU pins, bring them out and wire it up.

Now that I have that part done, I have enough code written that the radio is turning on, setting volume and tuning to a station. The rest is just UI and writing the program.

I'd like to find a decent quality rotary encoder without detents, and would love any suggestions for what to look for. It doesn't have to have a very fine resolution, but my ultimate plan is to retrofit all of this into an old radio and a clicky tuning knob wouldn't feel right. It can come with or without a push function, doesn't really matter.

nobody-
Jun 4, 2000
Forum Veteran
I'm trying to add a LCD readout to one of my PIC projects, but I'm having trouble getting the LCD module to initialize reliably when I power the circuit on. Normally, when I switch it on, the LCD will stay blank or print a bunch of gibberish instead of the text string I'm sending it. Once I pulse the MCLR pin on my PIC low to reset the microcontroller, the LCD works perfectly, so the problem only seems to occur from a cold start. I've tried adding a 1 sec delay in my firmware so voltages have a chance to stabilize before I initialize the LCD, but this doesn't seem to have any effect. Anyone have any suggestions? This is just a standard HD44780 2 line text LCD module, by the way.

The Gunge
Aug 20, 2011
I have a quick question about soldering irons, and using them as a heating component in another project I'm working on. If I were to hook up a potentiometer to the soldering iron, what would be the relationship between the temperature of the iron's tip and the setting on the pot? For example, if a 15 watt iron peaks at about 550 degrees F, would setting the pot to 50% give me 275 degrees?

Also, would using a potentiometer even be reasonable with a 15 watt iron? I've read that pots dissipate too much power to be practical with anything over 1w.

Thanks for your help, hope I didn't embarrass myself too much with my nooby lingo

sixide
Oct 25, 2004

The Gunge posted:

I have a quick question about soldering irons, and using them as a heating component in another project I'm working on. If I were to hook up a potentiometer to the soldering iron, what would be the relationship between the temperature of the iron's tip and the setting on the pot? For example, if a 15 watt iron peaks at about 550 degrees F, would setting the pot to 50% give me 275 degrees?

Also, would using a potentiometer even be reasonable with a 15 watt iron? I've read that pots dissipate too much power to be practical with anything over 1w.

Thanks for your help, hope I didn't embarrass myself too much with my nooby lingo

A potentiometer is the wrong way to do this. You could make it work with an adjustable power resistor, but it's dumb and wasteful.

A variac is the low-tech (easy, expensive) solution. PWM is the modern (more difficult, cheap) way to do it.

edit: Or for both easy and cheap, use a residential light dimmer.

sixide fucked around with this message at 03:19 on Jan 30, 2012

The Gunge
Aug 20, 2011

sixide posted:

A potentiometer is the wrong way to do this. You could make it work with an adjustable power resistor, but it's dumb and wasteful.

A variac is the low-tech (easy, expensive) solution. PWM is the modern (more difficult, cheap) way to do it.

edit: Or for both easy and cheap, use a residential light dimmer.

Awesome, thanks. I was actually going to use one of those, I figured it was just a simple potentiometer. Do you have any idea of how it would affect the temperature output? Or would it be best to just measure it myself?

sixide
Oct 25, 2004
I think your assumption (temperature is linear vs. power) is a fair first-order approximation.

Old dimmers were resistive, but I don't think they've used those for a couple decades at least.

longview
Dec 25, 2006

heh.

nobody- posted:

I'm trying to add a LCD readout to one of my PIC projects, but I'm having trouble getting the LCD module to initialize reliably when I power the circuit on. Normally, when I switch it on, the LCD will stay blank or print a bunch of gibberish instead of the text string I'm sending it. Once I pulse the MCLR pin on my PIC low to reset the microcontroller, the LCD works perfectly, so the problem only seems to occur from a cold start. I've tried adding a 1 sec delay in my firmware so voltages have a chance to stabilize before I initialize the LCD, but this doesn't seem to have any effect. Anyone have any suggestions? This is just a standard HD44780 2 line text LCD module, by the way.

I've had problems with SPI displays because of stray capacitance on the data lines (probing would make it work), but for a cold start I'm maybe thinking not enough decoupling on the power line?

JEEVES420
Feb 16, 2005

The world is a mess... and I just need to rule it
novice question:

I am building a Nixie Tube clock from a kit. I have followed the guide pretty close and all my soldering looks good. When checking the power the 5v reads correct however when I check the 170v it is reading 48v when the guide says it should be reading 80-300v. I tried to adjust the trim pot and all I get is anywhere from 45-48v. Am I just reading this wrong or is there something wrong with a part/soldering?

Slanderer
May 6, 2007

JEEVES420 posted:

novice question:

I am building a Nixie Tube clock from a kit. I have followed the guide pretty close and all my soldering looks good. When checking the power the 5v reads correct however when I check the 170v it is reading 48v when the guide says it should be reading 80-300v. I tried to adjust the trim pot and all I get is anywhere from 45-48v. Am I just reading this wrong or is there something wrong with a part/soldering?

That's an...uhh...interesting design. The HV is being crudely stepped up from an unrelated 9-12V input, and I've never seen that config of the control pin on the 555 before. A quick search however uncovers this:
http://dos4ever.com/flyback/flyback.html#boost2
Which is exactly the same, except for the transistors used, the inductor and capacitor values, a couple of the resistors for the feedback, and the fact that it is 12V and not 9-12V.

Have you completely assembled it already? If so, can you desolder R6 or NE1, and check the unloaded voltage at the HV test point?

I would suggest measuring the output frequency, if you have the capability, but I actually have no idea what it will be when that feedback kicks in, and I don't think the guy who made it really knows either. In fact, that site I linked above gives the wrong free-running frequency, since they seem to have just copy/pasted the math. However, without feedback, it should be like 31.1kHz...

Otherwise, make sure the correct valued resistors are in the right place, and if possible, try desoldering and testing Q1 and Q2 (particularly Q2...)

ANIME AKBAR
Jan 25, 2007

afu~
It's pretty much impossible to know what the operating frequency will be when the feedback is working. It's sort of like a bang bang controller, but there's no hysteresis at all. At steady state it might actually find an operating point where Q1 is conducting slightly, and the 555 is oscillating at a very high frequency (due to the control voltage being pulled down).

bobua
Mar 23, 2003
I'd trade it all for just a little more.

On topic but out of left field, radioshack still sells their electronic learning lab! I received this thing when I was about 10 and it was an amazing learning tool. If you have kids or will have kids someday, getting them one of these is a must! You can google\image search electronics learning lab and take a look. I'm sure most of you have seen it, hell it might even have been mentioned in this thread, but it bears repeating. It's a lot of fun, and tricks you into learning quite a bit.

TheLastManStanding
Jan 14, 2008
Mash Buttons!
I need help with transistors.

I have the circuit below and I'm trying to replace the switch with a transistor. From what I've gathered it would be best done with a PNP transistor since the load is downstream of the switch; however, I can't seem to find cheap/available 400v pnp transistors. Ebay has a ton of 400v 2-5amp NPN transistors for $1, but nothing similar in PNP (as far as I can find) and I'm not sure why. Can this be done with a NPN? Is there some other transistor type device I should be using?

I'm also not sure how to calculate the resistor that would go along with the transistor. The values for voltage and resistance below are correct. I'm not sure what the inductor or capacitor values are, but they should be relatively small.

Krenzo
Nov 10, 2004
Does anyone know of something like this that doesn't cost a fortune?

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp
Are you trying to equip a real lab that is going to want some sort of semblance of professionalism? Or is this just for giggles?

If it's for a hobby workbench, I would take a look at ripping apart a $10 drafting style lamp from Walmart, or something like that.

Nerobro
Nov 4, 2005

Rider now with 100% more titanium!

How does $3 strike you?
http://www.harborfreight.com/helping-hands-319.html

It's big brother for $7
http://www.harborfreight.com/jumbo-helping-hands-with-led-lights-65779.html

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

I'm not entirely sure about the size of the probe holder, but something like this might work as a substitute: http://www.amazon.com/THIRD-HAND-DOUBLE-CLAMP-HORSESHOE/dp/B000HYMRD2

efb

Ravendas
Sep 29, 2001




Maybe a silly question or request, but I was wondering:

I DM D&D games, and am making my own DM screen, and would like to incorporate a set of displays to show the life totals of various monsters.

Basically, a display like this: http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_null_24715_-1

How easy would it be to hook something like that up to a pair of buttons or a switch that just increments/decrements it? So when they come to a group of goblins or some such, I can just turn on the displays, and increment each one to the monster's life total, then decrement it as they take damage.

I have a breadboard, a bunch of wires and random buttons, and can pick up some of these display units, or anything really, at a store here. I've also made a few simple things with leds and buzzers and such, so I'm not completely hopeless, just mostly.

Corla Plankun
May 8, 2007

improve the lives of everyone
There is not really an easy way to interface with 7 segment displays without a microcontroller of some sort. I would recommend something more like an LED vu meter controlled by a potentiometer or something along those lines. Plus the vague nature of a strip of LEDs is more D&D-appropriate in my opinion.

edit: \/\/\/ ugh :ughh:

Corla Plankun fucked around with this message at 18:56 on Feb 2, 2012

Bad Munki
Nov 4, 2008

We're all mad here.


Either way: arduino! :downs:

Or the imho-better teensy: http://pjrc.com/teensy/teensyduino.html

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

There are ICs that take BCD input and drive a 7-segment LED. They are not very popular anymore, of course. You could use a counter IC that is controlled by pushbuttons and the BCD->7seg IC to make a simple counter. Cost and complexity is going to approach arduino pretty fast, though.

e: There are also mechanical counters, called thumbwheels, that you could use for a low-tech approach:

taqueso fucked around with this message at 22:49 on Feb 2, 2012

Bad Munki
Nov 4, 2008

We're all mad here.


Corla Plankun posted:

edit: \/\/\/ ugh :ughh:

Pffft. Whatever! It's a project about controlling LEDs, that's what the arduino was specifically designed for! :downs:



e: also submit it to hackaday

Slanderer
May 6, 2007
Don't they sell discrete electronic LCD/LED counter modules that will increment or decrement with a pulse?

Krenzo
Nov 10, 2004

Nerobro posted:

How does $3 strike you?
http://www.harborfreight.com/helping-hands-319.html

I have this, and it sucks.

ANIME AKBAR
Jan 25, 2007

afu~

Krenzo posted:

I have this, and it sucks.

It's from harbor freight.

JEEVES420
Feb 16, 2005

The world is a mess... and I just need to rule it

Krenzo posted:

I have this, and it sucks.

I have this one and its not too bad however I don't use the soldering iron holder.

http://www.radioshack.com/product/index.jsp?productId=3928375

Ravendas
Sep 29, 2001




Slanderer posted:

Don't they sell discrete electronic LCD/LED counter modules that will increment or decrement with a pulse?

That's what I was hoping for, something simple (non-arduino) that would have a wire linked to increment, and another to decrement, that would be easy to hook some buttons up to.

Anything like that exist?

I live in Taiwan, so all this stuff is cheap to get, and I know of a bunch of stores that are just filled with this stuff, but the shopkeepers typically don't speak any English, and my electronic Chinese is basically non-existent, so I can't just ask the people in the store.

Slanderer
May 6, 2007

Ravendas posted:

That's what I was hoping for, something simple (non-arduino) that would have a wire linked to increment, and another to decrement, that would be easy to hook some buttons up to.

Anything like that exist?

I live in Taiwan, so all this stuff is cheap to get, and I know of a bunch of stores that are just filled with this stuff, but the shopkeepers typically don't speak any English, and my electronic Chinese is basically non-existent, so I can't just ask the people in the store.

I searched really quick, and I only saw one or two electronic up/down counter modules, and they were like $50 or more...

Maybe it would just be cheaper to hack apart the buttons on something like this:
http://www.amazon.com/GOGO-Electronic-Counter-Digital-Clicker/dp/B003WJ45EI

It's funny, if you just wanted to count up, you should basically do this entire thing with 1 IC. But counting down? Well, you're hosed!

If you do any electronics, though, the quickest solution would be to get something like this:
http://www.sparkfun.com/products/9767
reflash the firmware on the controller with something braindead simple that drives the display and software debounces some button inputs (or a rotary encoder!), and wire a few of them up with power.

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

taqueso posted:

There are ICs that take BCD input and drive a 7-segment LED. They are not very popular anymore, of course. You could use a counter IC that is controlled by pushbuttons and the BCD->7seg IC to make a simple counter. Cost and complexity is going to approach arduino pretty fast, though.

e: There are also mechanical counters, called thumbwheels, that you could use for a low-tech approach:


Besides my obvious enjoyment of this picture, I also wanted to mention thumbwheel switches, they were extremely popular for years and are rock solid. Plus you can kind of get a retro/industrial/Fallout vibe going on for the box design.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Jonny 290 posted:

Besides my obvious enjoyment of this picture, I also wanted to mention thumbwheel switches, they were extremely popular for years and are rock solid. Plus you can kind of get a retro/industrial/Fallout vibe going on for the box design.

And the output of the thumbwheels are often BCD, so you can drive 7-segment displays with one IC per digit. Example driver: http://www.ti.com/lit/ds/symlink/sn7447a.pdf


----
edit to avoid double posting:
A year or two ago I ran across a place that had a program for converting leaded solder pots to lead free. Basically, they shipped you a bunch of tin to use for cleaning, plus a testing kit. After using the tin to clean the pot, you ship it back to them. It was much cheaper than just buying tin for one use. Does anyone know what I am talking about? Anyone know a company that does this?

taqueso fucked around with this message at 00:32 on Feb 4, 2012

FetusPorn
Jul 7, 2003

WUGT: Creatures attack and block as normal, but none deal any damage during combat. All attacking creatures are still tapped. Use this ability any time
Can someone educate me on what I'm doing wrong with my power mosfets?

I'm attempting to use a fdp8896 power mosfet to power a DC motor via a PWM signal. The motor will draw probably 2-4 amps at 12v normally, but can spike up to 10amps (I'm told).
I've gotten the same results when powering the gate directly, or through a mosfet driver.

Mosfet Data Sheet: http://www.fairchildsemi.com/ds/FD/FDP8896.pdf

It claims to have an RDS(ON) resistance of 0.006Ohms at 4.5v gate voltage... Unless I'm totally misunderstanding this, How come I only read 3.15v out of my source when applying 5v to the gate and 12v to the drain? Even if I supply 12v to the gate, I still only get about 10.2v from the source.

I really need the fet to act like a switch to get enough voltage to the motor in my final circuit. Can someone recommend a product that will do what I want, or tell me what I'm doing wrong?

Thank you

sixide
Oct 25, 2004
That 4.5V in the datasheet is gate-source voltage, and my best guess is that you're measuring relative to ground.

In your 12V "gate voltage" example, your Vgs is only 1.8V (best I can tell) and very likely you aren't getting anywhere near saturation.

Post a schematic, because it sounds like your design has some issues.

FetusPorn
Jul 7, 2003

WUGT: Creatures attack and block as normal, but none deal any damage during combat. All attacking creatures are still tapped. Use this ability any time
I suppose I am measuring relative to ground... that's where the other pin of my motor is going to be connected, so why not?

In my test, I've replaced the motor with an LED/Resistor just to confirm functionality... but as I mentioned, I'm not seeing the right voltages coming through the FET.

The attached image is what I'm working off of as far as design. I'm just trying to find parts that make it work properly. Got the MCU, and control circuitry figured out... just not the power management.

Only registered members can see post attachments!

Adbot
ADBOT LOVES YOU

Delta-Wye
Sep 29, 2005

FetusPorn posted:

I suppose I am measuring relative to ground... that's where the other pin of my motor is going to be connected, so why not?

In my test, I've replaced the motor with an LED/Resistor just to confirm functionality... but as I mentioned, I'm not seeing the right voltages coming through the FET.

The attached image is what I'm working off of as far as design. I'm just trying to find parts that make it work properly. Got the MCU, and control circuitry figured out... just not the power management.



It looks like Q1 is your driving mosfet (it makes the motor go) and Q2 is your braking mosfet (it shorts the motor out, making the (slotcar?) stop suddenly). Please correct me if I'm wrong.

Assume Q2 is off, and we are controlling Q1 to make the car go. The mosfet you linked to is an N-channel. Ideally, when it is on and it reaches saturation Ron is very small, so the voltage across it goes to zero (effectively). Usually you would connect it on the low side of the load, but yours is connected to the high side. That means all the voltage is across the motor, and Vs of Q1 is close to V+ of the power supply (once again, assuming it is in saturation). This means the gate has to be at Vthreshold + V+ for the assumption about saturation to be true. That means your mosfet driver has to be putting out higher than V+ to get Q1 into saturation. You don't specify what the mosfet controller is, and this can be achieved with a voltage boost circuit but I have no idea if that is what the mosfet controller does. You can also replace Q1 with a Pchannel and just reverse the logic (pull the gate to ground to turn it on).

The braking mosfet looks like it might be okay, depending on how you're driving it. Driving both Q1 and Q2 is not a good idea, fyi.

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