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
Cumslut1895
Feb 18, 2015

by FactsAreUseless

Splode posted:

So for $20 from RS you ordered 2 resistors and a capacitor?

even with a 100% markup, it's still a looot cheaper

Adbot
ADBOT LOVES YOU

Fat Turkey
Aug 1, 2004

Gobble Gobble Gobble!
I do own a Raspberry Pi 3, but that seems a pretty 'expensive' and 'overpowered' options when all I want is something to take the data from the devices and post them online. I thought an always on Arduino Nano might be able to do that. I would rather the £3 option to the £30 option.

If all devices have the transmitters that both send and receive, I think that will solve timing issues. Ordering parts tonight!

Fat Turkey fucked around with this message at 12:31 on Jan 13, 2017

Shame Boy
Mar 2, 2010

Fat Turkey posted:

I do own a Raspberry Pi 3, but that seems a pretty 'expensive' and 'overpowered' options when all I want is something to take the data from the devices and post them online. I thought an always on Arduino Nano might be able to do that. I would rather the £3 option to the £30 option.

Well each individual sensor nano doesn't really need a network connection but you'd need something to be the base to post the stuff online. You can get attachments for arduinos that let them connect to the internet but that's kinda a giant pain in the rear end and I generally wind up just connecting the thing to my computer and writing a program to take the data from it and do it for me. The RPi is convenient because you don't need to interface it, it's got all that poo poo built in.

Shame Boy
Mar 2, 2010

Oh also keep in mind if you want them to receive synchronization signals you'll have to leave the receiver powered on all the time (or maybe power it on periodically and have the base station transmit the message over and over until it gets an acknowledgement? idk)

huhu
Feb 24, 2006
I'm currently leading some workshops in Colombia and we bought parts before we came and we got a 2 pin microphone instead of the 3 pin microphone that's designed to work out of the box with an Arduino. It looks a bit complicated to build a system with the 2 pin microphone. The goal of the workshop is to have lights that turn on when loud sounds are detected. What would be the simplest circuit that could detect loud sounds?

Shame Boy
Mar 2, 2010

huhu posted:

I'm currently leading some workshops in Colombia and we bought parts before we came and we got a 2 pin microphone instead of the 3 pin microphone that's designed to work out of the box with an Arduino. It looks a bit complicated to build a system with the 2 pin microphone. The goal of the workshop is to have lights that turn on when loud sounds are detected. What would be the simplest circuit that could detect loud sounds?

What kind of 2-pin microphone, an electret capsule mic? (They're generally small, about a cm across, look something like this kind:

)

huhu
Feb 24, 2006

ate all the Oreos posted:

What kind of 2-pin microphone, an electret capsule mic? (They're generally small, about a cm across, look something like this kind:

)

Yeah that one.

huhu
Feb 24, 2006

huhu posted:

Yeah that one.

Also we just picked these up:
http://www.petervis.com/Electronics_Kits/lm386-audio-amplifier-module/lm386-audio-amplifier-module.html

I thought I might be able to do an analog read on the speaker pins, but it doesn't seem to be working. Maybe my wiring is wrong.

BattleMaster
Aug 14, 2000

Is it okay for a seldom-changing digital signal trace to cross analog signal traces that are on the opposite side of a two-sided PCB?

I'm using this multiplexer:



And the pinout is perfect for my application except for the fact that the trace going to digital address input A3 will have to cross the 8 traces running to analog signals NO1 through NO8 when I run all of the digital signals to a rectangular connector that will connect to another board that has all the digital stuff on it.

The work I'm building off of managed to get passable results from a nightmare hellscape of circuit design so maybe I'm fretting too much, but I was wondering if there were best practices for something like this. The signals are kind of weak, being charge pulses from radiation detectors, but the digital signals will not be changing when measurements are being taken.

edit: here's an illustration of what I would like to do

BattleMaster fucked around with this message at 01:21 on Jan 14, 2017

rawrr
Jul 28, 2007
My (shallow) understanding is that unless the signal is high frequency, PCB layouts don't really matter that much, and that having traces cross at right angles is least likely to cause problems.

Splode
Jun 18, 2013

put some clothes on you little freak
That should be completely fine.

Platystemon
Feb 13, 2012

BREADS
If they’re signals, not power, they don’t change while the measurement is taken, and they cross at right angles, that’s pretty much as good as it gets. Don’t worry about it.

BattleMaster
Aug 14, 2000

Thanks for the sanity check, everyone. I'm a bit paranoid about noise because the charge-sensitive preamp these signals are going into is so sensitive that it saturates at like 10 picocoulombs, but the guy who performed the experiment I'm working off of got reasonable results with a pile of crap so I probably shouldn't worry too much.

edit: hell the charge injection from switching channels creates huge pulses and normally you wouldn't care about single-digit picocoulombs being dumped into your signal; I wonder if using a radiation detector CSP and multichannel analyzer would be a better way of characterizing the charge injection than just looking at the voltage on a capacitor on the output lol

BattleMaster fucked around with this message at 05:39 on Jan 14, 2017

Shame Boy
Mar 2, 2010

huhu posted:

Yeah that one.

Well that kind needs some power going to it to work, and then you need to extract the AC signal of the sound from variations in the power line. It's easier than it sounds, you just need a resistor to limit current and a capacitor to couple the signal out:



(ignore the stuff inside the dashed box, that's just what's physically inside the microphone). You can then hook the output up to that amplifier circuit you posted and you should get some sound out.

I'm not 100% sure if you can hook it up to an arduino directly without some added circuitry so someone else will have to answer that part.

Fat Turkey
Aug 1, 2004

Gobble Gobble Gobble!

ate all the Oreos posted:

Oh also keep in mind if you want them to receive synchronization signals you'll have to leave the receiver powered on all the time (or maybe power it on periodically and have the base station transmit the message over and over until it gets an acknowledgement? idk)

Yes, that's an issue I was thinking from the beginning, especially if I want to keep power usage down to keep it battery powered for a while. But how else will I have the time be set. I'm going to pick up the some basic ESP8266s as Splode suggests and see how it goes, but thinking either sending to central PC, central dedicated Nano or even sending up to internet itself. The biggest decider will probably be the code I find to work it! Everything should be coming in end of next week, looking forward to it.

---

One quick side question, I ordered one of those USB volt/current measurers from China and it just came in. I tried it with two Samsung mobile phone chargers, one rated 2A, one rated 1A. But the measurer gave them 0.80 and 0.53A respectively. I've not got a big power supply that I could set a current with to test (although it won't be too hard to rig something up), I'm just wondering whether that sounds like a dodgy measurer or is a lower current on the phone charger a normal thing?

Aurium
Oct 10, 2010

Fat Turkey posted:

One quick side question, I ordered one of those USB volt/current measurers from China and it just came in. I tried it with two Samsung mobile phone chargers, one rated 2A, one rated 1A. But the measurer gave them 0.80 and 0.53A respectively. I've not got a big power supply that I could set a current with to test (although it won't be too hard to rig something up), I'm just wondering whether that sounds like a dodgy measurer or is a lower current on the phone charger a normal thing?

What was the load?

Splode
Jun 18, 2013

put some clothes on you little freak

Fat Turkey posted:

Yes, that's an issue I was thinking from the beginning, especially if I want to keep power usage down to keep it battery powered for a while. But how else will I have the time be set. I'm going to pick up the some basic ESP8266s as Splode suggests and see how it goes, but thinking either sending to central PC, central dedicated Nano or even sending up to internet itself. The biggest decider will probably be the code I find to work it! Everything should be coming in end of next week, looking forward to it.

---

One quick side question, I ordered one of those USB volt/current measurers from China and it just came in. I tried it with two Samsung mobile phone chargers, one rated 2A, one rated 1A. But the measurer gave them 0.80 and 0.53A respectively. I've not got a big power supply that I could set a current with to test (although it won't be too hard to rig something up), I'm just wondering whether that sounds like a dodgy measurer or is a lower current on the phone charger a normal thing?

I recently have been mucking around with internet stuff for my own projects.

I have successfully had the ESP8266 board act as a webserver that hosts a little website with an html form and submit button. (Groundwork for future projects, I want to be able to log in to my devices and check on them/reconfigure them, much like you log in to your router). Sending data is much easier than this though.
http://www.instructables.com/id/Getting-Started-With-the-ESP8266-ESP-01/
is a great guide to working with this thing.

I also bought a standard arduino ethernet shield. I've used that to make an auto-rebooter for my router, so if the internet goes down this device automatically reboots the router (by cutting and restoring power). However, the ethernet shield is very powerful, and stupidly easy to program: as it is an arduino product, the arduino IDE comes with a shitload of example programs for it that do basically everything you could ever want it to do. If you don't want to use your computer as the always on terminal, this shield might be a good bet. However, it is a uno sized shield. There might be a board for the nano that can use the same libraries, but I haven't looked into it.

Fat Turkey
Aug 1, 2004

Gobble Gobble Gobble!

Aurium posted:

What was the load?

A mobile phone charging. I supposed it may not be the full sA, but I thought it would clear the 1A barrier.

Aurium
Oct 10, 2010

Fat Turkey posted:

A mobile phone charging. I supposed it may not be the full sA, but I thought it would clear the 1A barrier.

I'd have expected that as well. What does the voltage look like?

Fat Turkey
Aug 1, 2004

Gobble Gobble Gobble!

Splode posted:

I have successfully had the ESP8266 board act as a webserver that hosts a little website with an html form and submit button. (Groundwork for future projects, I want to be able to log in to my devices and check on them/reconfigure them, much like you log in to your router). Sending data is much easier than this though.
http://www.instructables.com/id/Getting-Started-With-the-ESP8266-ESP-01/
is a great guide to working with this thing.

I also bought a standard arduino ethernet shield. I've used that to make an auto-rebooter for my router, so if the internet goes down this device automatically reboots the router (by cutting and restoring power). However, the ethernet shield is very powerful, and stupidly easy to program: as it is an arduino product, the arduino IDE comes with a shitload of example programs for it that do basically everything you could ever want it to do. If you don't want to use your computer as the always on terminal, this shield might be a good bet. However, it is a uno sized shield. There might be a board for the nano that can use the same libraries, but I haven't looked into it.

I'll bookmark the link and read it over the week, thanks. good to have some help from someone who has been doing something similar.

I do have a genuine Uno kicking about which I can use if I need the extra or to use a shield, but a bit more research on this suggests that Nanos and the chips should be enough. All should be a good learning process for future projects like you seem to be working on. One Youtube link I found suggested by using the sleep mode, he could transmit once per hour and still run the ESP off two AA batteries for 425 days. Thats the kind of effiency I'm looking for!

Splode
Jun 18, 2013

put some clothes on you little freak

Fat Turkey posted:

I'll bookmark the link and read it over the week, thanks. good to have some help from someone who has been doing something similar.

I do have a genuine Uno kicking about which I can use if I need the extra or to use a shield, but a bit more research on this suggests that Nanos and the chips should be enough. All should be a good learning process for future projects like you seem to be working on. One Youtube link I found suggested by using the sleep mode, he could transmit once per hour and still run the ESP off two AA batteries for 425 days. Thats the kind of effiency I'm looking for!

Yeah I didn't think that power use would be much of an issue. Two AA batteries is a lot of juice in microcontroller land.

--

As for the USB current thing, welcome to hell. USB has some communication thing where the device charging has to tell the fast charger the secret password to get the full current. This is to stop you accidentally dumping 2A into something designed for 1A (or 500mA). Sometimes, USB cables for charging omit the comms lines, which can cause this problem. Alternatively, the current measurering thingo might not be passing the data through.

I've never truly figured out how it works though, there's a lot of "try random cables and chargers till it works" but the problem of "WHY DOES MY SMARTPHONE NOT FAST CHARGE!!!11??" is all the internet with a wide range of poo poo answers.

rawrr
Jul 28, 2007
^

https://www.youtube.com/watch?v=jHRrnepF8aU

Something to do with a resistor network going from the charge pins to the data pins

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.

BattleMaster posted:

Is it okay for a seldom-changing digital signal trace to cross analog signal traces that are on the opposite side of a two-sided PCB?

As a back-of-the-envelope sanity check you could estimate the overlap area between the lines, get the PCB thickness and permittivity values of whatever board you're using and calculate the capacitance as a simplistic C=A*e/d model. Multiply that value by two or three to account for fringe field in a pessimistic way and then decide if that amount of capacitance would mess with your signals under worst case scenarios to a degree that it could affect your measurement.

asdf32
May 15, 2010

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

BattleMaster posted:

Thanks for the sanity check, everyone. I'm a bit paranoid about noise because the charge-sensitive preamp these signals are going into is so sensitive that it saturates at like 10 picocoulombs, but the guy who performed the experiment I'm working off of got reasonable results with a pile of crap so I probably shouldn't worry too much.

edit: hell the charge injection from switching channels creates huge pulses and normally you wouldn't care about single-digit picocoulombs being dumped into your signal; I wonder if using a radiation detector CSP and multichannel analyzer would be a better way of characterizing the charge injection than just looking at the voltage on a capacitor on the output lol

In a multilayer board you'd shield them with ground but on a two layer board the only thing you could do that you didn't mention would be to slow down the digital signals. If its fast, a simple source series termination could reduce the impact of the aggressor by an order of magnitude or two. C would slow it down more if the receiver could tolerate.


PDP-1 posted:

As a back-of-the-envelope sanity check you could estimate the overlap area between the lines, get the PCB thickness and permittivity values of whatever board you're using and calculate the capacitance as a simplistic C=A*e/d model. Multiply that value by two or three to account for fringe field in a pessimistic way and then decide if that amount of capacitance would mess with your signals under worst case scenarios to a degree that it could affect your measurement.

Off the top of my head that layout should be in single digit picofarad territory or less.

asdf32 fucked around with this message at 03:04 on Jan 16, 2017

huhu
Feb 24, 2006
So my students are building electronics things and one of them decided on this project:

https://www.youtube.com/watch?v=TKBVx6QzTvE&t=198s
http://www.instructables.com/id/DIY-LED-Desk-Lamp-W-Strip-Lights/?ALLSTEPS

It calls for a 12V 3A power supply. The lady leaves the positive and negative sides exposed so it looks like if someone was to grab both at the same time they'd kill themselves. Is that right? If so, what would be the best way to protect against this?

Splode
Jun 18, 2013

put some clothes on you little freak

huhu posted:

So my students are building electronics things and one of them decided on this project:

https://www.youtube.com/watch?v=TKBVx6QzTvE&t=198s
http://www.instructables.com/id/DIY-LED-Desk-Lamp-W-Strip-Lights/?ALLSTEPS

It calls for a 12V 3A power supply. The lady leaves the positive and negative sides exposed so it looks like if someone was to grab both at the same time they'd kill themselves. Is that right? If so, what would be the best way to protect against this?

I didn't watch the video, but 12V won't kill you unless you try really hard, but it is potentially a fire hazard. All the student has to do is insulate the contacts. This can be done in a million ways, let the student decide. You can get clear enamels and stuff that should do the trick, if the exposed contacts are part of the look.

But yeah you can barely feel 12V. The only real risk is something conductive touching both contacts and catching fire (so fairly unlikely).

Platystemon
Feb 13, 2012

BREADS
You can work on a car’s electrical system all day long without risk of electrocution but don’t drop a wrench across the terminals.

huhu
Feb 24, 2006

Platystemon posted:

You can work on a car’s electrical system all day long without risk of electrocution but don’t drop a wrench across the terminals.

Or if you have a lamp and a child goes, "oh that's cool" and grabs both sides...

Splode
Jun 18, 2013

put some clothes on you little freak

huhu posted:

Or if you have a lamp and a child goes, "oh that's cool" and grabs both sides...

No that's what we're saying. If it's a 12V lamp literally nothing will happen.

Platystemon
Feb 13, 2012

BREADS
“12V won't kill you unless you try really hard”

“Try really hard” means something like taking two sharp wire and jamming them through the skin, one on each hand.

Stabby McDamage
Dec 11, 2005

Doctor Rope
See this video to get a quick understanding of different voltages and what they can and can't do.

https://www.youtube.com/watch?v=XDf2nhfxVzg

I have 12V LED strips lighting my shop, and technically the 12V is exposed in the form of the cuttable pads, but I'm not worried at all. I've even poked and pressed on some of it with my finger while lit to find a weak solder joint. Now, the 110VAC side of the circuit is a different beast, and is well shielded at all times.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Would you lick a 9v battery? I'd lick a 9v battery.

I mean, I don't like doing it, but I also don't like digging around for my multimeter.

KnifeWrench
May 25, 2007

Practical and safe.

Bleak Gremlin

ante posted:

Would you lick a 9v battery? I'd lick a 9v battery.

I mean, I don't like doing it, but I also don't like digging around for my multimeter.

It's the easiest way to learn what electricity tastes like.

Splode
Jun 18, 2013

put some clothes on you little freak

Platystemon posted:

“12V won't kill you unless you try really hard”

“Try really hard” means something like taking two sharp wire and jamming them through the skin, one on each hand.

Yeah I didn't want to say you can't die to 12V because ~idiots find a way~ and there's always some internet pedant around but 12V is less dangerous than giving a child metal cutlery. The hypothetical child who grabs both contacts is unlikely to feel it, let alone be injured by it.

You should still usually cover up exposed low voltage contacts, but mainly to protect the electronics, not the people. You drop a wire across the contacts and blow up your power supply and that's a hassle.

Shame Boy
Mar 2, 2010

My grandpa lost a pinky finger in the war and lost all feeling in his ring finger after that. He was a mechanic for most of his life, and one day he was working on a car and smelled some smoke. He looks down and his wedding ring is glowing red hot, having shorted the car's battery without him noticing. Managed to notice it and get it off before it cost him another finger at least :v:

BattleMaster
Aug 14, 2000

asdf32 posted:

In a multilayer board you'd shield them with ground but on a two layer board the only thing you could do that you didn't mention would be to slow down the digital signals. If its fast, a simple source series termination could reduce the impact of the aggressor by an order of magnitude or two. C would slow it down more if the receiver could tolerate.


Off the top of my head that layout should be in single digit picofarad territory or less.

Thanks; Because the digital signals won't be changing while I'm taking analog measurements (that is, I select a channel in between measurements) the switching of the digital signal should not impact my measurements at all. The main worry of mine is that noise from the 5V rail will couple into the signals. But since that is a signal going to a digital input with a very high input impedance I'm hoping that means that the tiny current flowing and the tiny capacitance between the traces makes this a non-issue.

Maybe in the end I'll spring for a multilayer board with a ground plane, but I'm trying to save some money since those will be the absolute only signals in my layout that have to cross over each other.

KnifeWrench
May 25, 2007

Practical and safe.

Bleak Gremlin

BattleMaster posted:

Thanks; Because the digital signals won't be changing while I'm taking analog measurements (that is, I select a channel in between measurements) the switching of the digital signal should not impact my measurements at all. The main worry of mine is that noise from the 5V rail will couple into the signals. But since that is a signal going to a digital input with a very high input impedance I'm hoping that means that the tiny current flowing and the tiny capacitance between the traces makes this a non-issue.

Maybe in the end I'll spring for a multilayer board with a ground plane, but I'm trying to save some money since those will be the absolute only signals in my layout that have to cross over each other.

Can you take the long way around and cross some other traces elsewhere? Sorry to state the obvious, but when you start talking about adding layers, I get the sense there may be tunnel vision involved.

BattleMaster
Aug 14, 2000

KnifeWrench posted:

Can you take the long way around and cross some other traces elsewhere? Sorry to state the obvious, but when you start talking about adding layers, I get the sense there may be tunnel vision involved.

It's not that I want to add a layer but that I want to justify not having a ground layer in the first place just because with my current plan I can have all but one signal be on one layer only. But if it ends up being necessary to have a ground layer and two signal layers I will design it that way.

I could try routing that one signal a long way around and avoid crossing but I'm not sure I will be able to since I have incredibly little space to work with for the entire circuit. I'll keep it in mind when I start doing the proper layout on a computer.

Foxfire_
Nov 8, 2010

BattleMaster posted:

It's not that I want to add a layer but that I want to justify not having a ground layer in the first place just because with my current plan I can have all but one signal be on one layer only. But if it ends up being necessary to have a ground layer and two signal layers I will design it that way.

I could try routing that one signal a long way around and avoid crossing but I'm not sure I will be able to since I have incredibly little space to work with for the entire circuit. I'll keep it in mind when I start doing the proper layout on a computer.

And by not having a ground layer, you mean that the entire bottom of the board is a nice big unbroken ground plane and you've thought carefully about how return currents of all frequencies are going to flow through it? Cause that's what you should be doing for a 2-layer board.

Adbot
ADBOT LOVES YOU

Splode
Jun 18, 2013

put some clothes on you little freak

Foxfire_ posted:

And by not having a ground layer, you mean that the entire bottom of the board is a nice big unbroken ground plane and you've thought carefully about how return currents of all frequencies are going to flow through it? Cause that's what you should be doing for a 2-layer board.

Dunno about that bud.

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