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
FireWhizzle
Apr 2, 2009

a neckbeard elemental
Grimey Drawer
e .

FireWhizzle fucked around with this message at 20:56 on Jul 28, 2021

Adbot
ADBOT LOVES YOU

Slanderer
May 6, 2007

Otto Skorzeny posted:

Btw as per this meeting, the answer to high precision analog problems with the PSoC 5 is "use a PSoC 3 instead because the PSoC 5 isn't actually a mature product; the SP1 for the PSoC 5 which actually works is in tape out and will be available Real Soon Now(tm)" :argh:

ahaha I'm glade I never got around to messing around with that PSOC5 board I got one day. PSOC 3 works okay, though. The digital blocks can do some neat stuff, and it's pretty underappreciated.

Bad Munki
Nov 4, 2008

We're all mad here.



How topical, I just finished a workbench in my basement for random crap like this thread. 8 feet long, and the picture doesn't do the lighting justice. As you come down the stairs, it looks like there must be a skylight or something.



Melamine surface. Sturdy enough to hold at least me and my tools climbing around on it during installation. Super comfy massage stool.

Bad Munki fucked around with this message at 02:59 on Jun 22, 2012

FireWhizzle
Apr 2, 2009

a neckbeard elemental
Grimey Drawer
I am a sucker for pegboard. I also like the slight indention in the surface for more mobility - let's be honest, no one is going to have a computer in front of them on that desk. It will be to one side or the other to avoid ridiculously long wiring/EMI.

Pretty sweet set up so far - thanks for the basementpron!

edit: intention is not the same word as indention.

FireWhizzle fucked around with this message at 06:04 on Jun 22, 2012

Flash18
Apr 3, 2009
I'm designing a small circuit to tell whether the toilet at work is occupied. I'm going to use a couple of microcontrollers communicating by RF, with one of them in the toilet in question and the other hooked up to some computer that will always be on. From there I assume I'll just host the status of the toilet on webpage that anyone can check.

I'm wondering with what type of sensor I should use to determine occupancy. I was thinking of putting a PIR sensor on it, but my understanding of those is they detect movement, and I'd worried about the sensor going on/off/on/off all the time. I'd prefer some kind of distance sensor, to be attached to the toilet or the wall, and then it can report whether someone is sitting/standing nearby.

Whats the best way to go about this? Couldn't see a sharp distance sensor that would do what I wanted, I'm worried they'd be in the 'deadzone' of the long range ones and be out of range on the shorter ones. So... any ideas?

btw, I've ruled out modifying the door lock, hence why I'm going with this way.

SnoPuppy
Jun 15, 2005

Flash18 posted:

I'm designing a small circuit to tell whether the toilet at work is occupied. I'm going to use a couple of microcontrollers communicating by RF, with one of them in the toilet in question and the other hooked up to some computer that will always be on. From there I assume I'll just host the status of the toilet on webpage that anyone can check.

I'm wondering with what type of sensor I should use to determine occupancy. I was thinking of putting a PIR sensor on it, but my understanding of those is they detect movement, and I'd worried about the sensor going on/off/on/off all the time. I'd prefer some kind of distance sensor, to be attached to the toilet or the wall, and then it can report whether someone is sitting/standing nearby.

Whats the best way to go about this? Couldn't see a sharp distance sensor that would do what I wanted, I'm worried they'd be in the 'deadzone' of the long range ones and be out of range on the shorter ones. So... any ideas?

btw, I've ruled out modifying the door lock, hence why I'm going with this way.

That seems way, way, more complicated than it needs to be.

Why not just have a switch that people can flip?
You could even wire it to an "occupied" sign, like an airplane, or to a big flashing light.

Now you don't need the micros, RF link, or a web server just to tell you when someone is taking a poo poo!

fake edit:
You should look into ultrasound or IR based proximity sensors. Then have your micro detect when the returned distance is different from the baseline measurement.

It's still way overkill.

Slanderer
May 6, 2007

Flash18 posted:

I'm designing a small circuit to tell whether the toilet at work is occupied. I'm going to use a couple of microcontrollers communicating by RF, with one of them in the toilet in question and the other hooked up to some computer that will always be on. From there I assume I'll just host the status of the toilet on webpage that anyone can check.

I'm wondering with what type of sensor I should use to determine occupancy. I was thinking of putting a PIR sensor on it, but my understanding of those is they detect movement, and I'd worried about the sensor going on/off/on/off all the time. I'd prefer some kind of distance sensor, to be attached to the toilet or the wall, and then it can report whether someone is sitting/standing nearby.

Whats the best way to go about this? Couldn't see a sharp distance sensor that would do what I wanted, I'm worried they'd be in the 'deadzone' of the long range ones and be out of range on the shorter ones. So... any ideas?

btw, I've ruled out modifying the door lock, hence why I'm going with this way.

A few things to consider:

People will probably be weirded out by a lot of sensors, especially if they vaguely look like something that could be spying on them. Sharp ir sensors have exterior lenses, and ultrasonic distance sensors sorta look like weird microphones.

You can't modify the lock, but consider mounting something to the door itself. Standard security system door sensors are only a few dollars, and are really simple (a magnet on one side, a sensor or reed relay on the other). Most stall doors don't pull themselves closed, and hang slightly open (where the last occupant left it). You could mount a switch with a whisker arm that is only actuated when fully closed. Or, more reliably, the metal plate mounted on the partition that stops the door (probably located near the luck). If there is one of these, a sensor made from conductive rubber sensor material (decreases resistance under pressure. Used for stuff like oldschool automatic doors, or more recently, buttons built into clothing), a shim, and a simple comparator circuit would be reliable.

But if you really want to do an occupancy sensor, consider some alternatives. Depending on the overhead lighting, you may be able go use just a passive light sensor w/o an emitter. I wouldn't recommend photocells, though. There are some easy to use sensors from Avago or TAOS. You basically position the sensor so light is partially blocked by an occupant, then filter out noise with a low pass, detect lights being turned on/off, and periodically update the ambient light level to account for day/night.

But if you want to go with a sharp ir, it would work. They come in a LOT of different models, so just find one that matches the ranges you need. PIR is a bad choice, since they only respond to motion.

Slanderer
May 6, 2007

SnoPuppy posted:

Now you don't need the micros, RF link, or a web server just to tell you when someone is taking a poo poo!

Lies! I made my fraternity's toaster twitter enabled, and it was totally worth it. I was gonna setup a system for our washer and dryer too, so people could see if they were in use and get reminded when laundry was done (the dorms in our university had laundry rooms that emailed/texted you when your laundry was done, since the washers and dryers were activated by your student id. I wanted something like this). Never finished it because I didn't want to get one of my friends to setup a database on my server, and also I couldn't find a reliable non-intrusive method to see if a washer or dryer was running.

Delta-Wye
Sep 29, 2005

Slanderer posted:

Lies! I made my fraternity's toaster twitter enabled, and it was totally worth it. I was gonna setup a system for our washer and dryer too, so people could see if they were in use and get reminded when laundry was done (the dorms in our university had laundry rooms that emailed/texted you when your laundry was done, since the washers and dryers were activated by your student id. I wanted something like this). Never finished it because I didn't want to get one of my friends to setup a database on my server, and also I couldn't find a reliable non-intrusive method to see if a washer or dryer was running.

Vibration sensor! :shlick:

movax
Aug 30, 2008

I'm hoping his bathroom sensor project is completely unauthorized by HR/the company as well, because that makes it at least twice more hilarious and fun.

Design constraint: stealthy method of determining whether a toilet is in use. Maybe some kind of pressure sensor integrated into the seat.

Bad Munki
Nov 4, 2008

We're all mad here.


How about a little audio sensor? Bonus if you make it dial the intercom if someone is in for more than three minutes.

movax
Aug 30, 2008

Bad Munki posted:

How about a little audio sensor? Bonus if you make it dial the intercom if someone is in for more than three minutes.

With a microphone, you could have speakers strategically placed for noise-cancellation of horrendous post-Mexican shits.

Poop Sensors ITT: The Learning Electronics MEGATHREAD

Bad Munki
Nov 4, 2008

We're all mad here.


Run it through voice recognition.

BURRRRRRRLLLAAAAAPPPPPPPPPbbpbpbbpbpbpbptttttttt

"Welcome back, Mr. Davis."

movax
Aug 30, 2008

Bad Munki posted:

Run it through voice recognition.

BURRRRRRRLLLAAAAAPPPPPPPPPbbpbpbbpbpbpbptttttttt

"Welcome back, Mr. Davis."

I wonder if a FFT of pooping sounds would help in diagnosing what exactly is going on with your :butt:

Heck, what if you could build a system that can classify what the food was based on the frequency characteristics. I bet you could get funding for this from NIH.

e: yes i'm 12

Delta-Wye
Sep 29, 2005
All pooping jokes aside, you can get infrared sensors that should pick up people without giving detailed information. Something like these:

http://paparazzi.enac.fr/wiki/Infrared_Sensors

I could have sworn I've seen similar things that gave out several "pixels" of information (basically a 1x8 pixel of IR information) that would be perfect for this.

Bad Munki
Nov 4, 2008

We're all mad here.


Maybe for your definition of "perfect." :colbert:

Flash18
Apr 3, 2009
Good lord what have I done to this thread.


movax posted:

I'm hoping his bathroom sensor project is completely unauthorized by HR/the company as well, because that makes it at least twice more hilarious and fun.

Design constraint: stealthy method of determining whether a toilet is in use. Maybe some kind of pressure sensor integrated into the seat.

Yep, completely unauthorised. This is a pretty small company with only about 20 people in the office and the culture is kind-of start-up-ish. Back in the day, the director used to pay the bored IT guy to make a counterstrike map of the office. There's also nerf guns and helicopters everywhere - a certain level of mischief is appreciated. For the unveiling I'm considering rigging a truck horn up to it.

It will actually serve a use. We have two double-story offices side-by-side, each with a toilet on the ground-floor. One of them is the designated female toilet, however, seeing as each washroom only has one physical toilet, and we only have one woman actually working here atm, the gents tends to get considerable queues. Of course, rather than call them unisex, everyone is used to using the one toilet from a time when there were more women working in the office. So I figured they can check the webpage, oh, toilets occupied, will wait 10 minutes before coming down.

I thought this would be an amusing project if albeit complete overkill.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
Create a virtual bathroom system mapping n logical toilets to your two physical toilets.

Delta-Wye
Sep 29, 2005
Replace the toilet with a trough.

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮
I'm trying to understand PWM better.

As far as I understand it, it works on a basic principal: switching a current on and off at a fixed rate effectively divides the average voltage of the current over time. The percentage of time that the current remains "on" during the on/off cycle is the duty cycle, and a lower duty cycle makes for a lower voltage. A basic application would be to dim an LED by varying the duty cycle.

Okay, so what it is is a sort of digital->analog converter. I can use it to make a discrete voltage level and thus generate a sine wave, sawtooth wave, or even a complex audio signal. Except that it's not very precise to think of it that way - I can use PWM to output an average 1.5V signal, but it's really just oscillating rapidly between 0V-3.3V, and some circuits will pick up on this (like digital ICs), and the PWM frequency will be audible if I'm trying to generate an audio signal.

So for audio, the trick is to increase the frequency of the PWM until it's inaudible, then it turns into a math problem. If I want to do lovely 8kHz 8-bit audio, I'd need to do PWM at 32kHz with 2-bit accuracy, meaning I need a 128kHz oscillator to time the PWM. Except they don't really put those in microcontrollers, so it'd be easier to use an internal 8MHz oscillator and use 31.25kHz/8-bit PWM. That's how TI shows how to do it with the MSP430, anyway.

That's about as far as I've caught up, so now I'm trying to figure out if I have the theory right. I've noticed that a 31.25kHz/8-bit PWM has more accuracy than you need for 8kHz/8-bit audio - 4 PWM cycles for each sample. Couldn't you also do 16kHz/16-bit? Or what's to stop me from doing 32kHz/8-bit audio (with some slowdown due to the slightly lower frequency)? Does the PWM frequency have to be higher than the audio sampling rate? I'm not sure where to look to figure this all out.

Seems like I should probably consider using an actual DAC for higher sampling rates though, PWM can sound pretty dirty. I'm not sure where it becomes practical to switch over to a microcontroller with an integrated DAC.

Delta-Wye
Sep 29, 2005

Silver Alicorn posted:

I'm trying to understand PWM better.

As far as I understand it, it works on a basic principal: switching a current on and off at a fixed rate effectively divides the average voltage of the current over time. The percentage of time that the current remains "on" during the on/off cycle is the duty cycle, and a lower duty cycle makes for a lower voltage. A basic application would be to dim an LED by varying the duty cycle.

Okay, so what it is is a sort of digital->analog converter. I can use it to make a discrete voltage level and thus generate a sine wave, sawtooth wave, or even a complex audio signal. Except that it's not very precise to think of it that way - I can use PWM to output an average 1.5V signal, but it's really just oscillating rapidly between 0V-3.3V, and some circuits will pick up on this (like digital ICs), and the PWM frequency will be audible if I'm trying to generate an audio signal.

So for audio, the trick is to increase the frequency of the PWM until it's inaudible, then it turns into a math problem. If I want to do lovely 8kHz 8-bit audio, I'd need to do PWM at 32kHz with 2-bit accuracy, meaning I need a 128kHz oscillator to time the PWM. Except they don't really put those in microcontrollers, so it'd be easier to use an internal 8MHz oscillator and use 31.25kHz/8-bit PWM. That's how TI shows how to do it with the MSP430, anyway.

That's about as far as I've caught up, so now I'm trying to figure out if I have the theory right. I've noticed that a 31.25kHz/8-bit PWM has more accuracy than you need for 8kHz/8-bit audio - 4 PWM cycles for each sample. Couldn't you also do 16kHz/16-bit? Or what's to stop me from doing 32kHz/8-bit audio (with some slowdown due to the slightly lower frequency)? Does the PWM frequency have to be higher than the audio sampling rate? I'm not sure where to look to figure this all out.

Seems like I should probably consider using an actual DAC for higher sampling rates though, PWM can sound pretty dirty. I'm not sure where it becomes practical to switch over to a microcontroller with an integrated DAC.

FYI, some MSP430s have an integrated DAC. I know I've used a hardware DAC on the x1611 processor.

Are you running the output through some sort of lowpass filter? If I was doing this I would start by looking at a LP with a cutoff at like 15kHz and switch much higher, but I haven't done this exact thing either.

sixide
Oct 25, 2004
http://www.romanblack.com/onesec/Sine1kHz.htm

Not a PWM primer, exactly, but it's a pretty awesome read that introduces precision D-A conversion via PWM.

PWM is just fine for audio, though. Class D amplifiers are ubiquitous and they are basically high-power PWM drivers.

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮
I've got an STM32F0 with hardware DAC as well. DACs are only available on the more feature-rich MSP430s that only come in surface mount packages, which isn't a bad thing, I guess, but I'm trying to see how far I can push the little ones available in DIP (especially because I can program them in the Launchpad and then embed them wherever).

So I don't really see anything wrong with running 32kHz audio through a 32kHz PWM, except that it would maybe have more artifacting than higher frequency PWM. I guess this is just something I should try anyway. Gonna do some PCM playback and / or a polyphonic square wave synth on the MSP430. That's the plan at least.

sixide posted:

PWM is just fine for audio, though. Class D amplifiers are ubiquitous and they are basically high-power PWM drivers.

I was wondering if this was the case, my suspicions were correct. Cool.

tminz
Jul 1, 2004
A cautionary tale to people learning electronics/have no idea what they're doing (myself), don't hook up batteries to your project/arduino while plugged into your computer's USB if you don't know what you're doing! I now own a fried laptop that won't charge or turn on at all.

Is my power supply/mobo most likely shot? Could this possibly be a simple repair or should I just cut my losses? Curious if anyone has had a similar experience

Update: I removed the laptop battery and then stuck it back in and the computer now boots and appears to be fine?

tminz fucked around with this message at 19:30 on Jun 27, 2012

Bad Munki
Nov 4, 2008

We're all mad here.


Could have been a self-protective measure.

Slanderer
May 6, 2007

tminz posted:

A cautionary tale to people learning electronics/have no idea what they're doing (myself), don't hook up batteries to your project/arduino while plugged into your computer's USB if you don't know what you're doing! I now own a fried laptop that won't charge or turn on at all.

Is my power supply/mobo most likely shot? Could this possibly be a simple repair or should I just cut my losses? Curious if anyone has had a similar experience

Update: I removed the laptop battery and then stuck it back in and the computer now boots and appears to be fine?

USB ports should require built in over current protection, as well as transient overvoltage protection (I think, anyway).

I'm not even sure how you managed this. Granted, the power source selection circuit on the Arduino is bare-bones as hell...

Now, unless you somehow messed up your charger (or your battery), it's basically the motherboard, sorry to say--since everything is integrated on there, not really sure what to say.

Bad Munki posted:

Could have been a self-protective measure.

Nope! Electronics like Laptops don't have permanent protection devices like fuses, and instead go for stuff like PTC fuses and current limiters. If anything kicked in, it would clear fairly quickly.

EDIT: The only exception is the battery, which may have a fuse, in addition to other stuff. If your battery has a test button + LEDs on it, see if it lights up.

Slanderer fucked around with this message at 20:17 on Jun 27, 2012

movax
Aug 30, 2008

tminz posted:

A cautionary tale to people learning electronics/have no idea what they're doing (myself), don't hook up batteries to your project/arduino while plugged into your computer's USB if you don't know what you're doing! I now own a fried laptop that won't charge or turn on at all.

Is my power supply/mobo most likely shot? Could this possibly be a simple repair or should I just cut my losses? Curious if anyone has had a similar experience

Update: I removed the laptop battery and then stuck it back in and the computer now boots and appears to be fine?

Probably used a USB power switch IC like the STMPS2242, BD6512F, etc. Up to the host system to decide what it wants to do with USB_OC# outputs.

Obviously not an option for most hobbyists, but keeping development machine isolated from the target hardware is a very good thing. There are Arduino "experts" who happily work away on circuits interfacing with 120VAC with no isolation whatsoever :psyduck:

Slanderer
May 6, 2007

movax posted:

Probably used a USB power switch IC like the STMPS2242, BD6512F, etc. Up to the host system to decide what it wants to do with USB_OC# outputs.

Obviously not an option for most hobbyists, but keeping development machine isolated from the target hardware is a very good thing. There are Arduino "experts" who happily work away on circuits interfacing with 120VAC with no isolation whatsoever :psyduck:

I'm kinda surprised that the system would shutoff and stay off, though.

Anyway, personally I sometimes use a powered USB hub when I'm working with stuff that'll be drawing tons of current, since I know that PTC fuses can't react immediately. I have a breakout board with a magnetically coupled USB isolator on it, but I only use that for very specific stuff, since it needs external power.

Bad Munki
Nov 4, 2008

We're all mad here.


Slanderer posted:

Nope! Electronics like Laptops don't have permanent protection devices like fuses, and instead go for stuff like PTC fuses and current limiters. If anything kicked in, it would clear fairly quickly.

movax posted:

Probably used a USB power switch IC like the STMPS2242, BD6512F, etc. Up to the host system to decide what it wants to do with USB_OC# outputs.

That was more what I was thinking.

Slanderer posted:

I'm kinda surprised that the system would shutoff and stay off, though.

Doesn't really surprise me...if you've got something hooked up that is potentially going to fatally injure the computer, it really shouldn't just fire back up, since attempting to turn the computer back on would be the most common first response, and in that case, you've still got the Danger Device connected. Instead, forcing someone to go as far as removing the battery will probably lead to a more thorough troubleshooting process. Also, could just be that as long as the computer is still powered (via the battery) whatever tripped will remain tripped, and that's just the only way to reset it.

Slanderer
May 6, 2007

Bad Munki posted:

Doesn't really surprise me...if you've got something hooked up that is potentially going to fatally injure the computer, it really shouldn't just fire back up, since attempting to turn the computer back on would be the most common first response, and in that case, you've still got the Danger Device connected. Instead, forcing someone to go as far as removing the battery will probably lead to a more thorough troubleshooting process. Also, could just be that as long as the computer is still powered (via the battery) whatever tripped will remain tripped, and that's just the only way to reset it.

Well, the times I've had USB ports go down (due to faulty debuggers and EVMs, mostly), it was always limited to either the individual port, or the group of ports that shared a single controller. And it never affected the system itself. The actual USB ports always resumed working once I cleared the fault, and restarted the computer.

Regardless, it doesn't really matter--I had assumed he had tried taking the battery out. God knows I have to do that on my phone every drat day (thanks, Awful App for Android).

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮

Slanderer posted:

Regardless, it doesn't really matter--I had assumed he had tried taking the battery out. God knows I have to do that on my phone every drat day (thanks, Awful App for Android).

Awful App turns your phone into a Blackberry??

Thanks to everyone who chimed in on the PWM stuff, here and in #cobol. I figured out how to do a 32kHz PWM and embed a 440Hz square wave in it, and I can adjust the amplitude by changing the duty cycle. It's actually pretty loud! I was worried it would be quiet based on a similar demo for Arduino.

As far as I can tell, the aliasing you'd get from playing PCM audio with the same sample rate as the PWM would be pretty hard to detect by ear. I've still got to find a way to get PCM samples to the MSP430 though. I made an SD connector today, now I've gotta figure out how to program for it.

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮


...is this right? The application note from TI says to decouple the power to the SD card. Of course I didn't just solder wire wrap wires to my card, so I'd have an easier time doing that.


\/\/\/\/\/\/ Yeah, the circuit diagram just shows putting a .1uF cap between the vcc and vss pins on the SD card. I've seen crazy noise issues with 74LSxx chips at least. I don't know if it's as much of an issue with an SD card, but I can at least eliminate the possibility.

Silver Alicorn fucked around with this message at 18:50 on Jun 28, 2012

movax
Aug 30, 2008

Silver Alicorn posted:



...is this right? The application note from TI says to decouple the power to the SD card. Of course I didn't just solder wire wrap wires to my card, so I'd have an easier time doing that.

Decouple probably meant throwing a 0.1uF cap or two in there on the power rail for the card to clean up power delivery.

FSMC
Apr 27, 2003
I love to live this lie

Silver Alicorn posted:



...is this right? The application note from TI says to decouple the power to the SD card. Of course I didn't just solder wire wrap wires to my card, so I'd have an easier time doing that.


\/\/\/\/\/\/ Yeah, the circuit diagram just shows putting a .1uF cap between the vcc and vss pins on the SD card. I've seen crazy noise issues with 74LSxx chips at least. I don't know if it's as much of an issue with an SD card, but I can at least eliminate the possibility.

Going from my terrible memory the SD card was the only part of my circuit that needed to have a decoupling cap. So the MCU (STM32, ARM cortex M3) that recommended 5 decoupling caps worked fine with none but the SD card did require a decoupling cap.

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮
I should have probably mentioned that that's not my picture, it's from http://elasticsheep.com/2010/01/reading-an-sd-card-with-an-atmega168/. From what I can find, SD cards may or may not start having trouble if the supply voltage drops below 2.7V, so I'm really curious to see how many read/write errors that setup gets.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
I'm testing a high-precision ADC and I want to generate a very, very stable voltage around .5 - 1.0 volts to test it with. What's my best bet? An EDC voltage standard unfortunately have about 40 uvolt of ripple near 1v :(

Blotto Skorzany fucked around with this message at 00:18 on Jun 29, 2012

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

Otto Skorzeny posted:

I'm testing a high-precision ADC and I want to generate a very, very stable voltage around .5 - 1.0 volts to test it with. What's my best bet? An EDC voltage standard unfortunately have about 40 uvolt of ripple near 1v :(

I've used a battery for this type of test in the past, but the stuff I was working with was fine with 1.5V. You could try a battery with a voltage divider. I don't think the thermal noise of the divider will be significant, but hopefully someone with more experience can comment.

Slanderer
May 6, 2007

Otto Skorzeny posted:

I'm testing a high-precision ADC and I want to generate a very, very stable voltage around .5 - 1.0 volts to test it with. What's my best bet? An EDC voltage standard unfortunately have about 40 uvolt of ripple near 1v :(

You're gonna have to give me more than that. What are your requirements for accuracy, and noise? Is it just being used as a buffered reference?

EDIT: Just after looking real quick, I don't see any references that go that low. Probably some solid state physics semiconductor super mathematical bullshit, y'know?

Slanderer fucked around with this message at 00:56 on Jun 29, 2012

Blotto Skorzany
Nov 7, 2008

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

Slanderer posted:

You're gonna have to give me more than that. What are your requirements for accuracy, and noise? Is it just being used as a buffered reference?

EDIT: Just after looking real quick, I don't see any references that go that low. Probably some solid state physics semiconductor super mathematical bullshit, y'know?

Accuracy doesn't have to be that great, I just want something real, real stable - 4 uvolts RMS of ripple would be good, 1 would be ideal. I'm using this as a reference to see if a vendor is full of poo poo (or perhaps more accurately how full of poo poo they are) in their claim that their 20-bit sigma delta ADC is capable of an ENOB of 19.2 bits at 10 updates/second. Really I only want 17 bits and could live with about 16.3, but right now I'm seeing 18 bits near zero and 14.1 bits near full scale (1.024v), degrading just about linearly through the range, even after applying all sorts of filtering and massaging. I suspect that the ADC's internal VREF is the problem, but before addressing that I want to eliminate the signal that I'm feeding the thing as a source of the poor precision.

Adbot
ADBOT LOVES YOU

sixide
Oct 25, 2004

Otto Skorzeny posted:

I'm testing a high-precision ADC and I want to generate a very, very stable voltage around .5 - 1.0 volts to test it with. What's my best bet? An EDC voltage standard unfortunately have about 40 uvolt of ripple near 1v :(

http://www.krohn-hite.com/htm/calibrators/Calibrators.htm

If you want a DIY solution, folks need a lot more in the way of requirements.

edit:

Well then.

Consider using a good reference with a chopper-stabilized amplifier. Voltage divider in the feedback loop. For 4uV of noise you'll need to use every trick in the book--read those datasheets and application notes religiously.

All is for naught if you can't verify with good measurements. You'll need a good (not quite 3458 quality) voltmeter.

sixide fucked around with this message at 01:15 on Jun 29, 2012

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