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
csammis
Aug 26, 2003

Mental Institution

Kire posted:

Ah, that fixed it, thanks- you were right, using BIT4 was incorrect.

The errors I get from using your debounce.h, with #define DEBOUNCE_USING_WDT are:
PWM_select is undefined (referring to my own code. this makes no sense and goes away if I don't include debounce.h) and three errors on line 98 of your code ("interrupt(WDT_VECTOR) wdt_isr()"):
expected an identifier, the modifier "interrupt" is not allowed on this declaration, and expected a ; .

Glad you got it working :)

I'm guessing the compile error "PWM_select is undefined" has to do with the compile error in debounce.h - the compiler gets "confused" because it can't determine what wdt_isr is supposed to be. I said that the syntax on the ISR declaration was probably gcc specific. Change interrupt(WDT_VECTOR) wdt_isr() (the GCC syntax) to the syntax you're already using for the Port1 ISR:

code:
#pragma vector=WDT_VECTOR
__interrupt void wdt_isr()
Realistically though you should be using the same debounce logic that other CCS users use. My debounce.h is (a) a GCC asm implementation of __delay_cycles which I think CCS already has and (b) a usage of the watchdog timer that may not cut it for more advanced applications. Google around for "msp430 debounce" and determine the best thing for your use case.

Adbot
ADBOT LOVES YOU

some kinda jackal
Feb 25, 2003

 
 
What's a good go-to low-volume PCB etching shop? I need to etch maybe a 2"x2" board and I have zero interest in getting the chemicals right now. Doesn't need to be speedy so a Chinese shop is fine, I just don't know what the good ones are. I'm using all through-hole components but I can drill my own holes if it's cheaper, etc.

BlackTie
Oct 23, 2008
OSH Park is a good one. 1 square inch for 5$ and three boards. For a 2"x2" board, though, you might want to use Seeed. You'd pay 9.90 instead of 20. I've used both and quality's fine. It does take about 3 weeks or so to arrive.

some kinda jackal
Feb 25, 2003

 
 
No rush on my part for this particular project so I'll check out Seeed, thanks!

movax
Aug 30, 2008

BlackTie posted:

OSH Park is a good one. 1 square inch for 5$ and three boards. For a 2"x2" board, though, you might want to use Seeed. You'd pay 9.90 instead of 20. I've used both and quality's fine. It does take about 3 weeks or so to arrive.

I just put in a board order with them, very awesome. Had a problem submitting my files, the guy got back to me in a day and once I fixed it, super easy and you get automatic email updates letting you know the status of your panel. Would happily use again.

e: OSH Park vv

movax fucked around with this message at 17:47 on Jun 11, 2013

some kinda jackal
Feb 25, 2003

 
 
Which one are you referring to? :haw:

movax
Aug 30, 2008

Martytoof posted:

Which one are you referring to? :haw:

OSH Park :downs:

Slanderer
May 6, 2007
Even though Advanced Circuits isn't as cheap as China, I recommend people use their FreeDFM service anyway, even if they are ordering from somewhere else.

https://www.my4pcb.com/net35/FreeDFMNet/FreeDFMHome.aspx

It picks up on stuff I either overlooked during layout, or stuff that Eagle simply didn't flag.

movax
Aug 30, 2008

Slanderer posted:

Even though Advanced Circuits isn't as cheap as China, I recommend people use their FreeDFM service anyway, even if they are ordering from somewhere else.

https://www.my4pcb.com/net35/FreeDFMNet/FreeDFMHome.aspx

It picks up on stuff I either overlooked during layout, or stuff that Eagle simply didn't flag.

Oh yeah, I've used them before as well, and if you run FreeDFM, not only does it help you, they knock $50 or $100 off your order as well, so keep that in mind when looking at their (usually) higher prices for stuff.

Slanderer
May 6, 2007

movax posted:

Oh yeah, I've used them before as well, and if you run FreeDFM, not only does it help you, they knock $50 or $100 off your order as well, so keep that in mind when looking at their (usually) higher prices for stuff.

Also, I think someone usually takes a look at the order and verifies that nothing huge is screwed up before the boards are actually made (I think I messed up both the board edges and some text one time, and they were able to correct the borders and remove the screwed up text from the silkscreen, and everything worked out fine).

Delta-Wye
Sep 29, 2005

Martytoof posted:

Which one are you referring to? :haw:

I'm sure he was referring to OSHPark, Laen is a cool dude and extremely helpful. Surprisingly so, to be honest. I don't think he has a life :(

EDIT: Beaten like a stray dog :downs:

FSMC
Apr 27, 2003
I love to live this lie

Martytoof posted:

What's a good go-to low-volume PCB etching shop? I need to etch maybe a 2"x2" board and I have zero interest in getting the chemicals right now. Doesn't need to be speedy so a Chinese shop is fine, I just don't know what the good ones are. I'm using all through-hole components but I can drill my own holes if it's cheaper, etc.

If you are in the UK and just need a single board, you can get one free from http://www.spiritcircuits.com/services/go-naked.

Otherwise I use http://imall.iteadstudio.com/open-pcb/pcb-prototyping.html , which are slow but cheap. (Probably similar to seeed)

Bad Munki
Nov 4, 2008

We're all mad here.


Cheapest way to get wireless interactivity between a bunch of devices, OKAY GO



The specs: a bunch of small battery powered devices, doing little more than lighting some LEDs in each device. Need to address each device individually. Need to send a packet that will be 3 bytes. Transmission is one-way (from controller to wireless devices.) Transmission rate is up in the air (HAR HAR) but I'd like to aim for, say, a few thousand updates per second total, but faster is better. The environment is fairly "clean" in that it's not broadcasting over long distances (<20') and there are no intervening structures. There is, of course, always going to be some interference from things like the local wifi, a microwave, things like that.

It's for Art™.

Slanderer
May 6, 2007

Bad Munki posted:

Cheapest way to get wireless interactivity between a bunch of devices, OKAY GO



The specs: a bunch of small battery powered devices, doing little more than lighting some LEDs in each device. Need to address each device individually. Need to send a packet that will be 3 bytes. Transmission is one-way (from controller to wireless devices.) Transmission rate is up in the air (HAR HAR) but I'd like to aim for, say, a few thousand updates per second total, but faster is better. The environment is fairly "clean" in that it's not broadcasting over long distances (<20') and there are no intervening structures. There is, of course, always going to be some interference from things like the local wifi, a microwave, things like that.

It's for Art™.

HopeRF makes some cheap FSK transceivers that could do that, and (as I recall) can do a whole bunch more. Sparkfun has a couple, and some breakout boards/arduino shields if you want to test something quickly.

https://www.sparkfun.com/products/10153
https://www.sparkfun.com/products/9582

HopeRF has a lot of other options, but I'm not sure what distributors they have in the US.

FAKE EDIT: Just realized you didn't need transceivers. In that case, simple ISM band transmitter + receivers would work cheaply, assuming the uC connected to the receiver can decode every message and find the right address. The only advantage of the transceivers is that they can handle noise and re transmission of dropped packets better.

Bad Munki
Nov 4, 2008

We're all mad here.


Not worried about retransmission since the next signal would be more important than the last one. That is, if a command is missed, the next one will do just fine. :)

Can you tell me more about what would be involved in crafting a "simple ISM band transmitter + receivers"? Radio stuff is well beyond what I know anything at all about. I know that if I got my feet wet and learned some basics here, I'd have a blast, because there's so much fun stuff I could do with it, so I'm hoping this will be a useful project in that regard.

e: Knowing next to nothing about what I'd be after, is this the sort of thing I'd be using? http://www.mouser.com/ProductDetail/Micrel/MICRF113YM6-TR/?qs=sGAEpiMZZMv2aFJto%252b5bBd%252byUmIPqdDp8fvp42jfcvY%3d

ee: And this from the same manufacturer for a receiver? http://www.mouser.com/ProductDetail/Micrel/MICRF008YM/?qs=sGAEpiMZZMvxLC1VZo1hVm8%252bfuqwcM5YIPvxBb6a33U%3d

They talk about it being "true data in, antenna out" and vice versa for the receiver. I don't know if that means what I think it means, but I'm reading it as meaning that if I morse-code a signal into the transmitter, I'll see the same signal out from the receiver, just so? Because that'd be perfect.

Bad Munki fucked around with this message at 23:13 on Jun 11, 2013

asdf32
May 15, 2010

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

Martytoof posted:

What's a good go-to low-volume PCB etching shop? I need to etch maybe a 2"x2" board and I have zero interest in getting the chemicals right now. Doesn't need to be speedy so a Chinese shop is fine, I just don't know what the good ones are. I'm using all through-hole components but I can drill my own holes if it's cheaper, etc.

Express PCB or PCB Express. Confusingly these are not the same. Express PCB is known for quick $51 turns and their custom software. Personally I don't mind their tools and have used them a number of times but you definitely want to limit the complexity of what you're doing with them.

Advanced circuits, as suggested is good for assembly and I believe they contract with PCB Express for fab, and/or can deal directly with Express PCB.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Bad Munki posted:

Cheapest way to get wireless interactivity between a bunch of devices, OKAY GO



The specs: a bunch of small battery powered devices, doing little more than lighting some LEDs in each device. Need to address each device individually. Need to send a packet that will be 3 bytes. Transmission is one-way (from controller to wireless devices.) Transmission rate is up in the air (HAR HAR) but I'd like to aim for, say, a few thousand updates per second total, but faster is better. The environment is fairly "clean" in that it's not broadcasting over long distances (<20') and there are no intervening structures. There is, of course, always going to be some interference from things like the local wifi, a microwave, things like that.

It's for Art™.

nRF24L01+ modules: http://www.ebay.com/itm/10Pcs-NRF24...=item1c2eaa5977

At $12 for 10 of 'em, they're hard to beat. You can get them in greater bulk direct from China around $0.75 each. I can pretty reliably get 100M LOS at the lowest speeds. You can buy 'em with power amplifiers as well, which gives a huge boost to range (and price).

Bad Munki
Nov 4, 2008

We're all mad here.


Oh, wow, $1.20 per? That's solid. Are these going to struggle with interference from wifi or, say, cause problems with other wireless devices like a wireless mouse/keyboard (which I know operate in the 2.4 range)? Sounds like I should be able to get it working with an arduino or similar via SPI, any advice on that front? That's a hard price to beat, so I'm willing to put in a little extra effort as that price point would let me do a LOT more devices.

e: Screw it. At that price, I bought a pack, and I'll sort out the details later. If I can't make it work for my purposes, I'll donate them to the makerspace. If I can make them work, I'll probably order like ten more packs. :v:

Bad Munki fucked around with this message at 01:26 on Jun 12, 2013

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.

Bad Munki posted:

Cheapest way to get wireless interactivity between a bunch of devices, OKAY GO



The specs: a bunch of small battery powered devices, doing little more than lighting some LEDs in each device. Need to address each device individually. Need to send a packet that will be 3 bytes. Transmission is one-way (from controller to wireless devices.) Transmission rate is up in the air (HAR HAR) but I'd like to aim for, say, a few thousand updates per second total, but faster is better. The environment is fairly "clean" in that it's not broadcasting over long distances (<20') and there are no intervening structures. There is, of course, always going to be some interference from things like the local wifi, a microwave, things like that.

It's for Art™.

I just completed a project using Linx Tx/Rx chips and they were dirt simple to use. You pretty much just send a 1 or 0 to the transmitter and a corresponding 1 or 0 drops out of the receiver end. That'd mean you would have to handle the receiver addressing on your own and just treat the Linx stuff like a data bus with several listeners attached.

Also, remember to figure the cost of some antennas and RF connectors/cabling into your plans. There's more to do than just have some Tx/Rx chips on your boards. :)

Bad Munki
Nov 4, 2008

We're all mad here.


Yeah, it looks like that 10-pack I ordered above has a small antenna as part of the PCB. For this application, the needed range is going to be so small that that's plenty. I mean we're really talking like 10-15', certainly no more than 20'. As for the addressing thing, that's fine, just add a byte on to my 3-byte message I was planning on sending, that'd give me more than enough addresses.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Bad Munki posted:

Oh, wow, $1.20 per? That's solid. Are these going to struggle with interference from wifi or, say, cause problems with other wireless devices like a wireless mouse/keyboard (which I know operate in the 2.4 range)? Sounds like I should be able to get it working with an arduino or similar via SPI, any advice on that front? That's a hard price to beat, so I'm willing to put in a little extra effort as that price point would let me do a LOT more devices.

e: Screw it. At that price, I bought a pack, and I'll sort out the details later. If I can't make it work for my purposes, I'll donate them to the makerspace. If I can make them work, I'll probably order like ten more packs. :v:

I haven't experienced any interference. They're frequency agile, though, in 1MHz steps. They have a command that will return the background signal level on a given channel, so you can search for the "clearest" channel.

Here's a pretty well-documented Arduino lib: http://maniacbug.github.io/RF24/
Here's a pretty well-documented and well-written MSP430 lib: https://github.com/spirilis/msprf24

Bad Munki
Nov 4, 2008

We're all mad here.


Zuph posted:

I haven't experienced any interference. They're frequency agile, though, in 1MHz steps. They have a command that will return the background signal level on a given channel, so you can search for the "clearest" channel.

Here's a pretty well-documented Arduino lib: http://maniacbug.github.io/RF24/
Here's a pretty well-documented and well-written MSP430 lib: https://github.com/spirilis/msprf24

Awesome, and thanks for the link. But holy cow, how awful is that first one's server, though? It literally 503s 9 times out of 10. I mean, web hosting is basically free, guy should probably not be running his server off his dialup connection. :downs:

e: Wait, it's on github? wtf is .io? Server still sucks :colbert: Maybe it was something temporary, seems to be better.

Bad Munki fucked around with this message at 02:52 on Jun 12, 2013

ANIME AKBAR
Jan 25, 2007

afu~

Zuph posted:

At $12 for 10 of 'em, they're hard to beat. You can get them in greater bulk direct from China around $0.75 each. I can pretty reliably get 100M LOS at the lowest speeds. You can buy 'em with power amplifiers as well, which gives a huge boost to range (and price).

Man I wonder how many laws a US producer would have to break to get the price that low...

movax
Aug 30, 2008

ANIME AKBAR posted:

Man I wonder how many laws a US producer would have to break to get the price that low...

I have no idea how the sellers make money selling me things for like $1-$2 shipped (RS-232 to USB converters, etc). I know there are counterfeit ICs and such, but just the cost of shipping!

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

movax posted:

I have no idea how the sellers make money selling me things for like $1-$2 shipped (RS-232 to USB converters, etc). I know there are counterfeit ICs and such, but just the cost of shipping!

And typically have excellent customer service that will immediately offer to refund you/ship you another if you even mention that the item didn't arrive/was broken or whatever.

Terminal Entropy
Dec 26, 2012

You have to keep in mind the resistors are made next door, pcb down the street and the plastic is molded two blocks over, so the overhead is minimal to begin with without factoring in volume or knockoffs.

Captain Capacitor
Jan 21, 2008

The code you say?
So I have this.


Is it possible to remove the antenna? I'm trying to get this RFID reader into a smaller package. I realize I'd have to complete the circuit, of course, and the range reduction is fine, too.

Slanderer
May 6, 2007

Captain Capacitor posted:

So I have this.


Is it possible to remove the antenna? I'm trying to get this RFID reader into a smaller package. I realize I'd have to complete the circuit, of course, and the range reduction is fine, too.

Uhh... if you remove the antenna, it won't work at all. RFID effective range is in inches generally, since it needs to power the receiver device. You could replace it with a coil antenna, but you probably don't have the correct equipment to tune it (that's what all those capacitors are there for).

Trabisnikof
Dec 24, 2005

Captain Capacitor posted:

So I have this.


Is it possible to remove the antenna? I'm trying to get this RFID reader into a smaller package. I realize I'd have to complete the circuit, of course, and the range reduction is fine, too.

No. The analog/digital voodoo of RFID is something that will not work moved. What frequency RFID are you using? I can probably find you a smaller transceiver.

Sagebrush
Feb 26, 2012

Since the previous two posts weren't really clear on it, the reason the antenna is necessary is because the power for the passive tag you're reading comes from the reader. The antenna in the reader and the antenna in the tag are tuned to each other, and basically form an air-core transformer; powering the reader creates an EM field that induces a few microamps of current in a nearby tag's antenna, and that tiny current is enough to power the chip and tell it to read back its ID number.

So, if you cut the antenna off, you won't just be "losing range", you'll be ruining the carefully tuned system that allows the reader to transmit power to and activate any nearby tags.

Captain Capacitor
Jan 21, 2008

The code you say?
I'm using the 13MHz variety (but I'm not married to it or anything, the Khz versions should be fine as well depending on the range difference), I just need something that fits in a smaller form factor.

Sagebrush posted:

Kind explanation

Yeah it just occurred to me exactly how it works.

Captain Capacitor fucked around with this message at 04:14 on Jun 13, 2013

kid sinister
Nov 16, 2002
Can anyone explain to me why my valve isn't switching like it should? I'm just "bench"-testing everything right now at my dash with a bunch of jumper cables and this valve isn't reliably switching back and forth like it should. Yes, all my connections are good as verified with my multimeter. The weird thing is that it does work if I jiggle either jumper where I marked with an arrow:



The strange thing is that I tried the included 4-way switch instead of the relays, and it works fine... Help me out, this is the first time I've messed around with relays before.

kid sinister fucked around with this message at 01:16 on Jun 14, 2013

Kire
Aug 25, 2006

Bad Munki posted:

Cheapest way to get wireless interactivity between a bunch of devices, OKAY GO



The specs: a bunch of small battery powered devices, doing little more than lighting some LEDs in each device. Need to address each device individually. Need to send a packet that will be 3 bytes. Transmission is one-way (from controller to wireless devices.) Transmission rate is up in the air (HAR HAR) but I'd like to aim for, say, a few thousand updates per second total, but faster is better. The environment is fairly "clean" in that it's not broadcasting over long distances (<20') and there are no intervening structures. There is, of course, always going to be some interference from things like the local wifi, a microwave, things like that.

It's for Art™.

Looking at the previous posts I guess you're trying to find a specific chip to integrate into a custom PCB that you're making, so this probably isn't what you want: http://www.ti.com/tool/ez430-rf2500 but I think it looks rad and I want to get some of those myself. Good for easy programmability and giving battery powered breadboards wireless capability.

theperminator
Sep 16, 2009

by Smythe
Fun Shoe

kid sinister posted:

Can anyone explain to me why my valve isn't switching like it should? I'm just "bench"-testing everything right now at my dash with a bunch of jumper cables and this valve isn't reliably switching back and forth like it should. Yes, all my connections are good as verified with my multimeter. The weird thing is that it does work if I jiggle either jumper where I marked with an arrow:



The strange thing is that I tried the included 4-way switch instead of the relays, and it works fine... Help me out, this is the first time I've messed around with relays before.

Maybe you're not providing enough current to the relays?

isr
Jun 13, 2013

kid sinister posted:

Can anyone explain to me why my valve isn't switching like it should? I'm just "bench"-testing everything right now at my dash with a bunch of jumper cables and this valve isn't reliably switching back and forth like it should. Yes, all my connections are good as verified with my multimeter. The weird thing is that it does work if I jiggle either jumper where I marked with an arrow:



The strange thing is that I tried the included 4-way switch instead of the relays, and it works fine... Help me out, this is the first time I've messed around with relays before.

Whats the relay part number? What is your power supply?

kid sinister
Nov 16, 2002

theperminator posted:

Maybe you're not providing enough current to the relays?

I just checked again. It turns out the relays aren't passing enough current for the valve to switch directions. Using the 4-way switch included with the valve instead of the relays, 1.5A would pass through the valve then it shuts off once it switches directions. Using these relays, they would only pass around 0.5A to the valve. It's funny, I can see the piston through the opening of the valve. The switching duration looks to always be the same, but the piston didn't complete the travel fully.

isr posted:

Whats the relay part number? What is your power supply?

I used these relays. The power supply is the fuel pump circuit on my truck, so 12V and I'm not sure how many amps.

isr
Jun 13, 2013
Eh, I'm stumped. Everything on the data sheet and on your schematic looks fine. You said it works when you jiggle connections, maybe the coils are getting magnetized and aren't releasing properly, and the jiggling is enough to reset it. Its probably not that, but its the only idea I can come up with..

Delta-Wye
Sep 29, 2005

kid sinister posted:

I just checked again. It turns out the relays aren't passing enough current for the valve to switch directions. Using the 4-way switch included with the valve instead of the relays, 1.5A would pass through the valve then it shuts off once it switches directions. Using these relays, they would only pass around 0.5A to the valve. It's funny, I can see the piston through the opening of the valve. The switching duration looks to always be the same, but the piston didn't complete the travel fully.


I used these relays. The power supply is the fuel pump circuit on my truck, so 12V and I'm not sure how many amps.

Those relays should produce a dead short just like the switch. I suspect a miswiring or a bad relay.

kid sinister
Nov 16, 2002
Interesting. When I start up the truck, I get 12V at one side of the valve and 0V at the other side, but once I flip the dash switch, I get 12V at the other side and 9.3V to 10V at the original side... The relays are sticking. The interesting thing is that if I jiggle either alligator clip at the valve, the currently-unpowered relay releases and the valve operates like it should.

I got a feeling I just can't shake. Could the fact that I'm using resistor relays be causing this problem?

Adbot
ADBOT LOVES YOU

Delta-Wye
Sep 29, 2005

kid sinister posted:

Interesting. When I start up the truck, I get 12V at one side of the valve and 0V at the other side, but once I flip the dash switch, I get 12V at the other side and 9.3V to 10V at the original side... The relays are sticking. The interesting thing is that if I jiggle either alligator clip at the valve, the currently-unpowered relay releases and the valve operates like it should.

I got a feeling I just can't shake. Could the fact that I'm using resistor relays be causing this problem?

What is a resistor relay?

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