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
TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!
Check for continuity between each leg of the power the wire itself. Power cables can short internally if they're old/beaten up. A common spot is where they enter whatever enclosure they're powering. The fact that it's power switch independent and it's not tripping the breaker makes me think of that as a first troubleshooting step.

Adbot
ADBOT LOVES YOU

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

BattleMaster posted:

I've got the hardware designed and I don't think there are any issues with it, but what algorithm should I use to control the buck converter? I'm pretty decent at embedded programming but power control is new territory for me so I don't know where to begin with programming that.

Go to http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2524&param=en539690 and sort the device type to the appropriate dsPic family. There are a few different DC/DC code examples for different feedback types. That should get you started.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Exitlights posted:

So, I nearly blew another BJT transistor yesterday after switching from a lovely tiny transistor to a power transistor. The things are just limiting the current too much and getting too hot in the process. If I switch to a MOSFET, will I have better results? Looking at Mouser, I'm seeing a power MOSFET rated for resistance from drain to source at 5.3 mOhms, which should let all the current through I need. Is this right?

If you're the guy trying to manipulate his car's electrical system, get a relay and be done with it.



Sorry the schematic is so awful, I don't have schematic software or visio on this computer.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Unparagoned posted:

Won't you want a diode across the relay?

Yes you would, sorry. That was a lazy attempt before work this morning.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Unparagoned posted:

I've got this circuit but it has some strange behaviour and not too sure on why.
It's a standard 555 astable circuit connected to a npn transistor connected to an audio transformer. The problem I'm having is I get really weird behaviour when I vary R3. It changes the frequency output of the 555, as R3->0 the frequency gets faster. I don't really understand why.


Just a guess, but what happens to your 9V supply as R3 -> 0? Is it sagging?

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Unparagoned posted:

Edit: Oops, I was going by memory, check it out and there is a massive change on the 9V supply, it's a square wave going between 9V to 4V or so. So I guess that is going to have a major impact. Now I need to now how to stop it.

What's happening is that you're sucking current equal to (9V/(resistance of transformer coil+potentiometer resistance)) to ground. The transformer is probably a low resistance, making your current draw really high as your potentiometer resistance approaches zero. Your power source (I'm guessing a battery) can't deliver that much current, so the output voltage is sagging.

To solve this problem, you could try putting a current-limiting resistor between your power supply and the node that the diode cathode and the transformer are connected to. What are you trying to accomplish with this circuit? It seems like if you were trying to vary the output, you'd be manipulating the voltage divider on the other side of the 555.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Unparagoned posted:

Are there any tips on reverse engineering a circuit? Say a simple PCB with both tracks visible.

When you say both tracks...you're talking literally two traces? Or that you can see both top and bottom traces?

The biggest thing is that if you are trying to read component values (especially resistors that you can't read the print on or capacitors) you'll probably need to remove them from the circuit to get accurate measurements of their values. Do you have a picture of what you're trying to break down?

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

SniperWoreConverse posted:

Awesome, thanks. I thought Radio Shack might have it, but I thought they were sort of backpedaling on this kind of stuff. And Digikey is blowing my mind.

Just for completeness, if Digikey is blowing your mind, there's also Mouser and Newark for components. Between those three and Allied Electronics for bigger stuff (more industrial focus) you should be able to find anything you'll ever need.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

nobody- posted:

From what I can tell from the schematic, one is a decoupling cap between the +5v and ground pins on a microcontroller, and the other caps look like they filter a resistor-based DAC network that controls the base current on a Darlington transistor. Here's the schematic: http://www.piclist.com/images/member/RB-ezy-Q33/LiniV2_sch.gif C3, C5, and C6 are listed as tantalum capacitors in the bill of materials.

I know I can get away with an electrolytic cap on the microcontroller pins (or get rid of it entirely, since I'm using a pretty stable power supply for my circuit), but I don't know about those filter caps.

C3 is just a bulk cap. You can do away with it, but I know PIC devices usually recommend using a .1 uF (maybe it's .01, my documentation is at work) ceramic bypass cap across VDD and GND. If I were building the circuit, I would feel comfortable replacing the C5 and C6 parts with ceramics as well.

A last note, if you're going to have the MCLR pin on the pic enabled, you're going to want a 10K pullup with a .001 uF cap to ground for protection against inadvertent resets. The way he has it drawn up, it's possible that an ESD discharge on the 5V bus could cause erratic operation.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

PDP-1 posted:

I don't really disagree that they cost a lot for what they do. There are, however, a couple of factors that justify paying a bit extra:

1) These cards have 16 bit resolution. You can get cheaper, faster cards if you don't need that kind of detail in your signal but accuracy drops off pretty quickly as sampling rate increases. For example, you can get an oscilloscope or A/D card with a few hundred MHz bandwidth and a much faster per channel sampling rate for $1000 USD if you don't mind being limited to 8 bits on the A/D conversion. For (a lot) more money you can push it out to 10 bits direct sampling, or an effective 11 or 12 bits if you can average the signal over multiple cycles. In our case we estimated that we needed 14 bit resolution at 1 MS/s so a 16 bit card was the best available choice.

2) Say what you will about NI (I've had serious issues with some of their hardware in the past), but for the most part you just jam their equipment into your computer and *BAM* it shows up in LabVIEW ready to use. On the odd occasion when it doesn't work right out of the box their support is really good - I've posted issues on the NI discussion boards that get a response from a knowledgeable engineer in under an hour. That kind of ease of use + support is really important when you're working on some new measurement system - in early development we're much more focused on "oh God, there is phase jitter in the detectors" kind of issues and don't want to be distracted with configuring COM drivers for the hardware on top of that. Instead there's more of an attitude of "rough it out in LabVIEW, get it to work, and then go back and re-code the control system in a language that doesn't look like a clown barfed on your monitor". The NI cards work well with both LabVIEW and C#/.NET which supports both development phases well.

So, card capabilities plus ease of use are worth a bit of cash up front if it will pay off in terms of getting the thing up and running quick. Also work pays for the hardware, not me, and I think they tolerate an extra $1k better than I would for a home hobby project. That said, I loving hate programming in LabVIEW and am getting to the point of just wanting to skip to C# so if there are better, cheaper options out there that support .NET lemme know. :)

Have you considered labwindows/CVI? It's C based and looks like it does .net integration. If your work springs for the development suite version of labview, you've got a license already. Labview is painful, but I'm stuck using it too. I've thought about switching over to labwindows, but I can't find the time to learn enough that my project deadlines won't be affected.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Bad Munki posted:

Why would you want a component with leads like this:



instead of straight leads?

Holds the component off the board. That looks like a PTC, which can generate a lot of heat. Holding the part off the board allows it to cool better, and keeps heat soak on the board to a minimum.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Unparagoned posted:

I do now, with the help of paint. So if I used the probe on the right side of D1 C would start charging to 100V.
Using a 100X probe showed that the diode D1 I put there to protect my pic so I didn't blow another one up meant that T2 wouldn't switch.


I would probably have a resistor instead of D1, and an additional base resistor on T1. The probe could be adding capacitance wherever you are touching it. I would also add some series resistance because your initial current draw to the uncharged capacitor is going to be very large, potentially damaging parts of your circuit.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Three-Phase posted:


1. Ethernet connection to my router, have the device somehow send e-mail every X hours or when something significantly changes
2. Have a RS-232 connection from the microcontroller to a modem

As far as the modem goes, I'd just make a long-distance call to my apartment, and have the microcontroller initialize the modem on boot (send a command that specifies 9600 baud, parity, answer on the first ring) and just wait for me to phone home to it. After initializing, the microcontroller would just send text data to the RS-232 port every 10 seconds or so.


When one of my friends was doing information collection from remote weather stations, he used a GSM modem to transmit text messages to a central server. You could have the system text you every hour with "ok" and immediately any time there was an event. Just another thought, I don't know how the costs on that would work out since you need a sim card and cell service. It might be cheaper than adding a second phone line though.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Slanderer posted:



With interrupts based on timers, it's easier to make sure specific events run with a fixed frequency, which is great for polling sensors or PWMing output or doing a serial bus in software. However, you gotta be careful that certain interrupts aren't going to be conflicting with each other, both in terms of time (one interrupt either preempting another at a bad time, or one interrupting masking another), or in terms of problems with the interrupts trying to mess with the same bit of memory at a bad time (which only really applies to multilevel interrupts if you don't have much code outside the interrupts themselves).


I'm not sure if the 18F has this, but some of the nicer pics have high and low priority interrupts. When you get up into pic32 and dspic parts, they have something like 9 settable interrupt levels to deal with stuff like this.

Slanderer posted:


One other area that this can be an issue is with low power / sleep modes.

If I remember the datasheets I've perused correctly, modern pics will have "wake on interrupt" or some such similar feature where you can throttle them down and then when the interrupt fires they'll go full speed.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

babyeatingpsychopath posted:

But really, why put an encoder on a stepper?

Positional confirmation and safety. Say you're using an arm with a stepper motor to move a bottle from a holding line to a filling line. You don't want the release jaw on your arm to activate unless you're sure the motor reached the desired end position. Otherwise you could drop the bottle on the ground, into the machinery, etc.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Jonny 290 posted:

Yeah, let's talk surplus gear, please. I'm about to get a bonus from work and can finally drop a couple hundo on test gear. I want a scope, signal gen and bench DMM in that order. I think I was narrowing it down to Tek 2213's or 2215's. Any opinions on good/bad models? I can't spend more than $100 per piece of gear, really. I will be wanting to work with <30 MHz RF stuff eventually, to start out I'll just be playing with audio amps.

I have a BK precision 2125B scope and a BK 2005B RF signal generator I could sell. I got them from an older audio engineer that was cleaning out his basement, and I don't really have a use for them. If either of those are interesting to you let me know.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!
I'd just throw an ac optocoupler on there, assuming you don't care about measuring the actual voltage level.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!
I would use an optocoupler in this situation to keep the vehicle power and micro power isolated. I can't sketch it right now (on my phone) but it'll be pretty simple.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Cheekio posted:

I'm looking to use a 2A USB wall wort to power an arduino project- can I just put the arduino and all my servos in parallel on the 5V in?

Turns out 9g servos love amperage when under high load.

You CAN, but with the motor loads you may find that your 5v rail gets pulled down when the servos pulse. I would put a bulk and filter capacitance as close as possible to your arduino to ensure a clean power supply. Or maybe that stuff is already built into your dev board. Not sure, I use bare pics usually.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

babyeatingpsychopath posted:

I'm designing a microcontroller device to go into an industrial environment. It looks like it's going to have 5-8 inputs, each of which may be connected by a (perhaps) long and (perhaps) unshielded wire. I may see up to 24VAC if someone connects a wire wrong. I will only be receiving a digital signal at low current and low frequency (button presses).

Standard design says to protect the input with shottky diodes, capacitors, and resistors. Even at 0603 form factor, 5 devices per pin eats board space pretty quickly. Is there some other solution for input protection?

Optocouplers are my go-to. That may not solve your board space issue though.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

GnarlyCharlie4u posted:

A dick in the hand is worth two in the bush?


I have a slight problem maybe this thread can assist me with.
I gutted one of those bullshit ceiling fans with the remote control crap yesterday. It had an AC motor so I just ripped the controller out and re-wired it to run on separate switches for the light and fan.

The original controller was a 3 speed remote with constant AC voltage output. Speed was controlled by capacitance. So presumably, the motor is meant to be a 3 speed motor as well (I don't know if that actually even matters).

Can I just toss a 3 speed fan wall switch like this on that ckt and call it a day?

Most likely yes, assuming that 3-speed controller is capacitor based.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!
Another option might be to break out your programming header into a weatherproof connector or something similar to allow you access while also allowing you to use potting.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!
Depending on your current needs you may be able to get there with a dual-rail PC supply.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Shame Boy posted:

The "rail" terminology is actually marketing lies, it's all the same 12V backend with the same common ground, putting them in series will just short it out.

Welp there's some poo poo I didn't know. That makes the thought of putting them in series for 24V not feasible so forget I suggested it.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Dominoes posted:

Hmm. It's a series of daily-chained grow lights. Ie 65-100W each @ 24v, × 1 - ~8 or so. Idea is it's modular, so 4A per unit. Nothing else in the setup is anywhere near that current. So sounds like I should just buy a separate relay unit that doesn't get near the other stuff, other than for the signal/pwr/fround for the relay. The proto's using a single 4A light on a standalone relay board.

This is getting a little scary to give advice on because 25A is a lot and can go wrong quickly, but the term you probably want to google is "lighting contactor".

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Dominoes posted:


There's a cap connected on the HDMI power (left-bottom 2-pad device in this pic), and one between the USB power pin and diode/source.

Hey so I'm looking at some of this...what is your current worst case pad/pad and pad/trace spacings? And what are the capabilities of the board house where you're planning to have this made?

Also I know you omitted your planes, but you need to be very sure that you've got continuous plane sections. It's easy (especially when you don't have DRCs implemented) to have segmented plane pours that result in a floating "ground".

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!
If I asked for a noise measurement I'd expect peak to peak. But that could just be my own special brand of brainworms. It's probably driven by what you are trying to use that data for.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

silence_kit posted:

? What do you mean here?

A digital interface operates by changing the voltage level on a wire from one voltage to another rapidly. Wire resistance and capacitance increase as wires get longer, meaning the wire gets less ideal and square waveforms start to get less and less square. The additional capacitance slows edge rates, which in a digital circuit means eventually your communication bus will fail due to missing signal timing windows. In 4-20 mA, the slightly slowed circuit response won't affect the end device.

The obvious tradeoff is amount of data sent. 4-20 basically sends one "command", which is a current level equivalent to a position. On a digital bus you have much more flexibility.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!
This sounds vaguely like something else might be fighting for control of that gpio pin. Sometimes (especially with poorly written library code) two conflicting programs try to use the same pin and wierdness like this can happen. Just a common troubleshooting steps to think about when you see issues like this.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Dominoes posted:

Appreciate it. Diving in, although this isn't bringing anything up on Digikey.

edit: Uh... I have some of the standard green screw terminals, and the forks fit if you double them up... Ie one prong per temrinal / 2 terminals per connection. 5mm spacing.

Use "Barrier Strips", although there's a few different types. Like this for example I've used on control panels for pump and thermostat wiring in the past:

https://www.te.com/usa-en/product-5-1437646-4.html

They are available in different pitches, that may be bigger than what you need.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Forseti posted:

Memory is cheap. Just get double what you need and flip the address after you update.

This. The way I've seen it done:
1) Device has 2x flash so that an entire new firmware image can be sideloaded
2) Update mechanism pushes updated firmware into memory space reserved for update image
3) update mechanism validates that firmware image is complete and valid, then sets a pending update flag somewhere
4) power cycle
5) bootloader checks for pending update, sees it, and uses new firmware, marking previously used area as the new update area

This way if your image is corrupted or you pull power or one of a million other things happens, you just keep using the previous firmware and you haven't bricked a device.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Dominoes posted:

edit: You've implied a more important point that I hear from time to time in descriptions of engineering, and making things in general... Just get it done. Stop getting wrapped up in the details. The isolation's out. Can add later once the whole thing's working. This thing's taken too long and I'm focusing on minutiae. Enough. (Multi-sensor water monitor). Balance between procrastinating and cutting corners. Find what's important.

I honestly can't keep track of what it is you're making. Aren't you the guy who put dimms and an HDMI port on his first PCB? And have designs on selling whatever it is you're making? But this is for a water sensor monitor? And now you're just handwaving isolation? I mean this in the nicest way possible, but please take a second and make sure whatever the heck it is you're doing will be safe.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Zero VGS posted:

I have three different automotive buck converters...All three of them are readying 12.3v when I tap a multimeter to them with no load, which is way too high.

Might be a dumb question, but what are you doing that would take an automotive converter, but not tolerate 12.3V on a 12V rail? That's like 2-3%, which generally speaking is well within typical (general use) supply tolerances. Put some kind of load on it and I'm sure it'll get even better.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Dominoes posted:

Let's say, for one of the readings, a sample and hold circuit is running for 1/4s or so. How would you keep the USB ms-order polling requirement alive?


If you're waiting a quarter second for anything on a microcontroller, that's not going to work. In uC land, something like that would be triggered, then you'd go off and handle other tasks, then you'd return to get your reading once the hardware interrupt fired or your scheduler flag was raised, depending how you're controlling program flow.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

huhu posted:

I've got a bunch of through hole diodes on a roll and I want to cut it up into 6 diodes per kit I'm making. What might be the easiest way to do this that isn't fully manual? Service? Machine you can 3d print/laser cut yourself? Etc.

Machines like this:

https://www.ddmnovastar.com/lead-formers/manual/f-1-axial-component-trimmer-former

is what my company uses in our manufacturing facilities. I'm not sure the particular brand, that was just the first good picture I could find of a similar machine.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!
Just watch your current ratings. 20 amps at 120vac is a large amount of energy. I wouldn't be surprised if rockers rated for that load were a few bucks apiece.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Not Wolverine posted:

That said, I have noticed something kinda funny about the ratings on dual pole switches. What I have seen has been like "8a 250v 10a 120v 8(16)a 120v". The first two make sense, but why have a set of two numbers on the amperage rating? Is this like a per pole rating, with the "8(16)a 120v" meaning it can handle two 8a lines for a total of 16a?

I have seen some dual pole devices derate when both poles are used, so the 8(16) could mean what you're saying. It could also be a load type derating like Stack Machine said.

So the answer is "it depends"! Hopefully there's some other clue or note on the datasheet to tell you. I'd be happy to look if you can link a sheet.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!
And a/d sampling. Set up read, get 200 samples direct to memory, get an interrupt when done.

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Cory Parsnipson posted:

Or maybe I'm doing something they don't like, but there's a fat chance of figuring out exactly what.

Thanks everyone for your help!

Thinking about this a little bit, what does the circuit around these look like? How are you powering them and reading them?

Adbot
ADBOT LOVES YOU

TacoHavoc
Dec 31, 2007
It's taco-y and havoc-y...at the same time!

Cory Parsnipson posted:

Yep, red is VCC and black is ground. I
I swapped out the thumbsticks for a new pair I got yesterday and after that everything started working again. So it seems to be an issue with the old thumbsticks. What I think happened is that I severed the traces internally by wiggling the cable back and forth too much. I fiddled with them on and off for a few weeks trying different orientations and positioning of the breakout board w.r.t. to the thumbstick body. Now that I type it all out I suppose that's a lot of abuse going to the cable. I thought I could treat it like insulated wire but apparently it's not as durable.

It sounds like you might have found the problem. The reason I asked about circuit layout is that I have seen instances in designs with potentiometers where the power dissapation in the pot isn't properly considered, so you can get damaging current levels at low resistance ranges. It looks like you're using a module that should have that covered though. It can manifest in the same way, where the circuit works for a while but the slider elements are heating up, then finally they burn up. Just something that hopefully helps someone someday.

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