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
Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
I'm idly trying to figure out how you could connect a fairly large number of 8-bit microcontrollers over a fairly large distance with UTP.

There would be no path over 100m, and a data rate of 500kbits/s or higher. I would like the ability to flexibly attach and detach nodes, and I would like this to be cheap. Most of the traffic would be broadcast from a master node to many slave nodes, with slaves only transmitting if requested, so collisions aren't a huge problem. So far, I've come up with 3 ideas:

I2C using NXP's bus extender. This is expensive, though, as I'd need 2 chips per uC in order to fully extend the bus, at $3 a chip.

RS-485 using Maxim drivers. Max of 256 devices, which is great. Need one chip per uC at $3 a chip, but each end needs to be terminated, which makes node attachment less flexible.

Old Ethernet PHY/MAC chips, like the ISA RTL8019AS. This seems like the best, most flexible solution. The chips are 4.50 each, and I could just wrap whatever data I need to send in the Ethernet frame. Another benefit is that I could use old 10mbps switches to extend the whole network. The problem is that this makes things more difficult in the hardware required, and the software, so I'd have to use a beefier uC than I would otherwise need.

Anyone have any other ideas?

Adbot
ADBOT LOVES YOU

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
I have all the Dev stuff for AVR chips, but that's my only attachment to Atmel.

Atmel has a couple of chips with CAN on board, but it looks like that also has to be terminated on both ends, unless the couple of tutorials I've seen have been misleading. I like the Ethernet idea a lot, but I'm concerned with the complexity. Are there any simpler chips available for a reasonable price? I'm also concerned with availability of the old ISA era chips. If nothing else, I could buy a PIC programmer.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
To answer my own question:

Microchip makes a device called the ENC28J60 which does pretty much exactly what I want. For $3 + a $1.50 RJ-45 Jack, I have an SPI capable MAC/PHY layer. Since I won't be implementing UDP, ARP, etc., a cheap AVR should suffice for program space. Although it won't be standards compliant, a Layer 2 switch _should_ route the packets around just fine, and old 10mbps switches are something I've got laying around in spades. Using MAC addresses as device addresses should be fine, since this isn't something that will end up coexisting with any more compliant, more complex devices.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
This chip doesn't need nearly the external hardware that the other one does. This one's available SOIC, too, so it won't be impossible to solder.

Thinking about it more carefully, I suppose you're right. I'll just have to be careful with MAC address assignment. The filters on the ENC28J60 should safely ignore everything that I don't care about. Everything is simplified by assuming that these devices will be the only things on the network in question.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Mill Town posted:

There's such a thing as a "locally administered" MAC, which basically allows you to make up MAC addresses for your own private network.

http://www.certsoft.com/mac.htm

This also has the benefit of ensuring that your gear won't conflict with any off-the-shelf gear that has a properly registered OUI.

You may be in danger of colliding with sketchy knockoff gear from China that didn't bother to pay for an OUI, but since you won't have any of that on your network, you're fine.

I'm kind of curious now, what is this project?

Cool! Time to order some samples.

Honestly, the network of uCs is something I've been milling over for a while, with a variety of uses. The specific project I'm thinking of right now is a Christmas Light flasher, for turning on and off a whole bunch of relays. Mostly because I have 90% of the parts on-hand.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

BattleMaster posted:

Also you can program the ENC28J60 to disregard broadcasts so you don't have to worry about it receiving anything that it doesn't care about. Just something to consider if you have a network already set up that you can use to save you the trouble of setting up a second one just for the project.

For this particular project, I'd want to run the wires outside, so I'd just use an old, crappy switch that I don't care about (Plus, my Gigabit switch cranks down to 10/100 if a 10 mbps device is attached :( ). I'll disregard anything but unicast packets, anyway. If I have the time and tenacity, I might set the master node up with a full TCP stack, so I can interface to a PC that way, instead of through RS232 or similar.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

ANIME AKBAR posted:

I never properly learned C. Assembly was fine for simple MCUs like avrs, but obviously wouldn't cut it for C2000 core parts. When I was messing around with my devkit, just looking at the example header files would give me a headache (about ten files, a few hundred lines of code). Hopefully at some point I'll have enough time to take a proper programming course that uses C (our required undergrad course taught java of all things...), so I can properly understand things.

Although my anecdotal sample size is pretty small, I have never encountered an EE whose school offered an appropriate C course for Embedded programming.

My Intro to Programming class was C, but half the students in the course were Psych majors. It was almost worse than useless.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
The only programming course open to EEs other than Intro to C is a Computer Interfacing course which teaches Assembly on an ancient, half-broken suite of MC68HC11 development equipment, unless you count some simple intro to Labview or Matlab courses. As a graduate student, its often taken for granted that the students are able to fluently program in *some* language or another, and it's hurting a lot of my less self-starting peers (although a lot of these people probably shouldn't be in graduate school, but that's another can of worms).

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
Cells in parallel have the potential to generate dangerous short circuits. If you have one cell which has a lower voltage than the others, you're going to see overlarge currents through the lower-voltage cell. This can occur if you're using batteries with different charge states, of different voltage ratings, or if a cell fails.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

babyeatingpsychopath posted:

My msp430 came a few weeks ago, and it's 100% incompatible with linux. Oh well.

Careful about that: http://hackaday.com/2010/08/11/how-to-launchpad-programming-with-linux/

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
Don't waste your money on a Radioshack firestarter. For the same $15, this iron (http://www.mpja.com/viewallpict.asp?dept=461) will last a lot longer, and do a much better job.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Delta-Wye posted:

You basically need something with a stand and a fine enough tip for SMD work (which really doesn't require /that/ fine of a tip anyways). The ZD-99 looks fine, I have a similar Weller WLC100, either will probably do the job (although $17 is cheap enough to make me start wondering about the real value).

At the local hackerspace, we use these to teach all our soldering workshops. They definitely feel cheap, but they've held up to some abuse. They are absolutely, assuredly more well put together than the $15 irons at Radioshack.

For $50, this is the iron I use everyday: http://www.mpja.com/prodinfo.asp?number=15141+TL

It's a champ. With a steady hand, it's no problem soldering some pretty tiny surface mount parts.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

mAlfunkti0n posted:

Just checking in, need some advice on a soldering station.

I have used the cheapo radio shack units many times, I have about 20 of them I am sure, just can't find them which is probably a good thing. I need something that is capable of working on laptop motherboards (for soldering/desoldering stuff like AC jacks, etc).

I generally don't work with anything tiny, so what would be a good kit for me? I would prefer to stay under $100.

For $15, this is a great station: http://www.mpja.com/viewallpict.asp?dept=461

We use them to teach soldering workshops, and they've held up for 2 years without a problem.

For $50, this knock-off is great: http://www.mpja.com/prodinfo.asp?number=15141+TL

This is the iron I use for everything, from through-hole to leadless surface mount, and it's held up great.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

mAlfunkti0n posted:

Really interested in the 302A, can you find the tips locally or pretty much just through that site?

Edit : Bought one :)

Absolutely can't buy tips locally, but you can get them from MPJA, and https://www.web-tronics.com. I think some Hakko tips work, as well, but I can't promise anything.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

CowGuy posted:

I can't remember the name of the site, but what they do is let people send in schematics for a pcb and wait till they get enough and then do a mass bulk printing and it's really cheap. Anyone know what site I'm talking about?

BatchPCB, run by Sparkfun.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

ante posted:

Some dude at my school just told me about http://www.futurlec.com

Cheap resistor and assorted IC packs and stuff. I don't know how reputable they are yet, but I just ordered a small shipment that should arrive within a couple weeks.

Futurlec is great. Shipping takes a while, though.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

ante posted:

What's the low-down on PIC in-circuit debuggers?

Any reliable cheap ones I can get, or easy DIY schematics?

I'm building this right now. Ask me about it again in 2 days, when I've got it finished: http://www.mcuhobby.com/articles.php?article_id=7&rowstart=1

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Zaxxon posted:

yeah I know, that's why I put language in quotes. I just find that learning to do stuff via the Arduino system is a good way to learn to never look outside of the atmega168 chip. I just think people who are going the arduino route should just go with regular old AVRs instead.

I disagree. The Arduino platform is a great way to get a leg-up on development, in a lot of ways. Sure, if you're using Arduino and Arduino only in finished products, you're boxing yourself in, but when the task is "bang together a pitot tube in 15 minutes using parts on hand", or "figure out how this sensor works so we can integrate it into a larger system," the Arduino and its libraries are a great minimum-effort path to accomplishing things like that.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

thenickmix posted:

Anybody here purchased any of Jameco's grab bags? I'm curious if it's a pretty wide assortment or if they give you like 50 of one thing.

Their resistor and capacitor grab bags are a pretty good mix, but kind of a pain in the rear end, since they are grab bags.

The IC grab bags are, well, grab bags. Sometimes you get a million quad NOR gates, sometimes you get a really decent mix.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

PDP-1 posted:

What are you using to do your pcb layout? I've been getting my boards from ExpressPCB mostly just because they give you some decent CAD software for free. Getting the boards masked/silkscreened/delivered from them was ~$80ish for three boards that are about 2.5" x 3.5". If there is some free/super-cheap way to make the Gerber files that ITead wants they seem to offer a much better deal.

Eagle CAD is pretty much the standard for free/cheap PCB layout. The free version will let you lay out a 2 layer board up to 3x4 inches (or so) for personal/non-profit use. A personal version for $75 lifts those size and layer restrictions, but keeps the "personal/non-profit" clause.

KiCad sucks, but it doesn't suck quite as hard as all the other completely free options.

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.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Hillridge posted:

Out of curiosity, how many of you are members of hackerspaces? DIY electronics are a big part of most of those places.

I'm thinking about starting a thread on them, though I'm not sure which forum would be best for it.

I'm on the board of directors at LVL1 (http://www.lvl1.org/), a hackerspace in Louisville, KY.

We've had a space since July 1st, 2010, and were founded in November, 2009.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Slanderer posted:

So, I think it's about time for me to switch over to an ARM processor for the next project I'm working on. While I'm still fond of atmegas, and my relationship with xmegas is pleasant-yet-complicated, they simply don't have what I need.

Specifically, I want to be able to somewhat more seamlessly drive a graphic lcd (probably 320X240 or something), while not taking up most of my I/O pins, AND be able to update the display at 20Hz, bare minimum. Not to mention, still performing all the other ultra-critical stuff at the same time (talking to a couple of I2C and SPI devices, sampling the hell out of the ADC, taking mostly-digital input from rotary encoders, and driving an audio amp with a DAC. Now, I can do all that right now on the xmega, with the exception of adding the LCD. At least, I think so.

But regardless, I want a more powerful device, one that can probably support an OS or an RTOS. And one that is well-known enough for me to find info on when I get stuck.

Suggestions?

I've been messing around with the STM32 devices. The toolchain is reasonably easy to get up and running, and the lineup is pretty good.

FreeRTOS has a lot of momentum, but the official documentation is difficult to navigate, and the operating system doesn't make a lot of sense to my puny brain. ChibiOS, on the other hand, has easier to navigate documentation (but only by a little), and makes a lot more intuitive sense. Plus, it provides a hardware abstraction layer with out-of-box support for most STM32 peripheral devices.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

SnoPuppy posted:

There's a couple of chinese companies that resell services from some chinese fab.
http://iteadstudio.com/store/index.php?main_page=index&cPath=19_20
http://www.seeedstudio.com/depot/fusion-pcb-service-p-835.html?cPath=185

I've used iteadstudio before and it worked out pretty well. You can get 10, 5cm x 5cm double sided boards with silk and soldermask for $10.

I think it took 2 weeks from when I sent gerbers to when I had boards in hand, and I used the cheapest shipping option they had.
They won't be able to hold your hand, and if you have any DRC errors they probably won't let you know (your boards might not work).
I'd also be conservative on the trace and space they claim - I wouldn't go below 8/8 and a 25 mil via, and I'd go much bigger if possible.

I have used seeed studio before with great results. These boards look as good as anything from BatchPCB or Advanced circuits, if you stay strictly inside their DRC rules. At $10 for 10 boards, it's a no brainer. I usually have more than one project kicking around anyway, so a 2 week wait isn't a big deal.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Delta-Wye posted:

http://dorkbotpdx.org/wiki/pcb_order has been my place of choice. It's usually a pretty quick turnaround once an order closes and ships, price can't be beat, and I have had no trouble with the quality. I think he just panelizes hobbyists' boards and sends them to gold phoenix but it gets you a price you can't get without ordering a shitload of boards. Shipping is included, and the guy is easy to work with.

Unless he's got a special arrangement with Gold Phoenix, they charge something like $20 *per design* if you panelize it yourself. At least, that's what they charged me, and I think that's why they charged it.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Bad Munki posted:

I realize the normal need for a resistor, but that significantly complicates the circuit in this case. The point is to not have anything more than is absolutely necessary. I guess maybe I could solder one in right against the LED and then use the resistor's remaining lead to contact the battery...

If that's the entirety of the circuit, though, what's the real drawback of not having the current limiting resistor? Decreased battery life? Overheating? What?

Decreased LED and battery life are the only real downsides. Instead of 10 years, your LED will last 10 days, and instead of 10 days of battery life, you'll get 1 day.

As an aside, it is *really* fun to toss one of these LED throwies in a helium balloon and watch where they go. It's incredible how far off you're able to see them at night.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
Pololu and Solarbotics are great. Solarbotics can take a while to ship, though. They're located in Canada, and a lot of people I've known have packages held up in customs.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Bad Munki posted:

I'm putting some valuable stuff in a storage locker, but this particular place provides the locks & keys. It's a particular lock that I can't readily replace with my own, and there's probably something in the contract forbidding it anyhow.

So I want to try to rig something up that would log when the locker is opened and closed, how long it was open, etc. Something I could just go grab once in a while to pull the logs off of. So far, I've thought to use an old-rear end reasonably-sacrificial arduino I have with a couple leads and just gluing a metal flap to the bottom of the door so that when it's pulled down, the metal flap sits on two contacts and closes a circuit, and then I can just plug the arduino into a battery and leave it watching that circuit.

There's certainly a better solution, though, and probably one that wouldn't eat up batteries as fast (I have no idea what the lifetime is for a 9v battery powering an arduino.)

The locker is a pretty typical setup: 6x10, up/down sliding garage-style door. Concrete floor. Raised from the outside, so water shouldn't be a problem.

If you're comfortable programming, this seems like a good application for the MSP430 (Chip that comes in the $4.30 TI LaunchPad). Hook up a 32kHz crystal for the RTC, and wire a reed switch to an interrupt pin. A reed switch is a sealed switch actuated by a magnet. This will be much more reliable than physical contacts.

The MSP430 uses something like .5 uA in standby. Assuming it spends the vast majority of time in that mode, a couple of AA batteries would self-discharge before the uC made a dent in them. (2x Lithium AA cells @ 2000 mA-H / .5 uA = 457 years).

Edit: Sorry, in RTC mode, the MSP430 uses .7 uA, so only 326 years.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Vinlaen posted:

Ahhh, OK. That makes sense.

So all voltage regulators require more voltage than they are rated for?

Not *all* voltage regulators. All *linear* voltage regulators (7805 and the ilk) require a higher input voltage than output voltage.

Think of a linear regulator as a "smart resistor," which takes some range of voltages as inputs (say, 7 volts to 24 volts), and outputs a steady 5 volts. In order to reduce the voltage, they waste energy as heat.

There's another class of regulators known as "switching regulators." These use inductors and capacitors as energy storage tanks, and switch the input voltage on and off, alternatively storing energy and releasing energy. These provide a steady output voltage by varying the switching speed and duty cycle as your load changes, but because they're switching on and off, they can be much more efficient. You can modify the architecture of this mechanism to actually provide a voltage *boost*.

This is, of course, greatly simplified.

The eevblog has a great video about this: http://www.youtube.com/watch?v=cM7t1Mpu7s4

As an aside, I've been using the MCP1640 in almost every little project I've thrown together lately. A step-up switcher that only requires a single inductor and some sense resistors to power a project from a single AA battery? Hell yes.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
We used PCBFabExpress for some recent quick-turn prototypes, and they were cheaper than just about everything else out there. SunStone Circuits is also good.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Loving Africa Chaps posted:

Lots of people ITT don't seem too keen on the arduino. Tried to find some posts explaining why but does anyone have some rough outlines?

I've got some ideas for some projects that I'd like to do and I have an arduino that I hosed around with before but am not adverse to getting something else. The parallax propeller series seems pretty baller and I might go with that.

The Arduino is great for getting into embedded electronics, and it's great for rapid prototyping. The problems start when you want projects that are faster, stronger, cheaper, or smaller.

For example, in larger-scale or more complicated projects, the default libraries and configurations are stupid. The wire library, for example, is full of death-loops and interrupt handlers which have the potential to last for way too long. The Arduino Mega still has a bootloader which precludes the use of the watchdog timer. When a serial port error occurs on Windows, the Arduino IDE somehow locks that serial port up until you hard reboot the computer. (These are all problems I've encountered in the past 24 hours, working on a project which really shouldn't be using an Arduino).

So, in my opinion, the Arduino is a great place to get started in embedded electronics. It's a great tool to keep around, no matter how experienced you are, but it isn't a pancea. As for anyone that looks down on the community, or criticizes a project just because it uses an Arduino, that's just elitism.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
Of course, a very nice AVR programmer can be had for the price of two Arduinos: http://www.atmel.com/tools/AVRDRAGON.aspx

An okay AVR programmer can be had for less than the price of a single Arduino: http://www.adafruit.com/products/46

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Slanderer posted:

Stay the hell away from the AVR Dragon. Mine lasted like a week, and they are apparently hilariously prone to failures from ESD, incorrect fuel/air mixtures, and the population density of unicorns.

I've heard the same thing, but mine has withstood hilarious amounts of mishandling. I've careful to always handle it around the edges, and I haven't had any problems yet.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Delta-Wye posted:

Talked the prof I TA for into buying one for the lab and it lasted less than a week in the hands of the students.

Take that for what it's worth.

I'll keep using mine until it breaks, and if that happens, I'll probably buy another. The next programmer up the line with nearly the same functionality is 3x the cost. I've been nothing short of completely satisfied with it.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Otto Skorzeny posted:

Are there any regular cheap hotplates that are especially suitable for soldering?

Not that I've seen. Any hotplate will benefit from some added thermal mass. I've used plates of aluminium and steel, and also sand with aluminium foil on top.

I've had the most success using a low temp solder with a hotplate. Zephpaste liquefies at about 160C, so it's much easier to solder everything without toasting board or components.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Delta-Wye posted:

I hold the board and iron really close to my face, heat the hole, and blow through it really hard. It works great. :smug:

I was taught this trick by none other than Mitch Altman himself: Liquify the solder, then slam the board down on the workbench as hard as you can. Solder flies right out.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Lets Play Arson posted:

What kind of fidelity can you expect to get with the photo paper toner transfer method of etching PCBs? I'm thinking about trying to save money, plus maybe learn some stuff, by avoiding ordering PCBs from europe. But they make a bit use of surface mount ICs with relatively close pins.

Here's a test board I did about a year ago:


pcbtest by bradluyster, on Flickr

.5mm pitch is possible only if you go back with magnification and cut out teeny slivers of leftover copper. Even then, it's iffy and labor intensive.

In these days of cheap Chinese PCBs, you're not going to save any money, especially if you legally dispose of your copper-infused etchent. And with the cheap chinese PCBs, you get solder mask, silk screen, the whole 9 yards.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
I've been using this station for the past 4 years now. Absolutely stellar, as good as some stations that cost twice as much.

http://www.mpja.com/Solder-Station-with-Digital-Temperature-Control-Display-302A/productinfo/15141+TL/

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
These guys are great hackable, low power linux boxes: http://www.dealextreme.com/p/tp-link-703n-ultra-mini-portable-3g-802-11b-g-n-150mbps-wifi-wireless-router-light-blue-white-102903

Some folks are even selling GPIO add-on boards.

Adbot
ADBOT LOVES YOU

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
Gray Code
http://en.wikipedia.org/wiki/Gray_code

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