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
Allistar
Feb 14, 2002

Regulation, aisle 8. Nerf, aisle 15.

Exitlights posted:

On this subject, I just got an email from Sparkfun saying that my order has shipped, but I already got it. So maybe I'll get 2x everything I got for free on free day :unsmith:

No, it's a known issue dealing with the amount of orders that came through on Free Day that has simply been overwhelming. You will not receive a second order of stuff, don't worry.

Adbot
ADBOT LOVES YOU

Exitlights
Dec 25, 2006
Calmly and clearly announce that the building must be evacuated.

Allistar posted:

No, it's a known issue dealing with the amount of orders that came through on Free Day that has simply been overwhelming. You will not receive a second order of stuff, don't worry.

Phew, I was afraid I was going to get more free stuff.

Delta-Wye
Sep 29, 2005

Exitlights posted:

Phew, I was afraid I was going to get more free stuff.

So was I

:jihad:

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
So here's an interesting question.

I hate transistors so much, despite having done like, three courses on them already.

I built an amp for my car, but the left speaker only gives off a buzz. If I touch its filter cap, it starts working again.

I'm assuming the capacitance in my hand is fixing it. I've seen strange stuff like that in labs before.


Can I just raise or lower the capacitance value to fix it?

There's no way to test it without plugging it into my car, and my iron and stuff are inside and it's cold outside, so I don't want to take the time to properly troubleshoot. :shobon:


To add to the fun, it was finished quite awhile ago, so I no longer have the hand drawn diagrams.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

ante posted:

I built an amp for my car, but the left speaker only gives off a buzz. If I touch its filter cap, it starts working again.

I'm assuming the capacitance in my hand is fixing it. I've seen strange stuff like that in labs before.

It seems more likely that you just hosed up the soldering and left an open connection or a partial short, and when you touch it you're giving it just enough force to conduct properly.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Pushing it with metal or wood or anything doesn't do the same thing.

e: and I did try re-soldering it


e2: I never gently caress up a solder ever :smug:

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I built this during the crunch of mid-term, so I don't even remember doing most of this. Everything in those few months kinda blurred together. Actually looking at the board, I was probably on my third sleepless day or something, so every single solder is really lovely.

I've got a picture in photoshop and I'm drawing out the PCB layout right now.

ANIME AKBAR
Jan 25, 2007

afu~
often in amplifier design, fixing stability issues really is as simple as adding capacitance somewhere, so it's not surprising that touching some point fixed it. for reference, the human body is generally has about 25-100pF of capacitance, so try adding values in that neighborhood.

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

ANIME AKBAR posted:

often in amplifier design, fixing stability issues really is as simple as adding capacitance somewhere, so it's not surprising that touching some point fixed it. for reference, the human body is generally has about 25-100pF of capacitance, so try adding values in that neighborhood.

Is that number for a finger press or anywhere? (The only capacitors I've ever done any math on were parallel plate, where geometry would be a major determinant of capacitance)

ANIME AKBAR
Jan 25, 2007

afu~
yes, but that's capacitance to earth, which may not necessarily be circuit ground.

the standard human body model (used for evaluating whether a circuit is ESD safe) is 100pF in series with 1.5Kohm.

the human body model is completely empirical (and oversimplified), and calculating it would be very complex (volume conductors/capacitors are nothing like parallel plate capacitors).

ANIME AKBAR fucked around with this message at 05:56 on Jan 24, 2010

Allistar
Feb 14, 2002

Regulation, aisle 8. Nerf, aisle 15.
My RGB backlit 4x20 Character LCD arrived this weekend, directly from Poland! It's an integral part of my project as you'll see below.

I have an Arduino driving the character LCD and an analog temperature (temp only for now, it's all I have) sensor on a long probe that's heatshrinked and dipped in epoxy, fed outside of the window.

The RGB Backlit LCD changes backlight temp dependent on a specified temperature range:
0-32 degrees = white
33-65 degrees = blue
so on, so you can at a glance figure out what the temp is outside and dress appropriately.

Currently, the LCD is loose and the arduino/protoshield are mounted in a weatherproof junction box complete with epoxied standoffs and supports.

I need to come up with a classy / non-ghetto enclosure for the LCD and will mount the LCD support to the junction box if need be.

Ideas? They're GREATLY appreciated.



My second part of the project (pending until next paycheck) is the external arduino/temperature sensor. The couple of Arduinos will communicate VIA RF transmitter (Screw XBee, those things are too expensive for what I'll be doing - RF transmitter on the external side and receiver on the internal setup.

I have a 12V solar panel headed my way that will hopefully make this external setup self-sustainable thanks to an undetermined size/type of rechargeable battery.


You may think this is overkill and an uberly expensive inside/outside thermometer. You would be right. But it's a great way for me to learn the Arduino and in turn, C programming.

Only registered members can see post attachments!

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

ANIME AKBAR posted:

often in amplifier design, fixing stability issues really is as simple as adding capacitance somewhere, so it's not surprising that touching some point fixed it. for reference, the human body is generally has about 25-100pF of capacitance, so try adding values in that neighborhood.

Yeah, that simultaneously makes me go "cool!" and ":psyduck:"


Edit:

Allistar posted:



This is pretty cool. Does the LCD fade in between colours, or is it a sudden thing?
If it doesn't fade, there's your next project.

ante fucked around with this message at 04:43 on Jan 25, 2010

Allistar
Feb 14, 2002

Regulation, aisle 8. Nerf, aisle 15.

ante posted:

This is pretty cool. Does the LCD fade in between colours, or is it a sudden thing?
If it doesn't fade, there's your next project.


http://artronic.pl/o_produkcie.php?id=967?

It doesn't currently fade. I actually ripped out code from someones sketch that would have faded the LCD backlighting between colors, but for right now, 5 presets of colors is enough for me. The fading added a lot of bulk to the sketch and I haven't learned "map" yet.

In addition, it's common anode on the RGB LCD compared to normally common cathodes on RGB LEDs so I've had to redo my RGB coloring values. 0=full and 255=off now, compared to the reversed before figures.

00-32 F: White
33-65 F: Blue
66-80 F: Green
81-95 F: Orange
96-110 F: Red


I doubt I'll see Orange or Red very often (I live in Boston currently, but am hoping to move back to Texas eventually!), but it's good to have it specified.


It's a pain to update my sketch/Arduino currently, I have it running off mains power and it's mounted in the junction box with very little space between the edges of the board and the walls of the enclosure.

I MAY go with RF transceivers on the arduinos just for the ability to program the boards wirelessly. But at this point, the cost is too much.

-

***Any ideas for an LCD enclosure? I want something classy as this'll be perched on our TV stand, with the arduino guts below it in the junction box.

I also need to look for waterproof cable connector setups for outdoors... Someone suggested cable glands in #SparkFun but i'm not sure how well they'll work for my needs.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
If you ever want to add in a fade, I can definitely help you out with the code, if you like.


Find someone with a woodshop and make an enclosure out of something nice, like walnut or cherry.


Here's the cover of my car amp, for example:

Trapdoor
Jun 7, 2005
The one and only.
A little overkill for a digital thermometer don't you think?

Allistar
Feb 14, 2002

Regulation, aisle 8. Nerf, aisle 15.

Trapdoor posted:

A little overkill for a digital thermometer don't you think?

The beauty in all of this is that I can put this thing together in prototyped form and then finalize it without utilizing an arduino, if I wanted to.

As mentioned earlier, a HUGE reason for taking on this project as a first is that it isn't some simple "hello world!" stuff.

I learn a lot better when it's hands on and especially when i'm fixing things that go awry. This, in my opinion, is a pretty substantial first project considering I've never touched an Arduino/microprocessor before and for that matter, never even dabbled in C.


It's a huge step into programming and hobbyist electronics and this project provides instant feedback on whether or not what I did works. The best way to learn. :)

Exitlights
Dec 25, 2006
Calmly and clearly announce that the building must be evacuated.

Allistar posted:

As mentioned earlier, a HUGE reason for taking on this project as a first is that it isn't some simple "hello world!" stuff.
I think that's pretty important. Learning a new skill isn't just learning the components: it's about learning the relevance to yourself and building the interest (which is something I think most education utterly fails to address). I basically did the same thing as you and it worked out great, which was to rip apart an old RC car that had long since lost its controller and create a new, digital control scheme. And now I'm much more interested in a second project... although I have no idea what I'll do as a second project.

BattleMaster
Aug 14, 2000

Allistar posted:

Arduino/microprocessor

Little nitpick - you're using a microcontroller, not a microprocessor. Microprocessors are discrete CPUs, while microcontrollers are parts that contain a CPU in addition to loads of other things like memory and I/O.

Other than that it's a cool project and it's good to see someone doing something other than blinking a few lights and then giving up.

Allistar
Feb 14, 2002

Regulation, aisle 8. Nerf, aisle 15.

BattleMaster posted:

Little nitpick - you're using a microcontroller, not a microprocessor. Microprocessors are discrete CPUs, while microcontrollers are parts that contain a CPU in addition to loads of other things like memory and I/O.

Other than that it's a cool project and it's good to see someone doing something other than blinking a few lights and then giving up.

I had a niggling feeling that I was saying the wrong word. But lazy old goon me didn't bother checking the Internet.


It has some interesting quirks that I'm not sure are hardware or software related - for example, I haven't been able to get my temp sensor to go below 32 degrees.

Either it's a huge coincidence that the outside temperature has hovered SPECIFICALLY AT 32 degrees as well as me jamming the temp sensor between ice packs...

Or I need to check my conversion mathiness.

BattleMaster
Aug 14, 2000

Could it be that your particular sensor is designed for degrees Celsius and can't go below 0C, or needs to be used in a special configuration to do so? I didn't see you mention a specific sensor, but for instance the LM35 needs to be wired in a certain way to output a usable signal below 0C.

Allistar
Feb 14, 2002

Regulation, aisle 8. Nerf, aisle 15.

BattleMaster posted:

Could it be that your particular sensor is designed for degrees Celsius and can't go below 0C, or needs to be used in a special configuration to do so? I didn't see you mention a specific sensor, but for instance the LM35 needs to be wired in a certain way to output a usable signal below 0C.

http://www.sparkfun.com/commerce/product_info.php?products_id=9438

LM335A with -40 to 100C operating temperature.

BattleMaster
Aug 14, 2000

Allistar posted:

http://www.sparkfun.com/commerce/product_info.php?products_id=9438

LM335A with -40 to 100C operating temperature.

Huh, the datasheet says it's supposed to output 10 mV per kelvin but it looks like in your case the result won't go below 0 degrees Celsius. Cool it down and check it with a multimeter to verify that it's outputing the expected voltage below 0 degrees, and if that's ruled out then it's probably your math at fault.

Allistar
Feb 14, 2002

Regulation, aisle 8. Nerf, aisle 15.

BattleMaster posted:

Huh, the datasheet says it's supposed to output 10 mV per kelvin but it looks like in your case the result won't go below 0 degrees Celsius. Cool it down and check it with a multimeter to verify that it's outputing the expected voltage below 0 degrees, and if that's ruled out then it's probably your math at fault.

I have reworked my code and used someone elses conversion math (Did I mention I hate math?)

// tempRead = (((analogRead(0) / 1023.0) * 5.00) - 2.7315) * 100.0; //Convert Analog0 telemetry to Celsius Temperature
// tempRead = (tempRead * 9.0)/ 5.0 + 32.0 - 7; //Convert Celsius temperature to Fahrenheit
tempRead = ((analogRead(0) / 1023.0) * 5.00) * 100.0; // Convert to Kelvin
tempRead = (tempRead - 273); //Convert Kelvin to Celsius
tempRead = (tempRead * 1.8 + 32); //Convert Celsius to Fahrenheit

Commented lines are what I had originally. Uncommented lines are what I changed to.



We'll see what happens overnight!

My solar panel arrived today, however this overcast, "get dark at 4" PM bullshit doesn't help when I get home at 4:30 to pick up my panel.

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
You can test function with an incandescent [flash]light pretty easily, the solar panels I used on my solar tracker got almost zilch from fluorescent light though, ymmv

Solaron
Sep 6, 2007

Whatever the reason you're on Mars, I'm glad you're there, and I wish I was with you.

Allistar posted:

http://www.sparkfun.com/commerce/product_info.php?products_id=9438

LM335A with -40 to 100C operating temperature.

I was just coming here to ask about temp sensors. Are there any that can handle higher temperatures? Almost everything I see goes to 150C. I'm looking for something that can handle around 200C and interface with an arduino.

Anyone know of anything?

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

Solaron posted:

I was just coming here to ask about temp sensors. Are there any that can handle higher temperatures? Almost everything I see goes to 150C. I'm looking for something that can handle around 200C and interface with an arduino.

Anyone know of anything?

http://www.omega.com/guides/thermocouples.html shows thermocouples to ~2300C. Don't know about arduino interfaces, but I assume it is possible.

Solaron
Sep 6, 2007

Whatever the reason you're on Mars, I'm glad you're there, and I wish I was with you.

taqueso posted:

http://www.omega.com/guides/thermocouples.html shows thermocouples to ~2300C. Don't know about arduino interfaces, but I assume it is possible.

Whew, those look like overkill and are a bit pricier than I was hoping, but if that's what it takes. I'll look into them! Thanks.

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

Solaron posted:

Whew, those look like overkill and are a bit pricier than I was hoping, but if that's what it takes. I'll look into them! Thanks.

I'm not familiar with thermocouple pricing, at all, but Omega is most likely on the higher end of the spectrum. Figure out the type you want and shop around.

Solaron
Sep 6, 2007

Whatever the reason you're on Mars, I'm glad you're there, and I wish I was with you.

taqueso posted:

I'm not familiar with thermocouple pricing, at all, but Omega is most likely on the higher end of the spectrum. Figure out the type you want and shop around.

Was just coming back to say that I found a thermocouple that will be perfect at a great price - thanks taqueso.

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

Solaron posted:

Was just coming back to say that I found a thermocouple that will be perfect at a great price - thanks taqueso.

Do you mind sharing which one you picked?

Solaron
Sep 6, 2007

Whatever the reason you're on Mars, I'm glad you're there, and I wish I was with you.

taqueso posted:

Do you mind sharing which one you picked?

I'm thinking of using this:
http://www.virtualvillage.com/2x-type-k-thermocouple-probe-003820-027.html

With this interface for the Arduino:
http://reprap.org/bin/view/Main/Thermocouple_Sensor_1_0

and then just have LEDs indicate if the desired temperature has been reached, or if it is too hot/too cold, along with a rheostat to control temperature.

Allistar
Feb 14, 2002

Regulation, aisle 8. Nerf, aisle 15.
My temperature sensor is fixed. Of course, the problem seems to have been software related.


Instead of "int tempRead;" I did "float tempRead;" at the suggestions of #SparkFun.

I'm going to have to read up on floats, I don't know what helped that that int couldn't do.

Now to shield my temperature sensor from the sun with a small length of PVC pipe - it's 30 degrees out but the sunrise hitting hte temp probe made it 50+...

Gotta love the "fix a problem, a new one arises!" crap.

BattleMaster
Aug 14, 2000

Allistar posted:

My temperature sensor is fixed. Of course, the problem seems to have been software related.


Instead of "int tempRead;" I did "float tempRead;" at the suggestions of #SparkFun.

I'm going to have to read up on floats, I don't know what helped that that int couldn't do.

Now to shield my temperature sensor from the sun with a small length of PVC pipe - it's 30 degrees out but the sunrise hitting hte temp probe made it 50+...

Gotta love the "fix a problem, a new one arises!" crap.

Well for one thing, floats can represent fractional numbers while ints can only be whole numbers. Both your old and new code works with floats and then converts them back into integers when it's done which isn't ideal and can sometimes cause weird things to happen.

Hillridge
Aug 3, 2004

WWheeeeeee!

Allistar posted:

My temperature sensor is fixed. Of course, the problem seems to have been software related.

As a professional hardware engineer, I can assure you this is the case 95% of the time, no matter how much the firmware guys insist otherwise.

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

Hillridge posted:

As a professional hardware engineer, I can assure you this is the case 95% of the time, no matter how much the firmware guys insist otherwise.

One of the best :smug: feelings is troubleshooting a bug for a couple painful days and getting it absolutely 100% proven as a hardware error so I can say "I know it is always the software but not this time because ..." This used to make the days of pulling my hair out worth it. Now I'm the software and hardware guy so there is no one to point the finger at anymore besides myself.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

Allistar posted:

My temperature sensor is fixed. Of course, the problem seems to have been software related.


Instead of "int tempRead;" I did "float tempRead;" at the suggestions of #SparkFun.

I'm going to have to read up on floats, I don't know what helped that that int couldn't do.

Now to shield my temperature sensor from the sun with a small length of PVC pipe - it's 30 degrees out but the sunrise hitting hte temp probe made it 50+...

Gotta love the "fix a problem, a new one arises!" crap.

Arduino floats are a little strange.

I spent a couple hours trying to trouble-shoot a problem once. Turns out it was calculating 2.0 / 2 to be 0.999999 :(

ante fucked around with this message at 21:30 on Jan 29, 2010

Kubz
Aug 11, 2009
Hello electronics people.

How do I build an awesome LED light thingy that scans back and forth like :psylon:
Thanks.

Mario Incandenza
Aug 24, 2000

Tell me, small fry, have you ever heard of the golden Triumph Forks?
cylon LED scanner

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


I recently brought a 48v scooter back to life with four new 12V SLA batteries. I only own a 12V charger, but the batteries are hooked up in series to 48V.

I would like to manufacture a 48V charger. Is this feasable? SLA batteries need to be on constant-current charge until per-cell voltage is at a certain point (depends on temperature), then on constant-voltage charge until current drops below a certain point, then on a float charge indefinitely.

How should I go about this? Is a 48V power supply doable? I was just thinking a transformer and full-wave rectifier to get to 48VDC, maybe a filter cap to smooth ripple somewhat, then a linear regulator to get to 5 or 3.3V to power a PIC with a temperature, voltage, and current sensor.

Any ideas on how to get a 48V signal into a 3.3 or 5V PIC besides a voltage divider? How should I rig a current sensor? What's the best (1 degree accuracy) temperature sensing solution for under $8?

Any big gotchas that might loom out of the darkness to blow this thing up?

Adbot
ADBOT LOVES YOU

clredwolf
Aug 12, 2006

babyeatingpsychopath posted:

Is this feasable?

Yes. Invest in some power resistors before you start testing on/blowing up SLAs though.

My thought is that it will have 2 stages: constant current, then constant voltage. Maybe a third 'off' stage. With a PIC controlling everything that should be fairly easy (hint: use state machines, they're your friend).

babyeatingpsychopath posted:

How should I go about this? Is a 48V power supply doable?

I've seen 48V and 50V electronics before, so there's probably transformers or even switchers (AC-DC or DC-DC converters) out there for this. The more current the better, but don't go overboard or you can fry the batteries. I think 5 amps might be a max for this project. (more amps = faster charge time)

babyeatingpsychopath posted:

I was just thinking a transformer and full-wave rectifier to get to 48VDC, maybe a filter cap to smooth ripple somewhat, then a linear regulator to get to 5 or 3.3V to power a PIC with a temperature, voltage, and current sensor.

That'll work. Most SLA chargers I've seen don't actually use the temp. sensor. A switching supply will use less energy, however I'd suggest looking at getting that as a self-contained module and NOT a DIY, switching supplies are not for the feint of heart.

babyeatingpsychopath posted:

Any ideas on how to get a 48V signal into a 3.3 or 5V PIC besides a voltage divider?

Battery? Transformer off the A/C line? I mean you're not gonna get a thunderbolt to the head for having two plugs for this type of thing (just buy another power strip).

babyeatingpsychopath posted:

How should I rig a current sensor?

Three words: isolated sense resistor. Look at using a sense resistor, and an isolated amplifier like an iso 124 (expensive, but worth it for not shocking yourself). Some really rugged opamps can do it too, but you'll need to still isolate it somehow.

babyeatingpsychopath posted:

What's the best (1 degree accuracy) temperature sensing solution for under $8?

Note sure here, there's a lot of temperature sensors out there though. Sometimes you can work with funky configurations until something falls out that works well (whetstone and kelvin bridge configurations can be extremely accurate).

babyeatingpsychopath posted:

Any big gotchas that might loom out of the darkness to blow this thing up?

Overvolting the batteries, reverse polarizing the batteries (it WILL happen, how will you fix it?....hint: it can be a pretty easy fix), shorts...any time you work with things over 5-12 volts you have to be mindful of what you are doing. Respect the machine, for it can be dangerous.

Oh yeah, and please please use fuses on your household side, and probably on your battery side too.

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