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
KnifeWrench
May 25, 2007

Practical and safe.

Bleak Gremlin

coyo7e posted:

that's what gets me, all the arduino stuff puts the resitor in the negative but it seems as though I'm "losing juice" to light all the LEDs consistently after a certain point, and was wondering if moving them to the positive side might help. I thought I read something along those lines the other day, somewhere.

This sounds less like an issue of where the resistor is, and more like an issue of how the GPIOs are driving. If you put ground at the bottom and drive your 5V with a high GPIO, you'll eventually run out of current that you can source. But the Arduino can sink a lot more than it can source, so if you tie the top side to 5V and the low side to GPIOs, you can get a higher total current (still limited to the sinking capability or the power supply limit, whichever is lower).

Notably absent from your schematic above was how the GPIOs are connected, so it's the first thing I'd guess based on your symptom.

Adbot
ADBOT LOVES YOU

coyo7e
Aug 23, 2007

by zen death robot

KnifeWrench posted:

This sounds less like an issue of where the resistor is, and more like an issue of how the GPIOs are driving. If you put ground at the bottom and drive your 5V with a high GPIO, you'll eventually run out of current that you can source. But the Arduino can sink a lot more than it can source, so if you tie the top side to 5V and the low side to GPIOs, you can get a higher total current (still limited to the sinking capability or the power supply limit, whichever is lower).

Notably absent from your schematic above was how the GPIOs are connected, so it's the first thing I'd guess based on your symptom.
Yeah I think you're right, I'm getting kinda inconsistent results when trying to roll an 8-LED array in sequence so I must be missing something basic. I tried shifting around the pins and poo poo, but I think I'm just super rusty at code or something.

https://youtu.be/l43pDvvbBlI

coyo7e fucked around with this message at 02:44 on Jan 2, 2017

Zosologist
Mar 30, 2007
It's a long shot, but does anyone have any recommendations for a Bluetooth audio module I can buy in semi bulk? Something like this http://m.ebay.com/itm/111832076600?_mwBanner=1 ?

Preferably cheaper?

Stabby McDamage
Dec 11, 2005

Doctor Rope

Zosologist posted:

It's a long shot, but does anyone have any recommendations for a Bluetooth audio module I can buy in semi bulk? Something like this http://m.ebay.com/itm/111832076600?_mwBanner=1 ?

Preferably cheaper?

What exactly do you need to do? The board you linked includes amplification and speaker hookups...is that needed on the module?

I haven't done anything in this space before, but there appear to be plenty of options, including this simple BK8000-based module and many options in the automotive space. Hard to narrow further without more details.

Shame Boy
Mar 2, 2010

Also there's two different kinds of common "bluetooth audio" systems/protocols that i know of, one of them is for headsets and delivers bidirectional mediocre quality audio for phone calls, the other is for music which is unidirectional stereo but much higher quality.

Foxfire_
Nov 8, 2010

coyo7e posted:

Yeah I think you're right, I'm getting kinda inconsistent results when trying to roll an 8-LED array in sequence so I must be missing something basic. I tried shifting around the pins and poo poo, but I think I'm just super rusty at code or something.

https://youtu.be/l43pDvvbBlI

There is absolutely no difference where you put the resistor with the way you are driving it.

What specific board/microcontroller are you using? Depending on which one it is, it's ability to source/sink current through the GPIOs will be different.

The GPIO pins are usually divided up into individual banks that share a bunch of drive circuitry. As you run more and more current through a bank, it's voltage levels will tend to degrade. For example, with a 5V VCC and no load, you might see a pin set to high outputting 4.9V. If you used the pins to supply a bunch of current to some LEDs and resistors, you will see the voltage coming out of the pin decrease. There will be a spec in the microcontroller datasheet for a minimum high voltage and maximum low voltage at a given load. And there will also be specs for how much current you can run through it before damage starts to occur (the current generates heat and will eventually burn parts of the microcontroller IC).

In the case of your LEDs, the brightness of the LED depends on the current through them. If you turn on a bunch of them and are close to the drive capability of the GPIOs, the current will drop (V=IR, lower V implies lower I for constant R), and all the LEDs will dim. I suspect uneven light levels are caused by you crossing GPIO ports so that some are heavily loaded and some are lightly loaded.

If the microprocessor can't drive enough current to do what you want, the usual solution is to use a transistor as a switch. Only nanoamps/picoamps of current will flow into the transistor gate, so you won't overload the GPIO and all the LEDs will see your full VCC voltage.

Zosologist
Mar 30, 2007

Stabby McDamage posted:

What exactly do you need to do? The board you linked includes amplification and speaker hookups...is that needed on the module?

I haven't done anything in this space before, but there appear to be plenty of options, including this simple BK8000-based module and many options in the automotive space. Hard to narrow further without more details.

Sorry for being super vague. I'm looking to build a couple dozen Bluetooth speakers, and my electronics skills are a bit... attrophied. Just looking for recommendations, preferably based on personal experience.

Splode
Jun 18, 2013

put some clothes on you little freak
A ULN2003 would be handy for driving a bunch of LEDs.

Shame Boy
Mar 2, 2010

Zosologist posted:

Sorry for being super vague. I'm looking to build a couple dozen Bluetooth speakers, and my electronics skills are a bit... attrophied. Just looking for recommendations, preferably based on personal experience.

Small ones? Big ones? Like little 8-ohm speakers that could be driven by an onboard little speaker driver, or are we talking some kind of bigger loudspeaker?

Stabby McDamage
Dec 11, 2005

Doctor Rope

Zosologist posted:

Sorry for being super vague. I'm looking to build a couple dozen Bluetooth speakers, and my electronics skills are a bit... attrophied. Just looking for recommendations, preferably based on personal experience.

I haven't researched a ton, but my gut instinct is that it may be cheapest to get generic bluetooth modules and add on generic amplifier modules. As an added bonus, then you can size the amp to the speaker.

However, why are you building bluetooth speakers? The market is extremely well-served (glutted) by low-cost bluetooth speakers. You can get them waterproof, dangling, cubic, and in bulk. Most or all of those also integrate a rechargable battery.

Of course, "because I want to" is a perfectly fine answer - just curious about the motivation.

Shame Boy
Mar 2, 2010

Actually since they're so cheap you might be better off just buying some of those cheap ones and taking out the module/amp from the housing and adding your own speaker.

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

I've made a bluetooth amp/speaker thingy from AliExpress modules (BT module -> amplifier, plus power) and it worked out fine. If you want to actually implement the BT part, I would recommend the NRF52DK development kit for the Nordic NRF52 SoC. The SDK probably includes a bluetooth audio example, they seem to have example projects for everything.

ekuNNN
Nov 27, 2004

by Jeffrey of YOSPOS
What are those big yellow parts in this power supply? Because one of them exploded :v:

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

ekuNNN posted:

What are those big yellow parts in this power supply? Because one of them exploded :v:


Transformers robots in disguise

Platystemon
Feb 13, 2012

BREADS
Transformers should not explode.

I don’t just mean that in the sense of “no components should explode”, but also ”small transformers are especially non-susceptible to explosions. If one explodes anyway, someone seriously hosed up”.

Oil-filled industrial monsters are different.

Shame Boy
Mar 2, 2010

You can certainly make them explode but in order to do so a lot of other things (that would preferentially explode first) generally have to fail in very specific ways.

Post a picture of the actual exploded thing.

e: Eh thinking about it I'm lumping in really bad arcing with exploding since the end result you find when you open the box tends to be similar so I guess to get a transformer to actually detonate you'd probably need a lot more energy than is generally available to your average wall socket

Shame Boy fucked around with this message at 19:59 on Jan 5, 2017

Shame Boy
Mar 2, 2010

Also I have a question for the thread: I can't remember what this kind of thing is called and I'd like to google it. Basically some kind of device where you give it a binary input, and it raises a pin (and only one pin) corresponding to that input. For example, assuming it takes 3 bits of input and has 4 output pins (A,B,C,D), the truth table would be something like this:

code:
      | A B C D
0 0 0 | 0 0 0 0
0 0 1 | 1 0 0 0
0 1 0 | 0 1 0 0
0 1 1 | 0 0 1 0
1 0 0 | 0 0 0 1
1 0 1 | 0 0 0 0 (invalid since there's no E pin)
It's basically a binary to decimal converter but all the BCD converters I see are meant to drive 7-segment displays or something like that so they don't output single things at a time.

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

ate all the Oreos posted:

Also I have a question for the thread: I can't remember what this kind of thing is called and I'd like to google it. Basically some kind of device where you give it a binary input, and it raises a pin (and only one pin) corresponding to that input.

Off the top of my head, this can be done with a demultiplexer or a binary decoder.

ynohtna fucked around with this message at 20:48 on Jan 5, 2017

Shame Boy
Mar 2, 2010

ynohtna posted:

Off the top of my head, this can be done with a demultiplexer or a binary decoder.

Yeah looks like digital demultiplexers do what I want, thanks!

e: Just so I can find it later after work: a 74159 is basically exactly what you want, future me

Shame Boy fucked around with this message at 20:56 on Jan 5, 2017

ekuNNN
Nov 27, 2004

by Jeffrey of YOSPOS

ate all the Oreos posted:

You can certainly make them explode but in order to do so a lot of other things (that would preferentially explode first) generally have to fail in very specific ways.

Post a picture of the actual exploded thing.

I heard a Very loud pop/crack when I turned on the power, also a breaker tripped. Inspecting the inside didn't really reveal any damage other than this (sorry for the bad photo its hard to take a picture in there)


The one on the right is I think how it should look, you can see that little round shiny thing is still in its slot in the metal. On the right hand side, circled by the red, you can see the bottom of the transformer seems to have blown out. You can see the yellow of the outside container, and you can look into the insides of it.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

ekuNNN posted:

I heard a Very loud pop/crack when I turned on the power, also a breaker tripped. Inspecting the inside didn't really reveal any damage other than this (sorry for the bad photo its hard to take a picture in there)


The one on the right is I think how it should look, you can see that little round shiny thing is still in its slot in the metal. On the right hand side, circled by the red, you can see the bottom of the transformer seems to have blown out. You can see the yellow of the outside container, and you can look into the insides of it.

OK, the yellow "container" is tape that's covering just coils of wires. I think its natural to for the ends of the coil to be visible, where the tape isn't wrapped, on the ends.

The round shiny thing "in its slot" looks like epoxy resin that just happened to drip through that slot before it cured. Also I think the first instance of "right" in your post, you mean "left"?

e: I don't know anything about the circuit being used there but depending on their purpose, the two transformers might not be wound identically, so the exact wiring and coil configuration may differ in appearance.

peepsalot fucked around with this message at 23:54 on Jan 5, 2017

ekuNNN
Nov 27, 2004

by Jeffrey of YOSPOS

peepsalot posted:

OK, the yellow "container" is tape that's covering just coils of wires. I think its natural to for the ends of the coil to be visible, where the tape isn't wrapped, on the ends.

The round shiny thing "in its slot" looks like epoxy resin that just happened to drip through that slot before it cured. Also I think the first instance of "right" in your post, you mean "left"?

e: I don't know anything about the circuit being used there but depending on their purpose, the two transformers might not be wound identically, so the exact wiring and coil configuration may differ in appearance.

Oh, doh. :doh: Yes I meant left first. And the thing in the slot is actually a little metal tab. Theres two of them and they go into the two slots in the metal on the left one that looks more normal. On the right one they're also there but they're obviously below the slots. Both transformers are marked the same, but you might be right that the right transformer is supposed to look different, because it has those three thick metal wires connected to it at the bottom, while the one on the left has them entering at the top, maybe it's lower because it needs the space for that connection? It's just that it's the only weird-looking part on the circuit board and something made a Very loud noise, which usually also means you can see what popped pretty easily.

poeticoddity
Jan 14, 2007
"How nice - to feel nothing and still get full credit for being alive." - Kurt Vonnegut Jr. - Slaughterhouse Five
I feel like there's something simple I'm missing, so I'm requesting a sanity check.

If I have a battery running through a current regulating diode to establish a maximum permissible amount of current, can I then wire two leads of a potentiometer in parallel to my load to add manual adjustment of current through the load while keeping it below the rating value (+ tolerance) of the CRD?

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
If you're trying to source a variable current, why don't you use the potentiometer as the adjustment of a constant current source directly, instead of using it to burn wasted power?

asdf32
May 15, 2010

I lust for childrens' deaths. Ask me about how I don't care if my kids die.

poeticoddity posted:

I feel like there's something simple I'm missing, so I'm requesting a sanity check.

If I have a battery running through a current regulating diode to establish a maximum permissible amount of current, can I then wire two leads of a potentiometer in parallel to my load to add manual adjustment of current through the load while keeping it below the rating value (+ tolerance) of the CRD?

Yes and it's as simple as it seems. Current through your load is the diode current minus the pot current. Though ante's question is relevant.

But I think the answer is that its a two pin regulating diode which has no adjustment. Do you want to share the part number? I'm familiar with those devices but have never seen them used and have never used one myself because I've seen poor selection and high prices.

Note that those regulators may not be terribly precise so you'll want to verify it.


As implied by ante, there are other ways to regulate current which might suite the application better.


Platystemon posted:

Transformers should not explode.

I don’t just mean that in the sense of “no components should explode”, but also ”small transformers are especially non-susceptible to explosions. If one explodes anyway, someone seriously hosed up”.

Oil-filled industrial monsters are different.

Right. They're wire and metal. It's possible for insulation to fail. But probably if it did fail something else is wrong that caused it.

poeticoddity
Jan 14, 2007
"How nice - to feel nothing and still get full credit for being alive." - Kurt Vonnegut Jr. - Slaughterhouse Five

ante posted:

If you're trying to source a variable current, why don't you use the potentiometer as the adjustment of a constant current source directly, instead of using it to burn wasted power?

It's because of a focus on safety over efficiency. I'm looking into building a tDCS (transcranial direct current stimulation) device, so I'd rather have an assurance of a maximum possible current past a given point in the circuit than save a few mW.

asdf32 posted:

Yes and it's as simple as it seems. Current through your load is the diode current minus the pot current. Though ante's question is relevant.

But I think the answer is that its a two pin regulating diode which has no adjustment. Do you want to share the part number? I'm familiar with those devices but have never seen them used and have never used one myself because I've seen poor selection and high prices.

Note that those regulators may not be terribly precise so you'll want to verify it.

As implied by ante, there are other ways to regulate current which might suite the application better.

The Semitec S-202T would be an example of what I'm looking at, but I'm not set on a circuit by any means. There's not a ton of options in the ~2mA range, but I'm looking to toss together an early stage prototype tDSC source where short-circuit current on the electrodes would be verified with a multi-meter and I'm fine with refining the circuit later.

I'm open to other suggestions for an adjustable current regulated circuit that'll max out around 2mA as long as the failure state is to reduce current or go to an open circuit, and I'm happy working with SMT components and laying out PCBs for something with more than a handful of parts.

BattleMaster
Aug 14, 2000

Please don't build homemade devices for zapping your head

Platystemon
Feb 13, 2012

BREADS

BattleMaster posted:

Please don't build homemade devices for zapping your head

If you don’t think this is a bad idea, maybe it can’t hurt…

poeticoddity
Jan 14, 2007
"How nice - to feel nothing and still get full credit for being alive." - Kurt Vonnegut Jr. - Slaughterhouse Five

BattleMaster posted:

Please don't build homemade devices for zapping your head

I am absolutely building a homemade device for zapping my head unless I can get permission to build it in my lab (where I'm currently building a robot to blind people...so the hard part is that this wouldn't be focused on visual psychophysics).

(USER WAS PUT ON PROBATION FOR THIS POST)

Shame Boy
Mar 2, 2010

Don't diodes tend to fail short, IE one minute it's regulating current fine the next minute it's dumping the entire contents of your battery directly into your brain?

Jamsta
Dec 16, 2006

Oh you want some too? Fuck you!

poeticoddity posted:

I am absolutely building a homemade device for zapping my head unless I can get permission to build it in my lab (where I'm currently building a robot to blind people...so the hard part is that this wouldn't be focused on visual psychophysics).

How much experience do you have with building circuits?

poeticoddity
Jan 14, 2007
"How nice - to feel nothing and still get full credit for being alive." - Kurt Vonnegut Jr. - Slaughterhouse Five

ate all the Oreos posted:

Don't diodes tend to fail short, IE one minute it's regulating current fine the next minute it's dumping the entire contents of your battery directly into your brain?

Good to know. CRDs are probably out, then.


Jamsta posted:

How much experience do you have with building circuits?

Quite a bit, actually, though most of that has been with digital rather than analog circuits. The niche I carved out for myself in grad school was making embedded systems for lab instruments. If there's a particular current regulation circuit you'd suggest, I'm all ears, as finding something that fails as an open circuit rather than failing as a short is more difficult to find than just finding a circuit that people have been willing to try.

BattleMaster
Aug 14, 2000

I have this weird feeling that if you're asking for help in a hobby thread that you aren't qualified to be designing something that puts current through someone's brain

Shame Boy
Mar 2, 2010

poeticoddity posted:

Good to know. CRDs are probably out, then.


Quite a bit, actually, though most of that has been with digital rather than analog circuits. The niche I carved out for myself in grad school was making embedded systems for lab instruments. If there's a particular current regulation circuit you'd suggest, I'm all ears, as finding something that fails as an open circuit rather than failing as a short is more difficult to find than just finding a circuit that people have been willing to try.


BattleMaster posted:

I have this weird feeling that if you're asking for help in a hobby thread that you aren't qualified to be designing something that puts current through someone's brain

Yeah I'm not sure anyone here knows what needs to go into a medical device (there's all sorts of extra protection involved) or necessarily wants to maybe take on some liability by telling you what to do (is that even how liability works I'm not sure). If you're intent on doing this, maybe buy a TENS unit, take it apart, and see what it's using. Or better yet just hack the TENS unit to output the waveform you want with its existing intact circuitry and safety features.

ekuNNN
Nov 27, 2004

by Jeffrey of YOSPOS
So, I tried turning the power supply on again without a load attached, to see if that was really what failed:




:v:

Aurium
Oct 10, 2010

ate all the Oreos posted:

Yeah I'm not sure anyone here knows what needs to go into a medical device (there's all sorts of extra protection involved) or necessarily wants to maybe take on some liability by telling you what to do (is that even how liability works I'm not sure). If you're intent on doing this, maybe buy a TENS unit, take it apart, and see what it's using. Or better yet just hack the TENS unit to output the waveform you want with its existing intact circuitry and safety features.

Most tens machines are some flavor of high voltage transformer, and a resistor.

Shame Boy
Mar 2, 2010

Aurium posted:

Most tens machines are some flavor of high voltage transformer, and a resistor.

I had one I took apart and it seemed to at least have some kind of feedback but yes it was fairly simple. Made me wonder if the transformer was designed to limit current, like it was very lossy on purpose or something. Is that a thing you can do?

Murgos
Oct 21, 2010

ate all the Oreos posted:

Yeah I'm not sure anyone here knows what needs to go into a medical device (there's all sorts of extra protection involved) or necessarily wants to maybe take on some liability by telling you what to do (is that even how liability works I'm not sure). If you're intent on doing this, maybe buy a TENS unit, take it apart, and see what it's using. Or better yet just hack the TENS unit to output the waveform you want with its existing intact circuitry and safety features.

I've worked on two implantable medical devices, one for stimulation of nerve endings in the brain directly and one for nerve ending stimulation in various other organs. I did digital filtering & control for them, not analog circuits.

What I wanted to say though was that the FDA approval process is surprisingly easy as long as you use previously approved implantable housing and your power dissipation is low enough so as to not cook the surrounding organic matter. You do have to prove that your circuit fails safe where it does contact the test subject and as I recall the analog design guys got pretty fancy with fault isolation regions and grounding schemes.

The initial prototype stuff I worked on was for animal subjects but it was a pretty straight path to human testing from what I recall.

e: ^^^^ Transformers for differential signals fail open and block DC they are pretty safe.

Murgos fucked around with this message at 16:28 on Jan 6, 2017

Aurium
Oct 10, 2010

ate all the Oreos posted:

I had one I took apart and it seemed to at least have some kind of feedback but yes it was fairly simple. Made me wonder if the transformer was designed to limit current, like it was very lossy on purpose or something. Is that a thing you can do?

Yes you can. Both neon sign transformers and microwave oven transformers do it to some degree.

Neon signs need a very high strike voltage, but once their lit the running voltage is much lower. If you continued to drive them with the strike voltage they'd burn up fast. Ideally they'd be driven with a constant current supply, but a suitably made transformer works pretty well.

Adbot
ADBOT LOVES YOU

Shame Boy
Mar 2, 2010

Murgos posted:

I've worked on two implantable medical devices, one for stimulation of nerve endings in the brain directly and one for nerve ending stimulation in various other organs. I did digital filtering & control for them, not analog circuits.

What I wanted to say though was that the FDA approval process is surprisingly easy as long as you use previously approved implantable housing and your power dissipation is low enough so as to not cook the surrounding organic matter. You do have to prove that your circuit fails safe where it does contact the test subject and as I recall the analog design guys got pretty fancy with fault isolation regions and grounding schemes.

The initial prototype stuff I worked on was for animal subjects but it was a pretty straight path to human testing from what I recall.

e: ^^^^ Transformers for differential signals fail open and block DC they are pretty safe.

Oh cool, that sounds like really fascinating work


Aurium posted:

Yes you can. Both neon sign transformers and microwave oven transformers do it to some degree.

Neon signs need a very high strike voltage, but once their lit the running voltage is much lower. If you continued to drive them with the strike voltage they'd burn up fast. Ideally they'd be driven with a constant current supply, but a suitably made transformer works pretty well.

Yeah I thought I remembered reading or hearing something like this (maybe bigclive said it? he talks about neon transformers now and then).

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