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
Fat Turkey
Aug 1, 2004

Gobble Gobble Gobble!
Thanks for the responses. I like the idea of an Arduino that plugs into the breadboard, but I haven't been able to find one in the UK. I'll look a bit more but if I can't find one I may just stick with that model. Someone said it would be fine, and I don't think I'd be too fussed with wiring it up to a breadboard, but obviously getting rid of the hassle would be good.

Fat Turkey fucked around with this message at 18:31 on Apr 17, 2011

Adbot
ADBOT LOVES YOU

SnoPuppy
Jun 15, 2005
Has anybody ever tried using alibaba.com to get contract manufactures to build prototype PCBs?

I know I could use something like Seeed Studio or iTead, but I know that they are just reselling the services of some other fab. Why pay for a middle man if I can go straight to the source?
I'm sure that the quality might be hit or miss, but I wanted to check here to see if anyone else has tried this approach and what their results were.

Delta-Wye
Sep 29, 2005

SnoPuppy posted:

Has anybody ever tried using alibaba.com to get contract manufactures to build prototype PCBs?

I know I could use something like Seeed Studio or iTead, but I know that they are just reselling the services of some other fab. Why pay for a middle man if I can go straight to the source?
I'm sure that the quality might be hit or miss, but I wanted to check here to see if anyone else has tried this approach and what their results were.

You can already go straight to the source, the only problem is they need decent sized orders. If you only need a few small boards, they really aren't interested in dealing with you. Groups like Seeed or bot-pdx panelize a bunch of designs, get them fabbed, and then break apart the panels. Without the large size order, I doubt you could make it economical.

Three-Phase
Aug 5, 2006

by zen death robot
Sorta' wanted it to be standalone, I don't like leaving my PC on for extended periods when I'm away.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Three-Phase posted:

Sorta' wanted it to be standalone, I don't like leaving my PC on for extended periods when I'm away.

The ENC28J60 is pretty simple to interface with. Sending and receiving UDP packets is a snap. TCP, and I'm not sure what kind of wizardry you'd need.

I've got a similar project with an AVR chip, one of these guys, and a PIR sensor.

Slanderer
May 6, 2007
I don't know what would have to be done for sending an email, but for better or worse, interfacing with the Twitter API is really easy from an embedded device. Following an example, it was pretty easy to post temperature data to twitter.

sixide
Oct 25, 2004
Anybody know a good free tool that can make nice textbook-quality schematics? If it's something really obtuse like a LaTeX package that's fine, but in this case I don't really feel like pasting some gnarly LTSpice schematics.

Krenzo
Nov 10, 2004

sixide posted:

Anybody know a good free tool that can make nice textbook-quality schematics? If it's something really obtuse like a LaTeX package that's fine, but in this case I don't really feel like pasting some gnarly LTSpice schematics.

ExpressPCB's free board design software also does schematics. It works decently: http://expresspcb.com/ExpressPCBHtm/Free_cad_software.htm

ANIME AKBAR
Jan 25, 2007

afu~

sixide posted:

Anybody know a good free tool that can make nice textbook-quality schematics? If it's something really obtuse like a LaTeX package that's fine, but in this case I don't really feel like pasting some gnarly LTSpice schematics.

Most basic PCB design tools can make good schematics, if you use them correctly. I've seen schematics show up in tech notes and text books that were obviously made in eagle or altium before, and they look fine.

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

If you can export the schematic to DXF, you can convert that to SVG or postscript and embed in your latex stuff.

sixide
Oct 25, 2004
Wasn't originally planning to use LaTeX, but I found CircuiTikz. Why does everything TeX-related have to have the dumbest capitalization?

It looks really drat nice except for the logic gates, which seem like horizontally-squashed approximations of ANSI standards.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
SO I'm retiring the homemade TDA2003-based car amp that I was given that required extensive and repeated modifications and repairs.

I'm thinking of making a new one using the OPA2134, but my school op-amps course was taught by a guy that was retiring at the end of the term who just did not give a gently caress. I feel slightly let down by that.

So yeah, keep in mind that I know literally nothing of high-performance op-amps, although I am a pro at analyzing and building circuits with the 741. Which is useless.

How would I do it? Would the simple inverting amplifier circuit that uses two resistors work? Buffers?

sixide
Oct 25, 2004
OPA2134 doesn't have anywhere near enough muscle to drive multiple car speakers. If you're going the chipamp route, look at National's various integrated power amplifiers. They're quite good, and implementation is a cinch.

I haven't done a lot of digging but the LM4752/LM4755 would probably work nicely, albeit with much lower power on +12V.

Making a class D amplifier to run right off battery voltage would be pretty spectacular.

BattleMaster
Aug 14, 2000

I wound another coil for my coilgun using 18 gauge magnet wire (vs the 28 gauge I had on hand when I tried the first time) and now it's pretty drat zippy right out of the barrel. I'm still planning on shortening all the connections and using 14 gauge wire for everything. Right now it's all connected using 20 inch high-gauge alligator clips, and the capacitor bank is rigged together with short lengths of 22 gauge wire, so the resistance all around is a lot higher than I'd like.

I also picked up a bunch of cheap 1.5mF 200V electrolytics (vs the 10mF 35V ones I'm using now) that I might use if I bump the voltage higher but I'm still frightened of capacitors.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

BattleMaster posted:

I wound another coil for my coilgun using 18 gauge magnet wire (vs the 28 gauge I had on hand when I tried the first time) and now it's pretty drat zippy right out of the barrel. I'm still planning on shortening all the connections and using 14 gauge wire for everything. Right now it's all connected using 20 inch high-gauge alligator clips, and the capacitor bank is rigged together with short lengths of 22 gauge wire, so the resistance all around is a lot higher than I'd like.

I also picked up a bunch of cheap 1.5mF 200V electrolytics (vs the 10mF 35V ones I'm using now) that I might use if I bump the voltage higher but I'm still frightened of capacitors.

This is so rad. What's your budget? How powerful are you trying to go?

BattleMaster
Aug 14, 2000

ante posted:

This is so rad. What's your budget? How powerful are you trying to go?

I have no specific goal in mind for power, I'm mostly just experimenting to see what works best within my budget. I'd rather not spend more than a couple hundred dollars across the next several months on it, so I guess that rules out those huge soda can-sized capacitors that I've seen some people use. Right now what I have set up already can knock over empty cans at range, even with all the problems it has, so hopefully it won't be a big deal to get better performance out of it.

So far it seems that the most expensive parts are the capacitors and the spools of magnet wire (though you do get an awful lot of wire per spool). Everything else doesn't seem too bad so I'll have a lot of room for error. For instance, today I picked up an SCR rated for 50 amp sustained, 600+ amp surge for 3 bucks.

One of my goals is to see how powerful a portable model I can make. I'd also like to experiment with rapid firing, portable or non-portable. I figure that being able to recharge the capacitors fast enough and keep the coil cool would be interesting problems to try to solve.

I have a friend who is pretty railgun-obsessed so if he chips in for some of the parts I'd like to work on those as well.

Slanderer
May 6, 2007
At least you get to move into the carefree world of low gauge wire. Right now, I got a core memory project on the backburner, and I'm throwing ~ 1 amp pulses through 40 gauge wire.

Not to mention it's annoying as hell to mess around with my drive current, as I don't really have any higher power trimmer pots to work with. For slower memory clock rates, I could probably use what I have, but self-heating becomes an issue at a point, and I may need to read up on the temperature correction circuits they used to use.

ANIME AKBAR
Jan 25, 2007

afu~
Our tesla coil group still has some large electrolytic caps left that we're trying to sell. I think they're in the 400-500V, 6mF range. We've been selling them for around $20 each (less then a tenth of the market value).

You can't call it a coil "gun" until you're packing at least a kilojoule in your caps.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Someone gave me this link:

https://www.surpluscenter.com/item.asp?item=22-1157&catname=electric

ANIME AKBAR
Jan 25, 2007

afu~
That must be 8 uF, not mF. Or the voltage rating is off by a factor of ten. What the gently caress type of motor needs a 4KV startup capacitor?

insta
Jan 28, 2009

ANIME AKBAR posted:

That must be 8 uF, not mF. Or the voltage rating is off by a factor of ten. What the gently caress type of motor needs a 4KV startup capacitor?

That's a microwave oven rectifier capacitor. It is uF.

ANIME AKBAR
Jan 25, 2007

afu~

insta posted:

That's a microwave oven rectifier capacitor. It is uF.

Ah, so it's for a magnetron? Makes sense.

BattleMaster
Aug 14, 2000

I noticed my charge resistor was getting pretty warm so out of curiosity I did some calculations. Assuming my math is right, it turns out that the energy dissipated in the resistor across one charge cycle is about equal to the energy stored in the capacitors once fully charged! Considering my bank stores just over 30 joules I guess it's no wonder that it gets burning hot after a few firings.

Slanderer posted:

At least you get to move into the carefree world of low gauge wire. Right now, I got a core memory project on the backburner, and I'm throwing ~ 1 amp pulses through 40 gauge wire.

D:

Though I'm happy with the results from the 18 gauge wire, I'm still considering buying another spool of even lower magnet wire. I need less resistance!

ANIME AKBAR posted:

Our tesla coil group still has some large electrolytic caps left that we're trying to sell. I think they're in the 400-500V, 6mF range. We've been selling them for around $20 each (less then a tenth of the market value).

You can't call it a coil "gun" until you're packing at least a kilojoule in your caps.

I'd actually be down for some of those but I imagine the shipping to Canada would be murderous. I guess it would still be better than buying them new, though.


I'm not quite ready to bump the voltage up that high but it's hard to beat a price like that.

insta posted:

That's a microwave oven rectifier capacitor. It is uF.

I've noticed that some things, especially older stuff, uses "m" for micro, probably an artifact of how manufacturers usually skip milli- and nano- prefixes in favour of thousands of microfarads/picofarads or fractions of microfarads. I prefer using milli- and nano- myself because it makes it easier to keep things straight when I'm entering it all into my calculator.

BattleMaster fucked around with this message at 01:34 on Apr 21, 2011

Weatherproof
Nov 21, 2007

Well, like an understocked herb salesman, we've run out of oregano.. sorry, time!
Here's a bit of a weird one:

I'm trying to build this circuit and successfully did it on a breadboard and confirmed it as working (by hooking up the output to an oscilloscope) before transferring it over to veroboard and soldering everything up.

However, when it's on the veroboard there's now this constant sine wave coming out of the output with a peak to peak voltage of about 1V and a frequency of around 18kHz. The circuit seems to still work though cause the voltage jumps around when the mic gets sound and the max peak to peak voltage I get for loud sounds is around 3V which is the same as what I was getting before.

I accidentally found out that when I physically touch pin 8 of the op amp chip I'm using that the noise in the output goes away and the circuit functions as it was when it was on the breadboard (which is what I want). I didn't have anything connected to pin 8 when I was doing it on the breadboard cause I'm not using that particular pin.

I had a look at the datasheet for the chip and apparently pin 8 is COMP/BAL which I'm fairly sure I don't need for my simple circuit.

I have tried connecting the offending pin both straight to ground and to ground through a 1Meg resistor but neither seemed to do anything. It really only seems to work if I am physically touching the pin which I find totally bamboozling.

Does anyone have any idea of what might be going on? My only thought is that when I was soldering I might've heated up the chip too much which has changed it in some way?

ValhallaSmith
Aug 16, 2005

Weatherproof posted:

Here's a bit of a weird one:

I'm trying to build this circuit and successfully did it on a breadboard and confirmed it as working (by hooking up the output to an oscilloscope) before transferring it over to veroboard and soldering everything up.

However, when it's on the veroboard there's now this constant sine wave coming out of the output with a peak to peak voltage of about 1V and a frequency of around 18kHz. The circuit seems to still work though cause the voltage jumps around when the mic gets sound and the max peak to peak voltage I get for loud sounds is around 3V which is the same as what I was getting before.

I accidentally found out that when I physically touch pin 8 of the op amp chip I'm using that the noise in the output goes away and the circuit functions as it was when it was on the breadboard (which is what I want). I didn't have anything connected to pin 8 when I was doing it on the breadboard cause I'm not using that particular pin.

I had a look at the datasheet for the chip and apparently pin 8 is COMP/BAL which I'm fairly sure I don't need for my simple circuit.

I have tried connecting the offending pin both straight to ground and to ground through a 1Meg resistor but neither seemed to do anything. It really only seems to work if I am physically touching the pin which I find totally bamboozling.

Does anyone have any idea of what might be going on? My only thought is that when I was soldering I might've heated up the chip too much which has changed it in some way?

Vero boards have much less capacitance than bread boards. Your circuit was stable on the breadboard because of that. Touching it is adding enough capacitance to keep it stable like on on the breadboard.

http://users.ece.gatech.edu/~lanterma/sdiy/datasheets/opamp/audio_circuits_ne553x.pdf is an app note for audio circuits using that chip.

You need to put a 22pf or so cap between pin 8 and 5 more than likely to keep it stable.

Weatherproof
Nov 21, 2007

Well, like an understocked herb salesman, we've run out of oregano.. sorry, time!

ValhallaSmith posted:

Vero boards have much less capacitance than bread boards. Your circuit was stable on the breadboard because of that. Touching it is adding enough capacitance to keep it stable like on on the breadboard.

http://users.ece.gatech.edu/~lanterma/sdiy/datasheets/opamp/audio_circuits_ne553x.pdf is an app note for audio circuits using that chip.

You need to put a 22pf or so cap between pin 8 and 5 more than likely to keep it stable.

Thanks so much, that makes sense! I'll give it a go tomorrow when I'm back in the lab and will report back.

Does the orientation of the capacitor matter though? In all of the diagrams in that PDF they don't seem to specify one so I'm thinking I might just need a ceramic one so it won't matter? Admittedly my knowledge on this sort of stuff is pretty weak.

ValhallaSmith
Aug 16, 2005

Weatherproof posted:

Thanks so much, that makes sense! I'll give it a go tomorrow when I'm back in the lab and will report back.

Does the orientation of the capacitor matter though? In all of the diagrams in that PDF they don't seem to specify one so I'm thinking I might just need a ceramic one so it won't matter? Admittedly my knowledge on this sort of stuff is pretty weak.

Yea, just a bog standard unpolarized ceramic is fine.

Krenzo
Nov 10, 2004
I'm checking in to say that I went ahead and soldered my board with QFN and 0402 SMD parts and did not use a toaster oven. It really was not as hard as I thought once I got going, and everything appears to be working fine. Here are some pictures of the board:

Before

After

BattleMaster
Aug 14, 2000

Rebuilding my coilgun with low-gauge wire really improved its performance. The charging and fire switch circuit is still temporary but everything that matters is more or less final.

I'm still pretty scrubby as far as high-energy electronics go but I'm still pretty happy with it!

Picture of the gun
Close up on the capacitor bank
Flash video of it firing at a soda can

Edit: I should rig up a portable power supply using these 12V SLA batteries I have laying around and take it outside and do some target shooting.

BattleMaster fucked around with this message at 05:24 on Apr 23, 2011

catbread.jpg
Feb 22, 2007
A satisfying thwack.

BattleMaster
Aug 14, 2000

The old version definitely didn't thwack that good. I'm definitely impressed with how much power it gained just from giving it shorter, lower-gauge wiring. I knew it had tons of excess resistance from the thin, long aligator clip leads connecting everything together, but I definitely wasn't expecting such a huge increase in performance.

The old version could knock over cans just fine, but this one leaves dents in them!

insta
Jan 28, 2009

BattleMaster posted:

The old version definitely didn't thwack that good. I'm definitely impressed with how much power it gained just from giving it shorter, lower-gauge wiring. I knew it had tons of excess resistance from the thin, long aligator clip leads connecting everything together, but I definitely wasn't expecting such a huge increase in performance.

The old version could knock over cans just fine, but this one leaves dents in them!

I built a coilgun out of a threadbobbin, some green Radioshack enameled magnet wire, a camera flash, a Sonic straw, and a regular pushbutton. I brought it to school to show my industrial tech class for extra credit. Didn't go over like I thought :(

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik

Krenzo posted:

I'm checking in to say that I went ahead and soldered my board with QFN and 0402 SMD parts and did not use a toaster oven. It really was not as hard as I thought once I got going, and everything appears to be working fine. Here are some pictures of the board:

Before

After

looks good! How did you do the pads on the bottom of the QFNs?

Krenzo
Nov 10, 2004

Zaxxon posted:

looks good! How did you do the pads on the bottom of the QFNs?

They were not required to be soldered. They are only thermally connected to the chip. In the future if I have to solder the bottom pad, I will place a large enough ground via in the pad that my tip could fit into and fill that with solder from underneath.

Slanderer
May 6, 2007

Krenzo posted:

They were not required to be soldered. They are only thermally connected to the chip. In the future if I have to solder the bottom pad, I will place a large enough ground via in the pad that my tip could fit into and fill that with solder from underneath.

Alternatively, you could consider having a tinned copper heatsink/ground pad underneath, with a tiny bit of heatsink compound. If you can clamp the chip down before you solder the leads, you might be able to achieve a strong enough bond between the chip and the PCB to keep it in good thermal contact with the board (as normal heatsinks would always be clamped).

I wouldn't recommend trying to solder the pad from beneath. But if you have a large copper ground plane on the reverse side, thermal vias wouldn't hurt.

FSMC
Apr 27, 2003
I love to live this lie
The code I've written for my microchip 18F26K22 and I've found that pretty much everything is running in the interrupt loops. The way it's written has everything based on the timers so interrupts seem like the right way to do things. But I have no real experience with microchips and it seems like there could be some problems having all my code in the interrupts. Is there a point where polling a timer in the main loop is better than having everything in the interrupt loops.

Slanderer
May 6, 2007
I've never used PICs (and thus am not familiar with any unconventional features their hardware peripherals might have), so feel free to take this with a grain of salt:

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

You can still do really tightly timed bits of code without interrupts (grizzled old engineering profs like to recall the harsh old days when hardware peripherals weren't as great as they are now), but it requires a lot more work on coding (to make sure that all your code branches have equal, deterministic timing).

One other area that this can be an issue is with low power / sleep modes. Since your code is all in the interrupts, the processor is not executing anything, but is still running full-tilt. So if you wanted to implement a low power mode, possibly switching to a lower power clock source (if thats an option), the mcu might have restrictions on what will wake it up. So this is where interrupt code versus main code can change things.

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

Slanderer posted:



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


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

Slanderer posted:


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

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

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

I'm trying to use the code form AN1095 to store some state information in the internal flash of a PIC18F65J11. When
code:
     EECON2 = 0x55;
     EECON2 = 0xAA;
     EECON1bits.WR=1;
runs, the cpu stalls for a short time during the flash write. This is expected. My outputs also go low during the write. This is unexpected. I can't find mention of it in the datasheet. Is there any way to prevent this from happening?

e: Turns out this only happens when I am driving a transistor without a base resistor. Don't do that.

taqueso fucked around with this message at 19:31 on Apr 25, 2011

Adbot
ADBOT LOVES YOU

Charles Ford
Nov 27, 2004

The Earth is a farm. We are someone else’s Ford Focus.

TacoHavoc posted:

I'm not sure if the 18F has this, but some of the nicer pics have high and low priority interrupts.

The 18F2455 I've been using has "high" and "low" indeed. In my code I left that functionality turned off though, as I didn't need the prioritisation. My code was 50/50, doing RF stuff in interrupts and actual USB/RF buffers in the main loop.

It supports a bunch of modes where the CPU can go to sleep to various amounts, where the peripherals can run off of the main clock, or one of the timer's oscillators, and so on depending on how low power you want it to get.

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