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
Mill Town
Apr 17, 2006

Mozzie posted:



Does anyone know how to fix this? Or at least release it so I can move the cable up. I don't want to have to redo the contacts on the inside of it.

I know this isn't as complicated of any of the projects on here but I am trying to repair some old lights instead of throwing them away.

The black plastic bit (no idea what it's called) has a larger part that's like 3/4 of a circle, and a smaller part that's like 1/4. The smaller part appears to be at the lower right in the picture. If you take a screwdriver and push the smaller bit towards the center of the cord, you should be able to pull the whole thing out of the hole in the lampshade.

e: or lamp base or whatever part of the lamp that is. :iiam:

Adbot
ADBOT LOVES YOU

Mill Town
Apr 17, 2006

Mozzie posted:


Click here for the full 450x717 image.


It's on old Ianiro redhead 1000w light. It works fine but the frayed cables aren't really good to have around 10amps.

OK, so it is how I thought. Yeah, my directions should work fine. Give it a shot.

Mill Town
Apr 17, 2006

Obsurveyor posted:

Hey cool, thanks! That did the trick. Now, is this the right way to go about doing this or can I invert a momentary SPST easier? :)

edit: VVV Unfortunately, I cannot find any small enough for what I am doing.

Simplest thing to do would be to use a normally closed button in the +V supply to the device.

E: really FB

Second edit: Here's a link to some normally closed buttons you can buy at your local Radio Shack. The reviews for these are absolutely hilarious, full of people complaining that these switches are "backwards" :laugh:

http://www.radioshack.com/product/index.jsp?productId=2062540

Mill Town fucked around with this message at 21:15 on Jun 20, 2010

Mill Town
Apr 17, 2006

Zo posted:

..so get a smaller normally closed switch. Your circuit really is completely useless in terms of practicality.

Annoyingly, I can't seem to find a tiny SPST NC switch at Digikey or Mouser. He might be onto something here.

In any case, the simplest way would be to make the existing SPST switch power a NC relay, I guess.

If you want to get a little fancier (and a little less clicky) you could use an NPN transistor to interrupt the ground side of the supply. Connect the base to the supply through a 1k resistor or thereabouts, and have the pushbutton pull the base down to ground when you press it.

Mill Town
Apr 17, 2006

Zo posted:

That's because they're typically 1P2T with both NC and NO functions, and yes, they are tiny. If you search for 1P1T NC you probably won't get that many hits.

I looked for those too, didn't find them either. :confused:

Mill Town
Apr 17, 2006

BattleMaster posted:

Oh cool, Where I live, Radio Shack stopped being Radio Shack and they stopped selling anything aside from consumer electronics. I'll have to go a bit out of my way to track them down but at least they're still being sold somewhere.

Edit: Is The Forrest Mims Engineer's Notebook a compilation of all the mini-notebooks?

I used "look inside" to take a peek and it's definitely different. Different circuits, different style, although I'd guess there's a lot of overlap.

Mill Town
Apr 17, 2006

CapnBry posted:

Here's something I thought I'd be able to figure out on my own but can't because I suck at electrons. I have this IRF510 MOSFET being driven by a 5v 500Hz PWM that I'm trying to use to control a 2.18W 12V DC fan.


I put a capacitor in there to stabilize the voltage and keep the fan from whining like my girlfriend. If I use a bigger value capacitor, the fan runs at ~12V most of the time, if I use anything lower, the whine gets louder.

So what I logically assumed is that when the gate opens, the fan pulls ~180mA and the unchecked current is filling the capacitor up which then stores enough power to keep the fan running at full speed even when the PWN is at like 70% duty. My dumb rear end figured the solution would be to put a low value resistor somewhere between the 12V and Ground to limit the current so the capacitor doesn't charge all the way up in the split second the gate is open. The question is, how many Ohms? If my math is right, a 66Ohm resistor would limit the current to 180ma so it would have to be less than that, but how much?

Am I going down the right path here?

12V fans are generally brushless DC motors, and the whining and general weirdness is probably due to the interaction of the PWM with the brushless fan's own internal controller chip rather than anything to do with the capacitor.

You need to find a fan that accepts PWM input to its controller and get rid of the MOSFET, or use the current setup with a brushed DC motor.

Mill Town
Apr 17, 2006

babyeatingpsychopath posted:

Lessee... AND/NOR gates feeding 7-segment driver, I think. Lemme try to fab up a pretty simple circuit. This doesn't need a microcontroller AT ALL.
edit:


4511 CMOS 7-seg. 22V allowable input. The display should say '0' for neutral/between gears, then 1,2,3,4,5.

I think you need to reexamine your diode logic there. The way that's currently set up, 1st, 3rd, 4th and 5th will all display 7, and 2nd will display 0. I think this is what you were going for:

Mill Town
Apr 17, 2006

Rear Admiral BOOYA posted:

Does anyone know if a superbright white LED will refract into the full, or a partial spectrum when pumped through a prism?

It won't be full, but it will be fairly spread out with a couple of peaks. White LEDs are normally actually blue LEDs with a fluorescent pigment over them, so you should see a strong blue peak and then a wider distribution in the red and green. See for example the spectrum on page 10 of this datasheet: http://www.philipslumileds.com/uploads/28/DS64-pdf

Mill Town
Apr 17, 2006

ante posted:

Doesn't matter if the stick is reading both sides. The change in resistance in one side will still change the centre voltage.

Yeah, there really is no such thing as "reading both sides." It's a voltage divider, the joystick works by measuring the voltage at the center terminal. That's it that's all.

Mill Town
Apr 17, 2006

CptAJ posted:

Keep in mind that the other LEDs DO light up (even though they're not in the simplified code version). I think the output_high() function does the setup automatically.

EDIT: Just in case, I changed the test code to use another pin and it does indeed light up. No settings required.

So yeah, what the hell is up with the GP2 pin? Faulty chip?

GP2 is the MCLR pin, which is used to reset the PIC into programming mode. If you have it configured as the reset pin, it won't work as an output.

You should set it as a regular IO rather than as a reset, but if you do that right at the start of your code, you will no longer be able to program the device. To get around this, at the start of your code, you should set all devices as inputs and then pause for a second. After the pause, configure your outputs normally. This pause will give the programmer a chance to apply the programming voltage to MCLR and put it into programming mode.

You should also disconnect that LED while programming because the programming voltage is 13V which might burn out the LED.


Edit: oh wait i read that wrong. You already realized there was a problem with GP3 since it's input only. Let me get back to you about GP2.

Edit: Try clearing T0CS (bit 5) of the OPTION register.

datasheet posted:

Note: If the T0CS bit is set to ‘1’, it will override the TRIS function on the T0CKI pin

Mill Town fucked around with this message at 18:54 on Oct 11, 2010

Mill Town
Apr 17, 2006

CptAJ posted:

Aaaand Mill Town takes the cake. Thanks dude. That did it. Had to learn a bit of assembly there to set it up :pseudo:

Thanks for the advice guys. I'll keep it in mind next time =)

No problem. For future reference you should be able to twiddle register bits from within C without using any assembly, with the bitwise AND and bitwise OR operators:

OPTION = OPTION & 0x11011111;

This will turn off the 5th bit and leave every other bit unchanged.

You can do the opposite (set a bit to 1) like so:

OPTION = OPTION | 0x00100000;

Extra fun trick: You can toggle a bit to the opposite of its previous state with ^, the XOR operator. Let's say you want to switch the output on GP0 to the opposite of its previous value, you would do:
GPIO = GPIO ^ 0x00000001

For explanation as to why this all works, see here: http://www.cprogramming.com/tutorial/bitwise_operators.html

Mill Town
Apr 17, 2006

CptAJ posted:

Yeah, I'm familiar with bitwise operations. I just didn't know how to get to the register from C so I just looked up the asm instructions since it was kinda simple. I didn't see OPTION defined anywhere.

It should be defined in 12f509.h although it may be called something else.

Mill Town
Apr 17, 2006

Captain Birdseye posted:

I dunno, my (completely unscientific) impression from using lead-free solder for the last few years is that it isn't that bad as long as you bump your temperatures up a bit. Strangely though, i've found this is only the case on FR4, lead-free on metal clad boards can go suck a dick as far as i'm concerned.

Lead free on metal boards... Sounds a lot like my last job. You wouldn't happen to be in the LED lighting industry would you?

Mill Town
Apr 17, 2006

ValhallaSmith posted:

Anyone know a good source for small super cheap displays? I'd like something 2-3" square. Monochrome, LCD or whatever technology is cheapest. Probably need 100 of them. Nothing fancy but places seem to want 10$ per part for even the bottom of the barrel. I'd be willing to use surplus stuff if I can get enough.

Sparkfun has some good deals on monochrome LCDs.

This one is only $3 but you need to source one of those annoying rubbery connector strip things to use it:
http://www.sparkfun.com/products/9924

This one is the same, but mounted on a PCB so you don't need to buy the connector. $8.
http://www.sparkfun.com/products/10168

Ninja edit: They are $2.36 and $6.36 in quantities of 100, respectively.

Mill Town
Apr 17, 2006

crabrock posted:

Thanks to whomever tried to help me, I made a little bit of progress but I'm still not really sure how to do what I want to do. I thought maybe some pictures would help.

I've been using one of the little simulators that was linked in here.

Basically I'm trying to accomplish these things:

1. Source fills up capacitor. The voltage/current is variable, sometimes being low, sometimes being high, and sometimes being off.

2. Basically I want it to add up til a certain level (that Z diode thingy) and then discharge.

3. When it gets to that level and discharges it goes through the other side of the circuit and lights up the LED for a brief time until it falls below the required value again and has to charge up.

4. I'd like it if the capacitor source was "off" the charge leaked from the capacitor but not through the LED.

I hope this makes a little more sense. I'm still pretty confused on how some of this works. I feel like I've read the same intros to electronics a billion times and they're not really helping.



That's pretty much the design of various BEAM robotics circuits (called "relaxation oscillators). Google those terms and you should get lots of good info.

The one thing about those circuits is that they normally trigger at much less than 10v. There is a Zener based one which can be used with a 10v Zener but apparently this particular circuit is kinda finicky.

The ones based on the 1381 voltage detector are much more stable but the 1381 is only available in variants that trigger at about 5v. If you use the tc-54, the European equivalent, you can get trigger voltages up to 7.7. Will that work or do you need 10v specifically?

Circuit here: http://www.solarbotics.net/library/circuits/se_t1_mse.html

Mill Town
Apr 17, 2006

Bad Munki posted:

Recommend to me a wire-to-wire connector (as opposed to a mounted connector) that has at least 8 pins, can handle up to 2A per pin, and is not the size of a school bus like those lovely ones from radioshack. They are so clunky and ugly. :argh:

Thanks in advance. :)

There's probably something in the Phoenix Combicon line that should fit the bill, although their website is huge and slow to navigate. Try searching for Phoenix on Digikey.

Mill Town
Apr 17, 2006

Ceilingfan posted:

Not sure if it's the intended purpose of this thread, but I wanted to post about a treadmill at the flat I just moved into. The roommates say they had it working at some point even though the panel on the side is splayed open with wires everywhere... Here's what it looks like:

Click here for the full 1000x667 image.

There are 9 places to connect wires to and 4 colors of wires to mix and match. Before I go trying to play amateur electrician, can anyone tell me what the wires represent? Or even if this thing is salvageable? (I've gathered that green is for grounding wires)

There's no universal treadmill wire color code, so I really can't say what's what there. Try googling for a service manual or a schematic.

Mill Town
Apr 17, 2006

Bad Munki posted:

Cut the green wire. You always cut the green wire.

No wait, is it blue? Or maybe it was red. How much time is left on the timer? Is it under ten seconds yet? Don't cut anything before that.

Yeah, this. I mean seriously, if you're making a bomb, why would you use some colour code that the cops know? Make up your own! "Hey Chief, do I cut the yellow with black stripe or the purple with blue stripe?" "Uhhhhh..."

The dudes who designed your treadmill did basically the same thing. Sorry.

Mill Town
Apr 17, 2006

AngryFeet posted:

I dont know of any I2C lcds. I think the cheapest, easiest and most commonly available lcds are the hd44780 series. They are text only, which is nice for beginners because you wont need to draw your own fonts.
They need at least 6 ios to make them work, but there is lots of code out there.

The lcd can operate in 4 bit or 8 bit mode: a byte at a time or half and half to save ios.
There are three control lines: read/write, command/data, clock
You can cheat and tie the read/write line low because you always want to write to it.
In 8bit mode you basically just load the ascii character number onto the data lines and strobe the clock line with the command/data line high, and the lcd will put that character at the cursor position.
You can set the cursor position with a command- just load the command code onto the data lines with the command/data line low and clock it in. The commands are all in the datasheet.

If you do go with an i2c lcd you will need to check the datasheet, but you have two options: Use the microcontroller's i2c peripheral, or bit bang it.

I2C is serial, and transfers happen a byte at a time. They start with a byte containing 7 bits of peripheral address and a bit to set whether the next bytes will be read or written.
You will drive the clock line to synchronise when data is read or written.
After every byte (8 clocks) the slave (the lcd) will pull the data line down to acknowledge.
If you are reading data the slave will pull the line down for a 0 bit, and leave it pulled up for a 1 bit.

If you use the micro's i2c peripheral, you will need to write to its I2C clock rate registers, setup the IOs to make sure the peripheral is being routed to the pins, and that your pins have the appropriate pullups enabled.
You will then write the address+read/write byte to the i2c data register and then read or write any data and check the ack bit which will probably be in another register. In my experience I2C peripherals can get quite complicated.

Otherwise you can just set a bit at a time on the gpios and clock it in and out.

It's not nearly that hard if you're using arduino. Or, for that matter, if you're using some sort of embedded Linux system. They both have preexisting i2c libraries that are super easy to use. Arduino has the Wire library, and Linux has the lmsensors SMBus library. No need to reinvent the wheel. I use both of these and I can't recommend them enough. They're fun and easy to work with, and SMBus even has Python bindings <3

Mill Town
Apr 17, 2006

Delta-Wye posted:

I've got a pickit2 and while it seemed like a decent programmer at the price, I don't think it has much in the way of ICD functionality. Am I mistaken?

Pickit3 is the new hotness and it has ICD support but only for certain chips. Check the documentation.

Mill Town
Apr 17, 2006

sixide posted:

Even in a flyback converter as you describe, you need a mains transformer. Right? That weight doesn't go away.

Feel free to tear me a new one if I'm completely full of poo poo (not unlikely), but I don't think chopping up 120 straight from the wall is accepted practice.

That actually is how modern switchers do it. Rectify the 120v right away, then chop it up at hundreds of kilohertz and send it through a transformer, then rectify again. That's why your laptop adapter is so tiny.

Mill Town
Apr 17, 2006

insta posted:

Low speed, dual-channel analog inputs can be had with the gameport. Slap a few cheap-as-hell sound cards in the system, and you have a gameport per, and the microphone and line-in jacks as well.

Joystick ports are really terrible and not very accurate. If you want something a bit better, an arduino or an MSP430 will give you something faster and more accurate but still cheap.

Mill Town
Apr 17, 2006

Captain Stinkybutt posted:

Hello! I hope this is an appropriate place to posit my question.

I recently came across this :

http://www.etsy.com/listing/74059377/working-arcade-light-switch

And I decided that by golly, I wanted one! Except. You know, $35. For $3 of plastic. This will not stand, nope, so I want to make one. The plate is like $.50 or free or whatever, the buttons are like $2, easy enough. Except the buttons are momentary switches and do not normally function as toggle switches, of course. This is where I lose track because I only know how to work on arcade cabs a bit and nothing about interior wiring. Fine fine.

The solution that was posited to me was that I should be using a latching relay rated for at least 110v/15a for a standard US light switch.

Is there anything MISSING in this solution or can you brilliant people suggest a more elegant solution? If it is beyond my scope I will probably make my boyfriend do it, but I want to make sure I'm at least headed in the right direction.

$35! :v:

No, that's fine. The "on" button should be a "normally open" button that powers the latching relay, and the off button should be a "normally closed" button that interrupts power to everything and makes the relay switch off. Just google these terms if you need more detail.

Mill Town
Apr 17, 2006

grams per square inch are you loving kidding me

Adbot
ADBOT LOVES YOU

Mill Town
Apr 17, 2006

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?

Normally both of those things would be a risk with a bigger battery, but a tiny button cell like that has tens of ohms of internal resistance that let you get away without the resistor.

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