|
Zaxxon posted:if there is interest I could do a "getting started with AVRs" tutorial thing, basically an intro to how to go from nothing to a board and programming environment. Here are a few links http://www.microchip.com/forums/tm.aspx?high=&m=391727&mpage=1#391728 Also if you are going to try the PIC, get a pickit 3 and the 44-pin demo board. This comes with 12 lessons or so, source code, etc. The main problem I've found with PIC are that code examples and guides are outdated. The source code microchip provides for the demo board doesn't work out the box without a few mods. So there are quite a few guides, but it's kind of a puzzle putting it all together.
|
# ? Feb 23, 2011 22:37 |
|
|
# ? Jun 3, 2024 18:35 |
|
Bad Munki posted:Can anyone tell me the difference between the ATMEGA328P-PU-ND and the ATMEGA328-PU-ND? I'm looking at the datasheet (here's the summary) but I'm just not seeing it. the P versions of chips consume less power.
|
# ? Feb 23, 2011 22:45 |
|
Unparagoned posted:Here are a few links Oh I'm quite happy in my microcontroller life, I'm just saying we have a few questions of the "I want to get started with a microcontroller family" questions and we might want to make some static tutorials that people can contact the writers about more readily.
|
# ? Feb 23, 2011 22:47 |
|
Thanks for the suggestions guys. It has made me toy with starting with Arfuino and then moving to PIC later if I so want. I 'get' analog electronics and have been building some neat stuff, so wanted to move onto digital, but I'm starting from scratch.Zaxxon posted:if there is interest I could do a "getting started with AVRs" tutorial thing, basically an intro to how to go from nothing to a board and programming environment. I would be very interested in this. In fact, I may have to put my learning microprocessors off for a few months while I sort other stuff out, so I would love to read a purpose built tutorial to any kind of microprocessors if you would be so good as to write one up.
|
# ? Feb 24, 2011 18:30 |
|
Fat Turkey posted:I would be very interested in this. In fact, I may have to put my learning microprocessors off for a few months while I sort other stuff out, so I would love to read a purpose built tutorial to any kind of microprocessors if you would be so good as to write one up. I'll write it up on my wordpress site then post a link I guess. I'm off work today so I can do a once over then improve on it.
|
# ? Feb 24, 2011 20:08 |
|
I figured this might be a good place to first ask about linear control system stuff since I imagine either somebody will answer or tell me a better thread or forum to put it. In college I did study control systems but the whole lot of the class was just grinding through it. The professor wasn't explaining anything and we all were hopelessly lost. It looks like he figured it out the year after us and subsequent students actually liked the stuff. Fast forwarding almost a decade, I see a situation where I think I need a compensator for a thermal application. Device A is setting a temperature and Device B is measuring it. They both report back a temperature but Device B is located in the place where we really care about the temperature. So I am trying to find a good way to convey feedback to device A and adjust without a lot of oscillation. To make things even more interesting, at lower temperatures, there is an undershoot problem where device B never gets as cold as device A is set, so device A has to be dropping much lower. However, at high temperatures, the temperature set by A will closely match device B. I thought I'd just whip out a PID. I used an algorithm online that would run on the PC controlling the devices. I sampled a step response at one particular temperature and used a Ziegler-Nichols tuning method to get a first impression of good PID gains. It seemed to work really well the first time. The problem was if I tried different temperatures with that PID, it failed miserably. I have thought maybe I'd collect step responses across the range of valid temperatures, calculate gains for each, and interpolate across them based on the desired temperature. I wondered if there was a better way. I am hoping to find a compensator that can be aware of the undershoot problem at the low end and still lock on to a steady, correct temperature consistently. I assume a compensator of a higher order would be capable of something like that. I wondered if there was something where I didn't need to rely heavily on tuning gains. This is because years from now, a different sensor might be in place, but the general principle will be there. Namely, it will still be true that at the point of device B, there will be an undershoot in cold conditions. Is there something better I should try? If so, can somebody point to a good online resource to sort out how to implement it and tune it properly?
|
# ? Feb 24, 2011 22:11 |
|
clredwolf posted:Helpful Resources You bastards. I just spent an hour on this and have no idea what any of it meant. Pretty cool site. adomorn fucked around with this message at 23:12 on Feb 24, 2011 |
# ? Feb 24, 2011 22:58 |
|
Rocko Bonaparte posted:Controls stuff It sounds like your temperature measurement device either has a nonlinear response or fails to work at some temperatures in your desired range. This would cause issues tuning the control loop. The other possibility is that your stuff is being heated by something else between A and B, in which case whatever you do at A isn't going to do the trick. My limited experience with differential control was always unpleasant. I'd much rather do PI control whenever possible, though I'm hardly a controls expert.
|
# ? Feb 25, 2011 02:24 |
|
Rocko Bonaparte posted:PID stuff If you are using a computer algorithm you found online check to see if it clamps the I value. If the I value is getting clamped the Ziegler-Nichols method might not work since it expects a fully linear system and the clamping makes things non-linear. Unclamp the I value or set the range to something huge and try it again. You can also manually tune your parameters. Set the PID parameters to zero, then start at some low-ish P value and see if the system stabilizes at some steady (but wrong) temperature. Gradually increase the P value until the temperature begins to oscillate around the setpoint, then back it off again so you have about 90% of the largest P value that produces a steady result. Then bump up the I value until it settles into an acceptable error range. Like sixide said, most real-world systems don't need full PID control - normally PI is enough. Adding the derivative parameter is only really needed if you have a system with nearly zero damping/friction/heat-loss.
|
# ? Feb 25, 2011 04:14 |
Why would you want a component with leads like this: instead of straight leads?
|
|
# ? Feb 25, 2011 04:15 |
|
Slanderer posted:Seconding the suggestion of looking at Chroma for reference. TI makes a bunch of chips in that line with slightly different features, so there might be one that's better for you. I don't exactly agree with their solution of slightly multiplexing the LED controller chips, as it just adds extra complication (and the chips are cheap anyway). They also had a microcontroller on each board; One could probably ditch that, and just control all the LED controllers over the SPI bus from one micro. Thanks - that project is basically exactly what I'm looking to do. There's a guy on ebay selling 600 RGB LEDs for $100, shipping included, to Canada (where I am).
|
# ? Feb 25, 2011 04:32 |
|
Bad Munki posted:Why would you want a component with leads like this: Holds the component off the board. That looks like a PTC, which can generate a lot of heat. Holding the part off the board allows it to cool better, and keeps heat soak on the board to a minimum.
|
# ? Feb 25, 2011 04:32 |
Rocko Bonaparte posted:I figured this might be a good place to first ask about linear control system stuff since I imagine either somebody will answer or tell me a better thread or forum to put it. In college I did study control systems but the whole lot of the class was just grinding through it. The professor wasn't explaining anything and we all were hopelessly lost. It looks like he figured it out the year after us and subsequent students actually liked the stuff. also keep in mind that the transfer function from A to the temperature of B is not homogeneous, and therefore not strictly linear (since ambient temperature is above zero). What is linear is temperature rise above ambient vs input.
|
|
# ? Feb 25, 2011 05:15 |
|
Lets see if I'm thinking through this correctly: I have a matrix of 16 x 38 RGB LEDs, or a total of, effectively, 1824 LEDs. The TLC5947 IC can drive 24 channels, so I will require 76 of them. Just to be clear, we note that although they will be arranged in a matrix, we are not actually controlling them this way. Each channel accepts 12-bits of PWM data, thus to fully initialize a single IC, I need to shift in 288 bits. A single panel refresh would therefore involve shifting in 288 x 76 = 21,888 bits. Given that, how can I ascertain if I can expect reasonable refresh rates if I intend to drive it with an atmega328 arduino? Cyril Sneer fucked around with this message at 05:38 on Feb 25, 2011 |
# ? Feb 25, 2011 05:35 |
|
Cyril Sneer posted:Lets see if I'm thinking through this correctly: Using SPI with a 16MHz clock speed and also using SPI at the maximum theoretical clock speed that you're never actually going to get (because of processing each byte before you send it out, etc.): 21,888/8 = 2736 bytes Then you'd figure out how many clock cycles the ASM instruction to move a byte to the SPI register needs. No idea, probably more than 12, but assuming that, the frequency would be 487Hz. That's my theoretical max, which doesn't give you a lot of leeway for overhead, but it's doable if you're careful. I'd either use ASM to write the code or make sure you go over your compiled C code with a fine-toothed comb. Also, I could be totally wrong about everything here.
|
# ? Feb 25, 2011 06:28 |
Does the atmega328 support DMA? That would be the way to go in this situation. An MSP430 could do it
|
|
# ? Feb 25, 2011 07:31 |
|
I'm responding to the most recent post though I read everybody's so far.ANIME AKBAR posted:when you say that your system behaves differently at different temperatures, do you mean different ambient temperatures or different setpoint temperatures? It responds differently to different set point temperatures. Generally the temperature device A sets is close to what B gets at high temperature. But at much lower temperatures, device B will read something not as low as what A is setting. The whole system is in an environment consistently expected to be at room temperature. The thermal control is a cooling application; the location at device B is more inclined to heat up than to cool off. It would be fatal for the item being cooled if device A set too high a temperature, so it is clamped. There is also a specification range on device A keeping it from getting too cold. So there is indeed a clamping function that I had put in myself as protection on either case. And the integral term rammed right into it. What I'm trying right now is something like an integral compensator in a first stage to try to expedite things, and then it moves on to a model based on a curve I fit to a function that tells me given desired B temperature, what to set for device A.
|
# ? Feb 25, 2011 18:52 |
|
Delta-Wye posted:Does the atmega328 support DMA? That would be the way to go in this situation. An MSP430 could do it alas no, only the Xmegas have DMA.
|
# ? Feb 25, 2011 22:40 |
|
Zaxxon posted:I'll write it up on my wordpress site then post a link I guess. I'm off work today so I can do a once over then improve on it. ok writing tutorials is hard, and I'm not necessarily the best writer but here is the start, I'm gonna do it in 3 parts, first the programmer, then the software setup (I have to do some research to make sure my linux info is correct.) Then the actual boards and programming process. http://iatethepcbbecauseiwashungry.wordpress.com/2011/02/24/getting-started-with-avrs/ tell me if it is good or it sucks or what other kinds of info each part needs.
|
# ? Feb 26, 2011 00:46 |
|
Rocko Bonaparte posted:It responds differently to different set point temperatures. This sounds like your process has non-linear gain. Sort of like PH control it takes hardly any acid to move water from 7 to 6 but takes a shitload to move it from 2 to 1. Any time I have worked on processes like this we used special controllers that had internal compensation for it. If your process needs to be controlled over a range that puts it in zones with really different tuning settings you are going to need a different algorithm. This crazy looking PDF might help you out algorithm wise to deal with the issue. http://www.semtech.com/images/promo/Nonlinear-Gain-Scheduling-Method-in-Digital-PWM-Converter-Control.pdf
|
# ? Feb 27, 2011 03:21 |
|
I'm about to pick up a Hakko FX-888 soldering station unless someone convinces me to go with something else. Anyone know of some good tutorials on learning to solder for a newb?
|
# ? Feb 27, 2011 07:07 |
|
So for a class we're building an 8086 system (how novel!) and I want to have an hd44780 style lcd memory mapped I would like the lcd_e line mapped to address, say D0000. the hd44780 latches on the falling edge, how could I make sure to keep the data line the same data while deasserting the enable line? Could I do something like this: xor bx, bx mov ax, 0d000h mov ds, ax mov ax, 0e000h mov es, ax mov ds:[bx], <data> mov es:[bx], <data> to keep the data line the same while lcd_e falls? also would addressing an unmapped location e0000 cause a problem?
|
# ? Feb 28, 2011 03:52 |
|
Don't know what your hardware setup is, but if nothing is mapped to that address (that is, putting that address on the bus doesn't make any chip enables active) then you can address it all you like with no repercussions.
|
# ? Feb 28, 2011 04:10 |
|
Yep that was one of my questions. thanks! about the other one... it looks like WR_ is low for a portion of the time data is available and data is still available after WR_ goes high. I might just tie the enable line to that and not waste a second instruction on something I dont think would work since A/D is multiplexed seo fucked around with this message at 04:36 on Feb 28, 2011 |
# ? Feb 28, 2011 04:21 |
|
OT but is anyone looking for hardware interns this summer? I'm a senior computer engineering undergrad
seo fucked around with this message at 21:53 on Mar 1, 2011 |
# ? Mar 1, 2011 19:25 |
|
Does anyone know of a place I can get heat resistant electronics? I have a project in mind that would go inside a BBQ but obviously it would need to not melt at high temperatures. The only parts that would need to be inside the BBQ are the motor, wires, potentiometer, and ball bearings, but I might be able to move the pot outside the BBQ, and if I really need to I can move the wires and motor outside as well, but that would mean not being able to close the lid while cooking.
|
# ? Mar 1, 2011 19:34 |
Dooey posted:Does anyone know of a place I can get heat resistant electronics? I have a project in mind that would go inside a BBQ but obviously it would need to not melt at high temperatures. I don't think such a thing is possible - a BBQ should be hot enough to melt solder and burn off the enamel on motor windings, etc. What are you making? Perhaps there is a workaround!
|
|
# ? Mar 1, 2011 20:06 |
|
Delta-Wye posted:I don't think such a thing is possible - a BBQ should be hot enough to melt solder and burn off the enamel on motor windings, etc. What are you making? Perhaps there is a workaround! yeapp. it sounds like you are maybe making an auto rotating grill? all the commercial ones i've seen have the motor on the outside
|
# ? Mar 1, 2011 20:23 |
|
Yeah pretty much an automatic grill. Guess its time for a redesign!
|
# ? Mar 1, 2011 23:14 |
|
You can use driveshafts to transfer power from outside the grill
|
# ? Mar 2, 2011 00:19 |
I'm not sure what your overarching plan is, but there are some sensors that could probably be used safely. You might be able to find a thermocouple, for instance, that can withstand such conditions. Unless you're just using the potentiometer to directly control motor speed, then mount everything far away from the heat source and use mechanical means to transfer power.
|
|
# ? Mar 2, 2011 01:04 |
Just looking for some confirmation that I'm doing this right. I've got a sensor which changes resistance based on the force applied. I'm trying to incorporate that into a wheatstone bridge, and then running that through a differential amp. So basically this: plus Gives me something like: Here's the thing in the circuit simulator if you want to futz with it. As far as whether or not this whole setup is even what I should really be doing, I have no idea. It's for a scale, but I don't really care about poundage. I'm just interested in the relative load between two values (i.e. empty/full). e: updated after it was recommended I put voltage followers between the amp and the bridge so I could use more reasonable resistors on the amp side. Bad Munki fucked around with this message at 19:05 on Mar 4, 2011 |
|
# ? Mar 4, 2011 18:18 |
|
Quick question: My friend's dad is building a wind turbine (well actually he has it already built) and has a few questions on wiring it up to his battery bank. He has a #SEA440 Battery regulator and a blocking diode of some sort (not sure which one, I need to get a model number or something from him). The diode will go in series before the regulator. We plan to wire it up so it just disconnects the load once the voltage gets too high. If I am looking at the specs correctly, that disconnect will happen when the voltage is above 13.5 volts? Also, if the wind is really low, and if it is not generating 12v, will it still charge the battery? Thanks
|
# ? Mar 4, 2011 20:37 |
|
Lt Moose posted:Quick question: My friend's dad is building a wind turbine (well actually he has it already built) and has a few questions on wiring it up to his battery bank. This appears to be a diversion regulator. When the battery is full, it dumps any power to a shunt load. If the turbine voltage is less than battery voltage, the blocking diode prevents the battery from spinning the turbine, so no, it will not charge the battery if the turbine is less than battery voltage. Also, "disconnecting the load when the voltage gets too high" is confusing. Which voltage? battery? turbine?
|
# ? Mar 4, 2011 21:14 |
|
This thread needs more controversial RF discussion! Lets say you have a source feeding a 50-ohm coax line. The load consists of a 50-ohm resistor soldered between the centre conductor and shield. Under this scenario, all the current travelling down the centre conductor returns via the inner surface of the shield. These two currents, flowing in opposite directions, perfectly cancel and so the coax does not radiate. Now assume the load is mismatched. Reflections occur, causing some phase shift between the forward and reverse currents. This results in a standing wave along the line. For a given infinitesimal length, the current on the centre conductor and the reverse current on the inner shield are no longer equal and opposite. Field cancellation does not occur and the line now radiates. Or does it? An opposing view holds that the shielding effect in coaxial cable occurs as a result of the skin effect and has nothing to do with field cancellation. Assuming we're working at reasonably high frequencies, the thickness of the shielding used in coax is several times larger than the skin depth, thus ensuring nothing "gets through" the shield. Here's an interesting thought experiment. Imagine we have a 50-ohm source supplying a constant voltage. We have some length of coax terminated by some arbitrary load. We can reflect this load back to the source and calculate an equivalent lumped impedance and the resulting power delivered by the source. If we actually carry out this experiment, and we take the load to be mismatched, would we measure the power to match the calculation described, or would be larger, as a result of the radiation loss due to the standing wave formed by the mismatch? tl;dr: Does a coaxial cable carrying a standing wave radiate? Yes or no, and why?
|
# ? Mar 5, 2011 05:51 |
|
lemme just consult my handy dandy smith chart, compass and protractor
|
# ? Mar 5, 2011 14:51 |
|
No, because standing waves' time-averaged powerflows are zero according to my electromagnetics textbook.
|
# ? Mar 5, 2011 16:28 |
|
Bad Munki posted:Just looking for some confirmation that I'm doing this right. I've got a sensor which changes resistance based on the force applied. I'm trying to incorporate that into a wheatstone bridge, and then running that through a differential amp. So basically this: Those resistor values are a little funny. 100 & 200 ohms on the opamp are awfully low, and I don't know what that bridge is going to do with 100 ohm resistors and then a 1 megaohm sensor. Basically one half the bridge will be at v+/2, and the other will be either at V+ or v- all the time because the ratio is so incredibly high. Generally you'd want just 4 resistances all around the same value. You also only have it wired for a pretty low gain. If you need more gain, look into an instrumentation amplifier instead of just a buffered diff amp. And if your sensor is really 1M ohm (and then the other bridge resistors probably should be too) you want your buffer amps (or the first stage of the instrumentation amp) to be FET-input instead of bipolar-input opamps.
|
# ? Mar 5, 2011 19:40 |
The 1M I just put on there to act as a relatively extremely high resistance, so I could verify what the upper range of output to the adc would be. In reality, it's a variable resistor whose resistance decreases with increased pressure.
|
|
# ? Mar 5, 2011 19:50 |
|
|
# ? Jun 3, 2024 18:35 |
|
Corla Plankun posted:No, because standing waves' time-averaged powerflows are zero according to my electromagnetics textbook. So this implies that coaxial shielding functions as a result of the skin effect and not field cancellation. Why then do many sources claim that it is necessary to ensure that the centure conductor current must all be returned on the shield lest we end up having normal rather than differential current flow?
|
# ? Mar 5, 2011 21:17 |