source
stringlengths 620
29.3k
| target
stringlengths 12
1.24k
|
|---|---|
Wide voltage supply for PIC microcontroller I am looking to power a PIC with a supply voltage that ranges from 4.5 V to 18 V. This will be a battery powered device so I would like to conserve power, i.e. linear regulators like the 7805 is less desirable. Also the application will be producing quite a bit of heat in an enclosed space so no need to add to heat generation with the linear regulator dissipating excess voltage. After some hunting I suppose I am after a switch mode DC-DC converter, a step down one. I have been looking at an LM2575 based circuit, but wondering what V out would be if my supply V in drops below the minimum 7 V for regulation. The PIC I am working with have an operating range of 2 V to 5.5 V so I am OK with V out being equal to V in when V in < regulation threshold. So my question is, what happens to V out when V in < regulation threshold? Also are there any additional things/circuits I should be considering? <Q> When Vin goes below your minimum Vin you are going to have your output drop. <S> I have seen many times that people think it will be a small drop and it ends up dropping very quickly when the Vin goes to low. <S> If you want something that give you 5 out from 4.5 to 18V in, then you should just pick a simple Buck-Boost DC-DC converter. <S> They will be able to handle from 2V to higher than 18 without a problem. <S> By grace of being a buck boost, they can step your voltage either direction and it should make your life quite easy. <A> The LM2575 has a drop out voltage of less than 1.5 V. <A> Yes, if you can run at 2.5 V, and your minimum input is 4.5 V, then a buck regulator should be fine. <S> Look at the datasheet for your buck regulator. <S> The typical "saturation voltage" specification tells you what happens when the input voltage gets too low. <S> Typically it's around 1.0 V -- meaning that if the input voltage to a 5 V regulator drops to 5 V, its output voltage is going to drop to about 4 V. <S> If you're willing to spend some time tweaking things,Roman Black has some relatively simple buck regulators. <S> Would the 3-transistor Black regulator ; or some 2-transistor Black regulator work for you? <S> On the other hand, if you're going to drive power MOSFETs -- they often require 8 V to turn completely on. <S> You might as well use a boost or boost-buck converter to generate 8 V or so, and then regulate that down to 5V to power your microcontroller.
|
You could stick with the simple buck regulator and set its output voltage to 3 V, assuming you have the adjustable type.
|
Robot picking a person from other objects I need some ideas of sensors to use so my tank can drive towards humans and seek them out. Distinguishing them from the background. Assume the human is standing still / quitely Any ideas? looking to use an Arduino as the controller - though if there are better options please let me know. <Q> A smart sensor might help -- take a look at the CMUcam . <A> Could you use an array of passive infrared sensors ? <S> Ladyada's got a bunch of stuff on interfacing with them , including Arduinos. <S> I think the Arduino only has 6 analog inputs, but you could multiplex more sensors in and out using FETs if you need them. <A> What kind of platform are you using to run the robot. <S> If you are running a like an ARM processor (with linux) than you can use a camera and OpenCV, but if you are using an Arduino or somethings along those lines that wont work. <S> An arduino will be tough and definitely wont run OpenCV. <A> OpenCV as zklapow says will allow you to use Haar Training to train the camera/controller to recognise faces or other shapes (this is how face recognition is done on my camera I think) <S> but I'm not sure what resources there are available for Arduino. <S> There's what looks like a fairly detailed discussion here using OpenCV. <S> There's an interesting looking page here which is talking about haartraining and robots (recognising hands to be specific). <A> I don't believe the arduino has the horsepower to do this. <S> It's a very difficult task you propose. <A> <A> One strong predictor of Human-versus-Object is that the human body's temperature often lies in a specific range that is different from most objects' temperatures. <S> Exploiting this fact, you can try one of the following two ideas, which I think should have good accuracy and straightforward implementation: <S> Option 1: <S> Use an IR temperature sensor (small and inexpensive) like Texas Instruments TMP006 or alternatively Melexis MLX90614 Option 2: <S> Use a prepackaged solution like Panasonic Grid-eye , which is an infrared array sensor that provides an 8X8 pixel representation of temperatures sensed in its view. <S> The part is inexpensive (and available from distributors like Digikey) and, because the dataset isn't very intensive, you can even interface the sensor with a microcontroller board like an Arduino. <S> Using either of these sensors, and comparing the sensed data against a pre-defined window (for human body temperatures), you should be able to tell fairly accurately whether an entity is an object or a human. <A> Then you could download a facial tracking program, that would process the images from the Arduino. <S> Facial tracking is a well established method of real time video processing, it should be relatively easy to find one. <S> That's the only way I can think of that may get around the Arduino's lack of horsepower, you will need to be hooked up to a proper computer tho, if you want to process realtime video. <S> It would be more expense and effort compared to using NIR sensors, but the results may be more suited for your application.
|
An infrared camera would be perfect. You can hook up a camera that sends serial data to the Arduino (available from Sparkfun, I think they are normally used for cell phones, it looks similar to the CMUcam solution) then send data to your computer via usb, or you can use a wireless module if your feeling swanky.
|
Should I consider using RS-485 for my next project I am planning on an automation project that will be using several different sensors including but not limited to: Temperature, Barometric Pressure, Air flow, Humidity, etc. As I was talking with someone they mentioned that I should look into RS-485 as a means to connecting my sensors to my controller. Then ultimately to the PC. After a quick search I gathered some information about RS-485 but now I am wondering if it's over kill or if it's even used now a days? Couldn't I just use a microcontroller that has enough inputs and interface with the PC using USB? Thoughts? EDIT: Ok if distance to controller and environment (in my case an industrial application) then RS485 might be useful. Are there other bus alternatives that might be more useful? <Q> I've used RS485 to connect multiple data-loggers together over distances of up to 100m. <S> In this application it worked perfectly. <S> I haven't used RS485 to connect sensors directly to a controller <S> but if you have sensors with RS485 outputs + a controller that supports RS485 <S> and you have more than 10 sensors or the sensors need to be more than a short distance from the controller I would definitely use RS485 instead of analogue wiring. <S> I found that as you add more and more analogue sensors to a controller (in my case, a data-logger) small issues with power supply noise, wire impedance and environmental interference suddenly become big issues. <A> I think the big difference has to do with how far away your sensors are on your network. <S> If they're close, and likely not to be affected by electrical noise, then I don't think it matters too much. <S> USB, RS-232, SPI, I2C, parallel, Bluetooth ... <S> all would be good options. <S> If they're far away, and likely to be around electrical noise, a system that utilizes a differential communication scheme (like CAN, RS-485, Ethernet ) is probably a better route to go. <A> I would say the short answer is <S> sensors->micro-controller->USBBut, you don't give us a lot of detail as to the environment you will be working in, or how robust the entire system needs to be. <S> If you have a noisy environment, long distances between the sensors, or a requirement for high reliability <S> then you might want to look at professionally built equipment and something like RS-485. <S> If you want to track the micro-climate around your tomatoes then some sensors and an arduino might be all you need. <A> I have an energy meter in my house basement, and the computer that reads energy values is in my apartment (4th floor) ... <S> No problem with RS485 (or a CAN bus), but try this with USB :-) <A> RS485 is the equivalent of I2C but in larger scale, both have bus architecture with node adresses: <S> RS-485 is excellent out to 4000+ feet of sensor wire. <S> You can implement it for anything you would use I2C for. <S> It has a wide variety of EMF and optical isolation options. <S> RS-485 need a signal adapter to work <S> I2C is faster not adapted for long distance, don't need a line driver to work and therfore comsume less <S> i hope it's clearer now <A> What about dallas one wire? <S> I think they have a lot of sensors and that the network is fairly long range. <S> I have never used it but always thought it was interesting. <S> If you already have you sensors this does not make as much sense. <A> it's own brains (i.e. an on-board microcontroller) <S> and it's reporting to a PC. <S> You can get 232 to 485 adapters that will let <S> your PC talk RS-485. <S> If you can get the sensors into the same box as the microcontroller, then you could use 485 to talk back to the PC. <S> It's not high-speed, but it's very robust and well <S> understood in a lot of situations, and it pretty easily allows for additional devices. <S> If you just have the one device, then 232 will do you just fine.
|
RS-485 is very useful in situations where the devices (sensors in your case) need to be remote from the controller. If your sensors are near the PC, then USB could be OK, but it's not always the case. In general it's used where the device has
|
How do I measure the current flow to a component? I'm building a hexapod robot using simple servos and I was wondering how feasible it was to measure the current flow to each servo (5-6V DC to a maximum of 0.25-1A (I haven't found the spec for the servo's stall current yet)) using, say, an ATMega168. What kind of circuit would I need to build in series with each of the servo's power lines to give me a useful readout? I assume I'd get a voltage drop across this circuit, what's it likely to be? etc. <Q> Honestly, People often use a simple sense resistor. <S> This allows you to monitor motor current. <S> There are many many motor control algorithms if you want to control the motor yourself, otherwise, if you are measuring for just knowing current draw, you just need to make sure you sample often enough to get an accurate measurement, or use a circuit with a lowpass filter effect(make <S> sure you buffer the voltage). <A> Sense resistor is good. <S> Usually they're placed on the high side of the circuit, so that the supply voltage return can be shared between source and load, and usually you size the sense resistor so it's small enough not to affect the circuit, but large compared to voltage errors (typical op-amp input offsets are in the neighborhood of 0.5-5mV). <S> This makes it a little harder to amplify and translate to a "ground"-referenced signal. <S> Take a look at these current sense monitor ICs from Zetex (now part of Diodes Inc) -- I had to design a current sense circuit a few months ago and these looked like the best fit (project got changed <S> so I never had a chance to use it). <S> For layout, make sure you use a pseudo-Kelvin connection -- connect the current sense signal lines directly to the pads of the resistors (preferably the inner edges of the pads) and don't use those sense traces for anything else except the amplification circuit. <S> (A true Kelvin connection would be the same thing except it would require a 4-terminal resistor with 2 load terminals and 2 sense terminals -- this isn't usually necessary unless you get into really accurate or low-resistance circuits.) <A> Sounds like a cool project. <S> Some motor drivers already measure current in order to provide "overload protection". <S> If you can't tap that signal,there are several ways to measure current .Start with the simplest and cheapest method, and if that won't work, try the next one.
|
You place an in series very low resistance resistor(<1 ohm often) and you measure voltage drop.
|
Reliability of DS18x20 temperature sensors I'm using Maxim's DS18x20 (I've actually got more than one variant) 1-Wire temperature sensors to log the temperatures in various rooms in my house once a minute. About one reading in a thousand, I get something completely bogus back. In the middle of a sequence that's gradually rising from 65F to 70F I get something like -32.1F or 15.64F. Has anyone else had that kind of problem, or is this something wrong with my setup? If this is just a known issue with these things, I'll have to do something like taking three readings and throwing out the outlier. Just a few statements about my setup: I'm running at 3.3V I'm checking the checksum of the reading as it comes back to the arduino, and it matches (or I think it does - there could always be a bug in that code). These are running off of normal power, not parasite power. I have the 4.7K pullup resistor in place. I'm only using a single sensor on each sensing platform. The sensor is on a PCB attached to the arduino that's reading it. I see the same problem reading from a variety of different arduinos (diecimilla, pro-mini, homemade custom) <Q> I have see this with occasionally with the DS18B20. <S> For my application, it was simple enough to filter out the spurious results with code. <A> If you can't find the source of the erroneous readings it should be easy to filter them out and extrapolate from previous readings , or interpolate between readings if hindsight is important. <S> Since you're sampling once per minute you may even just copy the last reading; room temperature will hardly change in one minute. <A> Take a close look at the data sheet here http://www.rentron.com/Files/ds18b20.pdf <S> On page 5, it shows that the exact binary sequence for 85C is: +85°C 0000 0101 0101 0000 <S> Likewise, for 25C, it is: +25.0625°C 0000 0001 1001 0001 <S> In some cases, if the controller misses a bit, you'll get a value that is the actual temperature, expressed in binary and bit-shifted. <S> Often this is 1/2x <S> the target value in C. <S> Sometimes you can get electrical interference on the line, and the controller reads an entire nibble of 1s, <S> In that case, you'll get some number like 15.64, which expressed in binary is actually very close to numbers between 65 and 70F, except with a bunch of 1s at the beginning. <A> For what it's worth, I did a bit of work with the DS18B20 a few months back. <S> I shot a short video and did a write-up on my blog, which has links to examples and sample code. <S> Hope <S> this may help a bit! <S> http://dailyduino.com/archives/552 <A> I have 13 of them running in my house since about four years now. <S> The database is hard to handle anymore (I kept track of all samples). <S> But, I didn't see this kinda behavior. <S> Instead, every now and than one sensor freezes and blocks all the others, the only way out of this (that I found) was to shut down supply voltage for a few seconds. <S> So I added a tiny relay to my board and whenever the micro senses this behavior it resets the whole chain of sensors. <S> That happens a few times a week.
|
This can be due to the controller mis-reading one or more bits of the temperature response under certain high-load conditions, or due to electrical interference corrupting one or more bits.
|
Arduino reset with FTDI breakout question How do you get the SparkFun FTDI Basic Breakout board to auto reset? I still have to hit the reset button for any Arduino clones when I use the breakout board. I have tried connecting to the DTR pin and other methods of trial and error but I am just not getting it. <Q> What I did to get my breadboard arduino to reset was to go into the device manager (Windows 7) and highlighted the FTDI device (A virtual COM port) and then went to Properties, Port settings, Advanced. <S> I then checked off the box that said "Set Rts on close". <S> After I did this my arduino reset itself no problem. <S> Hope this helps. <A> Is this an issue with your clone Arduino boards? <S> You do not say which clones you have. <A> I've been using the FTDI 3.3V breakout from sparkfun, the 5V cable from FTDI and the 3.3v cable from sparkfun with an RBBB arduino clone. <S> they all reset the board without problem. <S> the auto-reset is a feature of the arduino bootloader as i understand. <S> perhaps your cloan has a different bootloader <S> Perhaps you could mention which arduino clone you are using and maybe someone has some specific experience with this issue on it, or we can checkout what the bootloader supports
|
I use the Sparkfun FTDI 5V basic board with my Arduino Mini Pro 328 boards and I have no problems with auto reset, I plug it in and upload using the Ardunio IDE (I use 017) - it works fine.
|
Detecting light with an LED How do I detect light with an LED? <Q> Essentially a reverse biased led will act as a capacititor, if it is then disconnected the charge will drain at a rate roughly proportional to the light hitting it. <S> We can use this with a microcontroller - utilising the multi state ability of the ports. <S> The resistor should be about 100 ohms, I have only used this with red leds - it may work with others. <S> Use the following sequence: <S> Set Port A output highset <S> Port B output low // <S> this makes sure the led is dischargedwait 1mSset Port A output lowset Port B output high // reverse bias and chargewait 1mSset Port B as input <S> // <S> Port B is high impedance inputtime how long for Port B to read low <S> The length of time will be dependant on the amount of light hitting the led. <S> There are several examples of this on the web - I will list them here as I find them again: LED senses and displays ambient-light intensity <S> Red LEDs function as light sensors <S> Multi-Touch Sensing through LED Matrix Displays <S> - very cool video LEDs <S> As Sensors Very Low-Cost Sensing and Communication <S> Using Bidirectional LEDs <A> Here is a good video describing how LEDs can be used as a light sensor http://www.youtube.com/watch?v=VZUvoLDlMS0 <S> Also Forest M.Mims III has wrote about simple projects using LEDs as touch sensors as well. <S> Also, I have read that SMD LEDs work better as light sensors than through hole LEDs... <A> Here is a circuit that uses a LED to detect light from an educational kit : LED 0 allows a very small , light-influenced current to pass through because its polarity is reversed. <S> Make sure it is green , yellow or transparent or it may not work (red). <S> The transistors amplify this current just enough to drive a normal polarized LED (LED 1).You can adjust the sensibility by adding more transistors , thus having a greater amplification , responding to a lower illumination level. <A> This site: http://www.users.waitrose.com/~robinjames/LED_as_light_sensor/LED_as_light_sensor.html shows how to measure light levels using an LED and an opamp, to give a voltage proportional to the light level. <S> It gives a wide range of readings and works from complete darkness to full sunlight. <S> It can be used to feed the ADC of a microcontroller such as an Arduino. <A> Photocells are a dead simple way to detect light. <S> It's resistance varies proportionally to the amount of light shining on it. <S> LadyAda has a very nice write-up on photocells including Arduino implementation: <S> http://www.ladyada.net/learn/sensors/cds.html .
|
It is possible to use a led as a light sensor as well as a light emitter.
|
Software to control an Arduino is there any software working on PC with a gui that can control the outputs and read the inputs of an arduino in realtime? <Q> As JohnC says, Firmata is probably what you want. <S> It has a set of commands <S> you send it over the Arduino's serial port to read and write the Arduino's inputs and outputs. <S> There's a Processing library that you can use so you can write Processing apps to directly control the Arduino, as well as many other libraries for other computer languages running on your desktop computer (like the VB .NET <S> one JohnC mentions). <S> Even if you don't have a library, you can send the commands from any language that knows how to talk to serial ports (like with Max/Pd as Andrew mentions) <S> I like the Processing library because Processing is open source and similar to Arduino. <S> A Processing sketch talking to a Firmata'd Arduino looks something like: import cc.arduino.*;Arduino myArduino = <S> new Arduino(this, <S> "/dev/tty.usbserial", 57600);myArduino.digitalWrite(ledPin, Arduino. <S> HIGH);delay(1000);myArduino.digitalWrite(ledPin, Arduino. <S> HIGH); <A> I've not tried this but there are several links on the web to control/read Arduino from PC. <S> They mostly seem to use Firmata on the Arduino. <S> Arduino <> Firmata <> Visual Basic .NET <S> Firmata main site <A> Hey, are you are familiar with Max/MSP (paid) and Pure Data (free)? <S> They are graphical programming environments. <S> I put together a tutorial to set it up if you're interested in testing it: http://www.soundplusdesign.com/?p=1305 Cheers. <A> I'd agree with the other answers, Processing is a good one because it's so similar to the Arduino environment. <S> I use Max Msp 5 myself, and I can certainly recommend it, you can download it from the cycling74 website -> <S> http://cycling74.com/downloads/ <S> You get a free 30 day trial of the full version plus the runtime environment, it works on both mac os and windows. <S> It's super easy to learn, and it allows you to program whilst your program is running! <S> - no more compiling! <S> You can use an object called serial to talk with the Arduino, and Max comes packed with handy pre made objects and GUI components. <S> Plus you can then export stand alone applications, or you can share them in text format. <S> Jim. <A> For those who have problems with Firmata's sysex and want to acess sysex comands easily: Try http://connect.mind-craft.net/arduino-firmata-vb-class - change "storedInputData" variable to public and use it, e.g.: <S> Private Sub Button5_Click(ByVal sender <S> As System. <S> Object, ByVal e <S> As System. <S> EventArgs) <S> Handles <S> Button5.Click arduino1.StartSysex <S> () arduino1.mycommand1(20, 1) arduino1.EndSysex() Thread. <S> Sleep(100) ' <S> Delay less than a second arduino1.processInput <S> () <S> TextBox1.Text = arduino1.storedInputData(1) <S> End <S> Sub use EchoString.ino example and read firmata protocol on wiki to add your own sysex command to Arduino.vb
|
Firmata is a special sketch you load onto your Arduino.
|
How does an LM7805 voltage regulator work? How do most voltage regulator ICs work? Are they the same as hooking up a variable resistor and a voltmeter and turning the knob until you get the desired voltage? <Q> Voltage regulators achieve "stiffness" via a feedback control loop, where "stiffness" means that a large change in load current causes a small change in voltage. <S> Both switching and linear regulators include a control loop (historically analog... some of the newer switchers use digital control loops) to adjust some parameter of the circuit so that the output voltage remains constant in the presence of load current changes and input voltage changes. <S> In a linear regulator the circuit parameter is the pass transistor drive circuit (which produces base current for an NPN/PNP power transistor, gate voltage for a MOSFET). <S> In a switching regulator the circuit parameter is the duty cycle of the switching element(s). <S> So there's really two areas you need to understand if you want to get into the details of how regulators work: <S> topology design (achieve required limits of current/voltage/etc) control loop tuning + stability <A> Voltage regulators have a transistor which in a control loop can conduct more or less, according to demand, so that's a bit like a variable resistor. <S> This schematic shows the basic principle upon which most linear regulators are built: The zener diode is a 6.2V version, so the node marked "feedback" needs about 6.8V to make Q1 conduct. <S> R1+R2 divide the output voltage by 2, so that makes the output 13.6V. <S> If the output voltage would rise, Q1 would start conducting and pull the base of Q2 down, so that Q2 supplies less current to the output and its voltage decreases again. <S> If the output voltage will go below the set voltage of 13.6V, Q1 switches off and via R3 the input voltage will give Q2 sufficient current so that the output voltage rises again. <S> So Q1 will make sure that the output remains at 13.6V. <S> This is a very basic setup, and stability and line regulation are not optimal. <S> Integrated voltage regulators will add extra components for increased (temperature) stability, current limiting and overheating protection. <A> This is an excellent way to understand the theory. <S> This method is very low noise but not power efficient in general. <S> The wikipedia page is not half bad to learn about them. <S> Switching regulators use a method that can be though of more as a charge pump, taking advantage of inductors changing voltage to push a continuous current. <A> Essentially, yes. <S> There is a pass transistor that changes in resistance so that the output voltage stays constant. <S> It's like a variable resistor, though, not a potentiometer: <S> (source: techitoutuk.com ) <S> The amount of resistance is controlled by a feedback amplifier. <S> It adjusts the resistance so that the voltage at the output is constant, regardless of changes in the source voltage or the load resistance. <A> Does this simplified circuit help? <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The specifics of the internals is basically the above and is published in the data-sheets. <S> If you can't recognize common circuits in the actual 7805 schematic, and figure out the details of the complex internal circuitry, then I am afraid it is far too complicated to detail here. <S> There are numerous links already given in the other answers and comments, that should get you well on your way though.
|
A linear regulator will use a transistor to step the voltage down as an inline resistor(the transistor can be modeled as a variable resistance) with feedback changing its resistance to get a very dependable output voltage.
|
RnD on an EEG, Help required, what op-amp? this is my first post, and I need some help/advice finding the right integrated circuits.I'll start by describing the project background a bit. I've received a fellowship to develop an open source electroencephalograph, the finished hardware will provide a platform for people to develop various creative and therapeutic uses for an EEG system i.e music controllers, game controllers or brain training programs.I want to use an Atmel MCU for the analogue to digital conversion, I'd like it to connect to a computer via USB and I'd also like the unit to be powered by the USB connection.I need help finding a suitable op-amp IC to amplify the signals from the electrodes prior to the MCU. The finished device will be 16 channels, so I'd like to find an IC with multiple op-amps. The electrical activity picked up by the electrodes will be in the region of 200mV and less, so I'll need a lot of gain.Is it possible to adjust the gain of an op-amp circuit with an MCU by using a digital resistor program? It would be nice if the hardware could be reprogrammed to work with various audio and sensor inputs. Any help or advice would be fantastic. Jim. <Q> Your average instrumentation amp can easily do 1MHz bandwidth; and your EEG should be no more than 2kSPS. <S> So a multiplexer / Sample and Hold ahead of the the instrumentation amp ought to save you there. <S> But consider that the amp should be only a few dollars. <S> Is it worth the multiplexing? <S> If you do Surface Mount, the size will be quite minimal. <S> The Arduino cannot digitise faster than about 10kSPS, so you would need a faster A/D to do 16 channels. <S> Something that can do 12 bits at 100kSPS would be nice. <S> They are also fairly cheap. <S> Note that for patient safety you need optical isolation on signals, and a good isolated supply (battery or similar). <S> Don't mess with safety in this area - if you need to get a high speed data stream out, build your own isolators or use fibreoptics to transmit the signal. <A> For such situations I think you generally want to use an instrumentation amplifier type of op-amp. <S> They're made for differential signals, so you can easily subtract out the noise, they have really high-gain, so you can amplify the weak signals, and they have really high impedances, so they can sense delicate signals. <S> From a quick perusal of the OpenEEG site as davr suggests, it looks like they use a TI <S> INA114AP <S> instrumentation amp as the main amp. <A> Any reason you aren't using OpenEEG , a low cost & open source EEG system? <S> They've been around for a while, and have lots of useful information on their website. <A> TI has the <S> ADS1298 for EEG and ECG front ends. <S> It is described as a 8-Channel, 24-bit analog-to-digital converter with integrated ECG front end. <A> AD620 op amp has a schematic in the datasheet for an ECG circuit. <S> Here you can also find class sheets that use the AD620 to build an ECG ( 1 , 2 , 3 , 4 ). <S> Similar to the schematic in the datasheet just a lot more verbose. <S> It is only single channel. <S> Cant quickly answer the rest of your question but hope that helps. <A> I built an EMG amp as my master's thesis. <S> It uses mostly standard parts (no expensive INAs) and has the safety features required for medical electronics. <S> The requirements are similar to EEG amps, I guess. <S> The low-pass filter and the gain stage can be programmed via 2-bit interfaces (00,01,10,11), which is cool if you want to hook it up to a microcontroller. <S> With an ADC, it might be better to do the isolation on the digital side, but you might be able to use some ideas from the amp anyway. <S> One nice feature is the active shield at the differential input wires which allows wire lengths of < 10 ft (< 3 m) between the electrodes and the preamp, i.e. no little preamp box outside of the the amp's main housing. <S> The thesis itself is not available online, but you can find the key chapter in a PhD thesis that is partly based on my work. <S> Feel free to check here <S> (cf. chapter 8) . <S> Sorry the documentation is in German, but the circuit diagrams are quite international, I guess. <S> Also, I am not aware of multi-channel InAmps. <S> Related: <S> Noise reduction strategies in electrophysiology <A> In the 70's we developed 8 and 16 chan eeg telemetry units for hospitals. <S> Need to keep input leads twisted, shielded and away from the transmitter antenna. <S> Foor safety, We used the very first lithium cells to supply isolated power. <S> Used L113 micro-power, flat-pack opamps for signal amplification. <S> The outputs were multiplexed to the transmitter input. <S> The fun part of this design was the method of de-multiplexing required to separating the 8/16 eeg signals. <S> Have fun - this is a neat project! <A> ModularEEG uses INA114 . <S> Yes, you can adjust the gain with a digital pot, but why would you want to? <S> alt text http://www.analog.com/static/imported-files/images/verified_circuits/CN0114_00_0415.gif <S> Also, a search: http://www.google.com/search?q=site%3Ati.com+PHYSIOLOGICAL+AMPLIFIERS%3A+EEG
|
Soundcard EEG uses AD8221 instrumentation amp .
|
Monitoring voltage without a known reference I'm working on a little sensor platform that runs off of batteries. I'd love to be able to trigger an alert when the voltage gets too low. The problem is that anything I use to measure that voltage will be powered by that same voltage source. For what it's worth, I'm running Arduino Pro-mini clones (3.3 V) off of 4xAA rechargeables (4.8 V to start with, but the system seems to work right down to 2 V or so, including the XBee transmitter). Does anyone have any clever ideas for how to work this? It seems like anything using the analog inputs of the ATmega chip will just be comparing the input voltage with itself. Maybe checking the difference between what comes from the regulator and what comes from the batteries themselves? <Q> Most (all?) <S> Check your datasheet...in the chip I'm using, it's 2.56V. <S> There's a register that picks between comparing against Vcc, AREF, or internal voltage reference. <S> You'd just set it to compare against internal voltage reference, along with using a voltage divider so the maximum voltage is never over 2.56V. <A> How about a supply supervisor like these Texas ones ? <S> Typically, they monitor the supply, and if it dips below a fixed threshold, an output pin changes state. <S> You can then connect this to your processor's non-maskable interrupt (or reset) pin. <A> If your Arduino doesn't support measuring the internal bandgap reference, just use an external reference. <S> http://www.national.com/mpf/LM/LM431.html http://www.national.com/mpf/LM/LM4040.html <S> http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1154,C1002,C1223,P1209 <S> Or just a Zener or two regular diodes in series <S> The voltage at the input pin will be held constant by the reference diode, but the value you read will vary depending on the supply, since the ADCs are referenced to the supply. <S> If your reference is 1.0 V, for instance, and your ADC reads 512 out of 1024, then you know the voltage rails are at 2 V.
|
AVR's with an ADC have an internal reference voltage which is regulated to a constant value, independent of the voltage supply.
|
Project to learn VHDL I am an EE student and can write [at least simple] programs in more languages than I have fingers. I have just started learning VHDL and I was wondering what a good project would be to really get to know the language and the relevant tools? I am having trouble coming up with one because it is a really different style of programming for me. I have made simple things like adders, but I am looking for a more long term (ie a month or so) project. In case it is relevent, I have Xilinx Webpack and a Digilent Spartan3 board. <Q> Since you seem interested in programming you could build a simple microprocessor. <A> My "hello world" FPGA project was a LED array controller with PWM and serial stream input. <S> The final result was nice ( http://lbw.axe-man.org/led1.wmv ) but I admit that I've done a part of it with the Altera Quartus Schematic Editor to see how VHDL parts were described. <A> You should check out opencores.org and find an interesting project there. <S> You can also download the Sigasi HDT , which will help you up to speed on VHDL grammar. <A> LED projects are also good but there is nothing like plugging up the FPGA to a stereo. <S> It isn't building from the ground up, as an LED project would, because the project is based on a open core processor that supports forth. <S> So at the beginning you are learning how to basically load the FPGA with the project, then you can play with the envelopes in FORTH. <S> But where you start to learn more about the FPGA internals is when you want to add functionality, which then requires digging into the VHDL. <A> A project that I enjoyed doing was implementing the Milton Bradley Simon Game on a FPGA. <S> At my university, our EDA class uses the same board you mention. <S> Some of the projects implemented included: Image processing: median filter, histogram stretching, edge detection <S> Cryptography: <S> AES, various hashing algorithms, etc. <S> Communication: <S> Ethernet, USB, I2C, etc. <S> Games: <S> Pong, space invaders, etc. <S> That may give you some ideas. <S> I'll second the opencores.org idea as well as implementing your own microprocessor. <S> Since you have a Xilinx FPGA, you might also look at doing something with microblaze or picoblaze. <S> Edit: formatting. <A> I wrote vhdl code for xilinx virtex core sometime ago. <S> it was an alarm clock implementation. <S> This is what i did: Read a lot through vhdl manual - i'd have to revise on it now <S> but i found it pretty straightforward and easy to use hdl :-) <S> Used xilinx suite (compiler, synthesizer) to get the bitstream Uploaded the bitstreams using jtag Rinsed, Repeated 1-3. <S> I'd point out that bitstream generation is very much all integrated in Xilinx's IDE. <S> You just have to have clear set of logic to implement in HDL; all the rest of the stuffs are done by the IDE. <A> Numerically Controlled Oscillator would be fun. <S> I just did a design with my Arduino compatible board (see http://tinyurl.com/ydmz2su ) <S> but this would be perfect for an FPGA. <S> Here are a couple of design references. <S> Snell, John 1988 <S> "Design of a Digital Oscillator That Will Generate up to 256 Low-Distortion Sine Waves in Real Time <S> " Foundations of Computer Music. <S> Cambridge, Mass.: <S> MIT Press Moore, F. Richard 1988 "Table Lookup Noise for Sinusoidal Digital Oscillators" Foundations of Computer Music. <S> Cambridge, Mass.: <S> MIT Press <A> What I'm doing is making a bit CPU. <S> It's a nice rounded out way to cover all the basics. <S> You'll cover all the basics of a large project in VHDL and be exposed to all of the core topics in VHDL design (clocks, inputs, outputs, logic, buses, and sequential design most prominently) as well as many core electronic and computer design and architecture concepts like registers, data operations, memory, and computer arithmetic. <S> You can start with just addition and subtraction and then add more functionality as you learn, working your way up to a fully functional (albeit simple...or as I prefer to call it "retro") computer. <S> At least, that's my plan. <S> Plus, having your own custom-designed computer on a chip is just plain cool :) <S> Like a 16 bit <S> Raspberry Pi :P <S> Other common FPGA projects: -Music <S> synthesizer -DSP effect generator -MIDI <S> controller/interrupter -Bitcoin miner <S> -Video game console emulators -Custom <S> Arduino shields -Parallel processors <S> (very useful for certain mathematical problems that conventional computers aren't great at) <S> -Robotics/control systems -Data acquisition <S> (fair few oscilloscope designs out there for FPGAs if you know how to work with op amps) <S> VHDL on its own isn't horribly complicated. <S> The most important thing to remember is that you're designing a physical electronic digital circuit, not writing a program for a microcontroller. <S> Your simulation is not a program that is going to run line by line, basically, so don't let the superficial similarity to C fool you, VHDL is a very different paradigm.
|
I enjoyed working with Hans at hardhack this year on the Rekonstrukt project to build a basic synthisizer in an FPGA.
|
Source for flexible, stranded wire Can someone suggest a source and part number for insulated, stranded small-gauge wire (around 22AWG) that is flexible and doesn't hold its shape? Something along the lines of the wire found on multimeter probes. I want something to connect to my bench power supply that will lay flat on the workbench; standard stranded hookup wire is too stiff and retains the shape of the spool. When searching Mouser , there are multiple choices for stranding, jacket material, and wire type, but I don't know how to correlate those to my needs. Thanks!Brian <Q> For how little of it <S> I use <S> , I usually just run to Radio Shack and pick up whatever stranded wire they have in the electronic component section. <S> If you're in the U.S., that should be sufficient. <S> By the time you pay shipping, you're not saving any money getting it from Mouser, and if you're not using it in large quantities there's no bulk pricing advantage. <S> The other thing you can do is look for other types of wire. <S> You can usually find pretty thin, stranded speaker wire at most general-goods retailers (Wal-Mart, for example) or electronics specialty retailers. <S> As long as it's just for power, it should be quite sufficient. <S> Again, it probably won't be any more expensive and will save you time to go pick this up at the store rather than order it from Mouser. <S> If you just want a few feet, I'd be tempted to hit up my local hardware store. <S> They usually have stranded wire by the foot. <S> You might have to settle for something of a slightly larger size, but my local Home Depot and Lowe's (again, U.S. stores) have 22-ga stranded wire available by the foot. <S> Direct from Mouser, well, there's a whole ton of options. <S> The following link will show you all 22-ga hook-up wire options on 100' spools that Mouser sells. <S> There are 205 results returned, they should in large part be sufficient for your needs, and start at $20. <S> You'll excuse me if I don't go through each one individually: <S> http://www.mouser.com/Wire-Cable/Wire-Single-Conductor/_/N-5ggs?P=1z0jnerZ1z0juksZ1z0wxmfZ1yzvwzvZ1z0xg0i <S> If there are smaller spools available, I missed them. <S> Also, you could easily use other wire gauges as well (20, for example). <S> FWIW, I have taken solid-core wire and wound it "backwards" around a spool to remove the curves, and other objects can be used to give it other shapes (as well as simply pinching). <S> I find that 22ga wire can be bent to pretty much any shape I want this way, if that helps. <A> So that you understand why test lead wire meets your needs where general purpose wires don't: Wire flexibility is determined by two things: The wire <S> The insulation <S> The insulation aspect is pretty easy to understand - the stiffer the insulation, the stiffer the wire. <S> Test lead wire uses a tough, but very pliable rubber for insulation, so not only is it flexible, it's also heavy <S> so it drapes on the workbench rather than standing up stiffly where it's stressed. <S> The wire is a little bit more interesting. <S> Notice that the test lead wire has the property: StrandingGauge <S> Strands <S> /Gauge18 <S> 65/36 <S> If you look at a comparable standard stranded hookup wire you'll find this parameter as: StrandingGauge Strands/Gauge18 <S> 16/30 <S> This means that the test lead wire is composed of 65 individual 36 awg wires, while the appliance wire (which is still pretty flexible, just not limp noodle flexible) only has 16 wires of 30 awg each. <S> With AWG gauges when you drop the gauge by 3 (ie, from 30 to 33 gauge) the area of a slice of the wire (thin disc) <S> drops by a factor of 2 (which, among other things, means the current carrying capacity drops by 2). <S> This area affects the stiffness similarly, so from 30 gauge to 36 gauge, the wire's flexibility increases by almost 4 times, while the current carrying capacity decreases by 4 times. <S> Of course, that also means you need over 4 times the number of wires (more than 4x since it's not solid copper) to attain the same 'awg' gauge. <S> But the flexibility increase is worth the extra cost for many applications. <S> So when you're looking for wire, keep in mind that this parameter (strands/awg per strand) is important. <A> I think this is what you want, http://www.bulkwire.com/product.asp?ProdID=21718&CtgID=6578 <S> I was looking for teflon wire for a project, but noticed they seemed to have a decent selection of other types of wire. <S> No idea <S> if they are the best price, but seem reasonable (I welcome feedback on this). <S> They only seem to have 18 gauge wire <S> but it is the type of wire you are asking about. <S> Hope this helps! <A> I use this wire: http://www.rapidonline.com/Cables-Connectors/Equipment-Wire/Test-Cable/Extra-flexible-cable/62327/kw/flexible+cable
|
I've used speaker wire in a pinch for things like power.
|
Best licenses for Open Hardware Can anyone give me a rundown of the various licenses that are well-suited to open hardware? I've designed a few circuit boards and would like to make them available for others to use, so I need to choose a license for them. Things I'm concerned about: Attribution. Are others required to credit me? If so, how? I know this turned out to be a big issue with some BSD licenses for software. Commercial use. Can folks copies of my work, or not? I don't really care if they do, but I'd like some credit if so :) Can others take my work and make "closed" derivatives of it? Similar to #2, but for when people start changing things. How "strong" is this license? 2 lines made up by a random hacker can constitute a license, but I'd prefer someone with legal training to have looked at it. <Q> Have you looked at the Creative Commons license pages http://creativecommons.org ? <S> The first three items in your list are condition options on the license page. <S> It almost sounds like the -- "by attribution" "share alike" license meets your requirements. <S> You can also add other terms and conditions to the license. <S> Unless there are patents involved in your work there may not be a lot of protectionanyways. <S> Although someone may not be able to create derivative works using yourschematics or layout files they could redraw the schematics and do their own layoutof the board. <S> Of course if you have a 12 layer board with 4/4 design rules and buriedvias not many people will have the resources to copy it anyways ;) <A> I use the creative commons license and the GNU LGPL version 3, which is normally used for software but has now been extended to hardware also. <S> http://www.gnu.org/licenses/lgpl.html <S> Even though people can copy your work, the license will protect you if someone rips off your idea without accrediting you even if they take your idea and change it (proving this could be difficult). <S> The license also protects against people copying your work for any commercial exploits. <S> As with all licenses, trademarks and copyright they are only a strong as the legal team you can afford to back them up with. <S> Even a patent is pretty pathetic when faced with the legal team of a large corporation. <S> A company I used to work for in the UK had £50,000 worth of patents on a new loud speaker system, just to have some big company bring out an almost identical, but slightly different system, 6 months after. <S> Patents and Licenses are all good, if your a massive company, for the average joe it's a waste of cash. <S> I make and sell all my work with both the CC and LGPL licenses - http://www.sonodrome.co.uk As far as I know they are the most comprehensive free licenses available online. <A> One thing to remember is that you, as copyright holder, can multi-license things. <S> You can release it to the general public under a CC non-commercial license, for instance, and then turn around and sell it to a corporation under whatever terms you want. <S> So if you choose to license your work under a Creative Commons license that includes the “noncommercial use” option, you impose the ”noncommercial” condition on the users (licensees). <S> However, you, the creator of the work and/or licensor, may at any time decide to use it commercially. <S> People who want to copy or adapt your work, "primarily for monetary compensation or financial gain" must get your separate permission first. <S> - wiki <S> Another thing to remember is that you're only copyrighting the schematics and PCB layout. <S> Anyone can "paraphrase" your work by re-drawing it, and it won't be a copyright violation. <S> If you patent it, on the other hand, they can't duplicate the same functionality regardless of PCB layout. <S> (The idea that source code and PCB layouts can be covered by copyright law has always seemed flawed to me. <S> They're utilitarian designs, not creative works.) <A>
|
TAPR Open Hardware License is specifically aimed at hardware.
|
Connecting a Lilypad to a WiFi network? I would like to connect my Lilypad Arduino to a WiFi 802.11 network that provides internet. What is the best way of achieving this? Can I use a XBee module and somehow interface with my home router? Is there a WiFi option available? Thanks so much all! <Q> You can buy WiFi modules with a serial interface , but they're a little pricy. <S> Basically you control them via UART, and you send them AT commands similar to how you controlled dial-up modems in the olden days. <A> Expanding a bit more. <S> Davr suggested what I was going to suggest also. <S> To Expand. <S> ZigBee is a separate protocol completely from <S> Wi-Fi. <S> ZigBee is similar to BT in radiated power, which relates a large amount to range, but is different in that it is designed to allow multiple nodes to create a network, each node effectively expanding the network out by it's range. <S> I hope this clears up that they are similar but not related. <A> Just wanted to share my current solution with you all: After chatting with Marcus and Madeleine at LittleBirdElectronics, we have come up with the following possible solution: 1) <S> Xbee on The lilypad, 2) <S> USB Arduino, Ethernet Sheild and Xbee combo to transfer messages to the WWW. <S> This is just one of many possible solutions, but for me this seems to provide the benefits of the low power and size requirements on the lilypad end by using the xbee instead of using 802.11 directly on the lilypad. <S> Besides, I already had a spare Arduino and Ethernet shield going unused, and wanted an excuse to play with xbee anyway! <S> ;-) <S> Thanks all for your input! <S> It was very useful in devising a solution. <A> Can I use a XBee module and somehow interface with my home router? <S> Yes <S> but You need to connect XBee module to Your router. <S> You can try to find serial port on Your router board or by USB to serial adapter if Your router has USB port. <S> Also your router should work under Linux (probably openWRT).
|
Roving Networks also makes a good set of BT modules.
|
Choosing a new soldering iron I'm looking for a new soldering iron. What is the best all rounder soldering iron (soldering station) < $200 USD? <Q> Are you looking for best bang for the buck or solid reliability? <S> Best bang for the buck: Chinese 2-in-1 or 3-in-1 <S> that has soldering iron, hot air station and (with 3-in-1) smoke absorber. <S> I went for the Kada 952D on eBay however after reading some more about the reliability, the lower risk of buying from a reputable dealer closer to home is attractive. <S> The Aoyue apparently is made in the same factory and seems to be slightly more common so it might be worth going for an Aoyue over the Kada. <S> Supposedly, the soldering irons on these offerings are compatible with the Hakko tips. <S> Opinions differ on the included tips. <S> I've ordered up a selection of genuine Hakko tips to compare. <S> Kada 852D+ or 952D <S> :See eBay. <S> Aoyue 968: <S> http://hackaday.com/2009/02/20/tools-aoyue-968-3-in-1-soldering-and-rework-station/ <S> www.sparkfun.com/commerce/product_info.php?products_id=76 store.sra-solder.com/product.php/6267/0 <S> Solid reliability: <S> Weller WES51 <S> Hakko 936 <S> You could combine one of the above with a hot air station (say Aoyue 850++) and still be under $200 (at least if you're in the US and talking USD $200). <S> I have no experience with any of these products but did recently face the same decision. <S> I'm waiting on the Kada 952D and crossing my fingers that it isn't going to be faulty. <S> I can only post one link in my first post. <A> I think Circuit Specialists has some good deals on soldering stations. <S> http://www.circuitspecialists.com/level.itml/icOid/6388 <S> I've got the CSI-STATION1A and CSI-STATION2A models. <S> (Identical except for analog / digital display. <S> I prefer analog.) <S> They are well made, and work as well as the more expensive Weller and Pace units I've used before. <S> All the Chinese soldering stations seem to use the same kind of tip, and I've been able to buy 10-packs of replacement tips on eBay. <S> Tip life seems to be about one year of daily use. <S> I'm sure they would last longer if I could remember to turn the iron off when I'm not using it. <A> I wouldn't bother with hot air stuff. <S> Just get a Weller or Hakko, those are both good brands. <S> I would save up to get a de-soldering gun. <S> They make life so much easier for so many applicatons. <A> I bought one of these ZD Electronic Tools ZD-929C and have been fairly happy with it. <S> I accidentally wound the cord too tight around the handle once and it pulled loose, but I see that as my own fault. <S> The tips are good quality and the iron heats up quickly and seems to hold a fiarly constant temp. <S> A pretty good deal for $50. <A> I just got one that has a ceramic tip, it seems to heat up really fast <S> and it's lasted much longer. <A> It is expensive new, but perfectly good older models can often be picked up on Ebay for about the same price as a new Weller system. <S> I paid £125 (GBP) for a second-hand STSS power unit with a new MX-500 handpiece and several new cartridges a few years ago from a UK supplier. <S> I subsequently bought a second STSS unit on Ebay for £70. <S> The cartridges are expensive, but they last a very long time, and there is one made for virtually every soldering job. <S> Leon <A> (Google says $75 new) <S> SparkFun sells a copy of the Hakko 936 for $40, which is what I would recommend. <S> At home, I have a Weller WES50 , which is ok, but not super great. <S> (Google says $125.00 new) <A> I've got a Hakko FX888. <S> Great iron to use everyday. <S> I've got a cheapo Chinese eBay hot air station to go with it, and it does the job fine - soldered a fair few QFN and LGA packages with it. <S> Don't be afraid to go for the cheap tools from brands such as Aoyue if you're on a budget! <S> They're not that bad!
|
At work we have Hakko 936 , which works quite well. Metcal arguably makes the best soldering equipment.
|
Wireless communication over long distances Would like to communicate between an Arduino and a PC but over a distance of 2500+ feet outside in the open, wirelessly. What would be the best way of doing this? The communcation devices I have found (xbee,...) dont go the distance. <Q> What sort of data rate do you need to maintain? <S> Long range communication is quite possible in open areas with very low power - a project I am currently working on incorporates data transmission over 500 KM using only 25 mW (miliwatts) of tx power - this of course relies on a line of sight, and data transmission is at only 50 baud. <S> Even without line of sight, omnidirectional communications outdoors are quite easily achievable over the range you're looking for. <S> As others have mentioned, matching your antennas with your intend usage patterns is important - can you give us more detail as to requirements/use patterns? <A> One factor your options depend on is how the data transfer rate you need over that distance. <S> More of the long range, low power applications reduce in throughput as the distance increases. <S> For example, the XBee Pro 50mW Series 2.5 operates at 2.4GHz with a range of 1 mile and has a data transfer rate of 250kbps. <S> The longer range <S> XBee <S> Pro 900 XSC operates at 900MHz and has a range of over 15 miles, but a data transfer rate of only 9.6kbps. <S> You could also look into directional antennas and signal amplifiers. <A> Wifi maybe if you used range extenders for your network, or if you have the funds you can use the cell network with a module like <S> these from sparkfun. <A> There are XBees that communicate about 1 mile (~4800 feet?). <S> http://www.ladyada.net/make/xbee/modules.html Maybe you can even improve the range with a better antenna. <A> As was mentioned the XBee with the 50mW antenna should do this. <S> You want to make sureyou order the high gain antenna. <S> There is a series of XBees that come with a coax connecteron the top. <S> IIRC the highest gain antenna is the whip antenna with the coax cable. <S> The document that discusses the antenna gains is application note XST-AN019a from MaxStream. <A> We have successfully pushed this communication more than a mile on our miniature UAVs without ever coming close to loosing communication. <S> It is a serial modem <S> our buadrate at this time was 9600. <S> [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/point-multipoint-rfmodules/xtend-module.jsp#overview][1] <S> good luck ! <A> Use an Ethernet shield on your arduino and the ethernet port on the computer (or your network). <S> This distance is completely achievable with this type of setup, and supports high bandwidth. <S> I have used enGenius and Deliberant brands with no issues over such distances. <S> For a cheaper solution, you may be able to achieve this with a couple of standard wifi routers like the linksys WRT54GL running DD-WRT or other firmware which allows customization of the ACK timeout, and by using some small directional antennas such as this , or at l-com.com check out their selection of 2.4GHz antennas with TNC connectors.
|
You could use standard Wifi 2.4Ghz or 5GHz radio units with panel, yagi, or parabolic directional antennas.
|
Very Slow Electric Motor A customer has asked: I want to slow down a small hobby sized DC motor to a user variable range that runs from slow to zero RPM. I would simply use a wall wart for a power supply and a potentiometer to set the speed but the load on the motor might change slightly. Although the drag on the motor will be very low, if that drag does change, I would like the speed of the motor to stay fairly steady in spite of this. A couple of people told me to use a PWM controller for this purpose because a PWM has a range of 0 to 100%. Of course this in not in RPM. One other person said that the motor might not slow down properly because the hertz rating on the PWM could be to high to allow this or because the pulses might not have an adequate amount of strength to excite motor enough to move it at all when the motor speed is set near zero. I thought about using a steper motor so I looked a an Adafruit Motor/Stepper/Servo Shield for Arduino kit - v1.0 but I know almost nothing about this stuff so I don't know if this would be just the right thing either. I want to turn a knob to vary the speed of a motor form a few parts of an RPM up to a "slow" speed ...say 60 RPM? ...maybe? Oh ...comparatively inexpensive and simple to set up would be great as well ! Any thoughts? <Q> DC motors don't work well at low RPMs. <S> They stall and have horrible torque. <S> (i.e. they can't turn very hard) <S> So people have created gear motors: motors with integrated gearing. <S> The result looks like a slightly bulkier motor, but one that has low RPMs and high torque. <S> If you were to take apart a running a gear motor, you'd see the motor part actually runs at several thousand RPMs, but it's geared down to something like 60 RPM max. <S> A common specialized one is the standard hobby servo, which has some additional electronic bits but is fundamentally a gear motor. <S> Check out any place that sells motors for robotics or surplus electronics <S> and you'll see several different gear motors to choose from. <S> DC gear motors are controlled just like normal DC motors, so an Arduino motor shield works just fine with them. <A> The torque of a typical motor will vary as it rotates, based upon the motor's position within each commutator "step". <S> This varying torque makes it very difficult to turn a motor smoothly at very slow speeds. <S> A common remedy is to hit the motor with short bursts of current, where each burst is long enough to move the motor by at least one commutator step. <S> The longer the bursts, the more predictable the behavior of the motor will be, but the more 'jerky' the output. <S> Note that there are two ways of doing this: <S> (1) Let the motor freewheel after each burst of current; (2) <S> dynamic-brake the motor after each burst. <S> Using approach #1 will require typically much less power to achieve any given speed, but approach #2 offers much finer control of speed. <S> Note that when using approach #2, the motor will be drawing nearly its full stall current (and dissipating its full stall power) for much of the time that it is on; if a motor would have a 1 amp stall current and a 100mA running current, <S> running the motor at a 1% duty cycle would be safe, but running it at something like 50% could easily cause it to overheat (it could generate nearly 50 times as much heat as it would running normally). <S> If your goal is to make the motor run at a nicely-controllable rate that's about 1% of normal speed, and if power consumption isn't a concern, approach #2 may be good. <S> If mechanical loading is consistent, approach #1 may be good. <S> Otherwise you may need some motor-speed feedback. <A> Generally speaking, a potentiometer will not be a good choice for controlling the speed of a DC motor, unless it's a very small one (think a few 100 mA draw) as the pot must be rated for the current drawn by the motor. <S> Additionally, as you restrict current, you're also sapping power from the motor. <S> So, at slow speeds using a current-limiting mechanism, you'll find it can only elicit a small fraction of the torque it can at high speeds. <S> DC Gear motors, as pointed out, are more appropriate for reducing speed. <S> Alternatively, you can fashion your own gear chain, but it's not likely to be cost-effective. <S> Dayton makes a well-priced range of 12V DC gear motors going as low as 0.6RPM <S> (IIRC). <S> Then, if you wish to use the rated speed as the max speed, then a PWM speed controller can be quite handy. <S> While there's nothing wrong with the adafruit motor shield for DC motor control, I do prefer an external speed controller, like the L298 Compact Driver from Solarbotics for larger DC gear motors. <S> Your friend is right, that each motor will have different characteristics as to the lowest PWM duty cycle it will reliably respond to. <S> For most of my motors, it seems to limit around 25-35% duty cycle. <S> Yes, another excellent way to control output speed is by using a stepper. <S> It lets you take discrete steps whensoever you choose. <S> While a servo also lets you take discrete steps, less expensive ones tend to be limited to 1degree minimum movements, and are designed to move as quickly as possible from the current position to the defined position. <S> A standard 200-step stepper motor, with an 8x microstepping driver, will give you effectively about 4 times the resolution, and therefor the ability to make smoother, smaller increments. <A> Stepper motor would be perfect for what it sounds like you want to do. <S> The typical drawback of a stepper is their slow speeds. <S> Considering however that you said you want to go from slow to slower it would work <A> <A> Has anyone tried to control speed of low voltage DC motors using a pulse width modulator (PWM) circuit? <S> Instead of controlling speed by reducing voltage (which kills the motor's torque), the PWM simply controls the duty cycle of the DC voltage used. <S> In other words, the full DC voltage is applied to the motor, but it is switched on and off many times a second. <S> The key point is that everytime the voltage is applied to the motor, it affords full torque. <S> As a result, there is no vibration or noise which is typical ofmotors trying to overcome inertia. <S> Small PWM circuits are available for around $20.00 that will handle up to 1.0 amps at 12 VDC. <S> I use it to control HO gage model railroad engines. <S> It allow them to creep without making a sound.
|
There are "digital BLDC motors" like the ones made by ThinGap that make a motor which is both lightweight, small, and has excellent response at extremely low torque (slow, high power) as well as high speeds (RPM) without the need for any gear.
|
Visualizing sensor data with OSX? What software do you suggest for visualizing sensor data on OSX. For example bunch of sensors connected to Arduino and sent to MacBook via serial. Realtime graphing preferred but would be interested also in log-and-graph-later solutions. <Q> One that comes to mind is Processing . <S> The development environment is similar to the Arduino's and it is cross platform (Java). <S> I would like to see a native OSX app but haven't found it yet :) <A> I use either RRD TOOL which is good for monitoring of continuous streams of data. <S> When I want to produce one off graphs I usually go with matplotlib . <A> You can use Grapher for simple graphs. <S> It comes with OSX. <S> Although it's not really powerful, it's ok to take a quick look at some samples. <S> @zklapow <S> do you have a link? <A> hon is both open source and cross-platform. <A> there's a Wikipedia page here with a bit more information about it. <S> It's fully supported on Mac OSX and there's even a subforum here dedicated to linking it to things like Arduinos. <A> Both Max and its younger open source sibling Pd have libraries for advanced graphics programming (Jitter and GEM respectively). <S> Jitter is its own graphics system based on 'jitter matrices', but includes a suite of OpenGL based tools. <S> GEM is based on OpenGL. <S> An alternative (again OpenGL-based) dataflow language that comes with OSX is Quartz Composer . <S> Along with Processing , vvvv , and Flash <S> these are the standard realtime video programming environments for artists. <S> All great choices for rapidly developing sensor data visualization applications. <A> You can have a look at my Processing based sketch, I used for visualizing AD7746 data . <S> It is very simple - but perhaps just the thing you need. <S> It takes values from the serial püorts, decodes strings and generates data sets. <S> Just contact me if you have questions. <A> I will suggest using some RIA framework ( http://en.wikipedia.org/wiki/Rich_Internet_application ). <S> Strictly speaking I recommend Data Visualization framework on top of RIA framework ( http://www.insideria.com/2009/12/28-rich-data-visualization-too.html ). <S> I think the best approach will be Flash. <S> I suggest Flex or Air (if You need more desktop integration). <S> To connect with flash You need ser2net or something like this. <S> Another interesting project is NETLab Toolkit ( http://newecologyofthings.wik.is/NETLab_Toolkit ) <A> I would use a database (like PostgreSQL) and a web interface. <S> Run Apache and serveup graphs and tables. <S> Any device with a browser could view the graphs, tables orraw data. <S> You could also provide a query interface to the data.
|
I use Max for all my sensor processing and visualizing. Fore example You can use as3glu ( http://code.google.com/p/as3glue/ ) that hes ser2net build in. You can use pyserial to connect to an Arduino and there are libraries available to graph the data. You could take a look at Pure Data a Max like language (it's not just for music generation)
|
What are the freeware SPICE simulators available? Does anyone know of a freeware SPICE / circuit simulator? SPICE (Simulation Program with Integrated Circuit Emphasis) is a general-purpose, open source analog electronic circuit simulator. It is a powerful program that is used in integrated circuit and board-level design to check the integrity of circuit designs and to predict circuit behavior. Wikipedia <Q> gnuCAP is also available for gEDA. <S> LTSpice is free from Linear Technology. <S> I thought that one of the other analog chip makers had a spice too <S> but I can't rememberwho :( <S> I have been to a few talks on simulation given by physicists and EEs who have donechip design. <S> Each of the talks seems to end like this --- Except for simple circuits you will spend most of your time getting models and determining where the models need to be modified for your application. <S> Unless you are doing work for an IC manufacturer the manufacturer will not give you detailed models. <S> You will not be able to avoid a prototype. <S> You should only simulate subsections of your design. <S> Simulating the entire design is not usually practical. <S> Also most of the free simulators are not distributed with models. <S> Re-distribution ofthe models is usually a copyright violation. <S> LTspice is distributed with models ofthe Linear Tech parts. <S> I am not sure the quality of the models. <S> Most manufacturers do not want to reveal too many details about their process. <A> A free version of TINA, which includes Spice, is available from TI. <S> It's a very good implementation, and a free demo version is available that is suitable for small circuits: SIMetrix <S> This is a very nice SPICE that I investigated some years ago. <S> It can be used with Eagle schematics. <A> I found an excellent online circuit simulator written in Java, and its free-and-open-source. <S> You can play with the software by visiting the link, and wait for the applet to pop-up. <S> (you need the Java Player ) <S> Edit components and connections by right-clicking anywhere/on a component. <S> You can build entire circuits using this and simulate it visually to understand how the circuit works. <S> (voltage is shown in green/red, simply amazing) <S> If you start with one of the gate circuit examples , (choose it from the Circuits menu), then you can click on gates or digital signals to switch them on/off, and see your circuit react. <S> You can setup oscilloscope views on any connection too. <S> (see bottom of the pic) <A> my favorite spice engine is the one made by linear technology. <S> I saw ngSpice mentioned above <S> but there is no good port to windows. <S> Its cool if you have the linux box. <S> But I find it has some compatibility issues and library import issues. <S> http://www.linear.com/designtools/ <S> That is where LTspice is, they have filter design tools there too. <A> I use LTSpice great info on how to use it: http://www.element-14.com/community/thread/1811 <S> In particular this tutorial: http://highered.mcgraw-hill.com/sites/0073106941/student_view0/lt_spice_instructions_and_support_files.html <A> There are a couple of heavy-duty packages and a lightweight program for Linux. <S> The serious packages are GEDA and KiCAD . <S> They are each a collection of programs that work well together (like Orcad); they include a schematic capture, a simulator, a waveform viewer, and a PCB layout tool. <S> They are very sufficient except my professor requires the ".out <S> " <S> file generated by pspice, so I still have to use that. <S> The lightweight program is Oregano . <S> It's great for quick simulations. <S> The libraries are quick and easy to use and find parts from. <S> The schematic capture is much easier to use and prettier than the other programs. <S> It uses either gnucap or ngspice for the simulations, so they're pretty good. <S> One major drawback that I have found is that the waveform viewer does not provide a logarithmic view <S> and there's no way to get data out of it. <A> You can use Qucs . <S> For logics circuits, you can use this great online simulator called Logicly .
|
I use SIMetrix Spice, it is an option with the Pulsonix PCB software I use. ngSpice is available for gEDA.
|
Current source for CREE XLamp XP-G Looking to play around with the CREE Xlamp series LED and was wondering what would I need to drive them off 110V household power? Output current needs to be in the range of 800-900mA. EDIT: I am looking to do this for creating lighting for a NanoReef tank. I would be combining several of these in series. <Q> A further consideration is that the led requires DC to drive it and the household power is AC. <S> These LEDs will draw 800-900mA at a forward voltage of around 3.2 v. <S> If you use a wall wart (plug and voltage regulator all in one) with an output of 5v DC (a common value) then a 1.8 ohm 2 watt (or greater wattage) resistor in series with the led would do the trick. <S> Note the led will need a heatsink as it will need to dissipate about 3W. <A> As was suggested twice already you do not want to power this directly from the line. <S> You should have an isolated low voltage supply. <S> I would use a current-sink to provide a regulated current. <S> I have been working on a prototype that is four channels at 20A per channel. <S> For an LED application the practical limits would be around 2A per channel (due to cooling). <S> A picture of my prototype that is powering 5 1W LEDs is at http://tinyurl.com/yzg9kd7 <S> I have mounted the LEDs on a heatsink. <S> I use thermal grease between the LEDs andheatsink. <S> I have a schematic of a current-sink (a.k.a. load cell) at http://tinyurl.com/6cbn6h (scroll down to the "Electronic Load" section. <A> At that power I'd use some kind of switching regulator for efficiency. <S> I wouldn't dare to go directly from household power to the LED without a lot more research. <S> Also, make sure to cool them sufficiently.
|
An easy wayto make a current-sink is to use an op-amp, resistor and FET. I would not advise driving the led directly with household voltage - it is far too high for this low voltage device. For a start I'd rather use some wall wart to provide say 12V and step that down to the LED.
|
Investing in a bench-top power supply For my projects I have always used hacky power supplies: wall plug + 7805, a USB port or an ATX PSU. I am looking at getting into 3.3 V circuits and I am having trouble getting hold of the necessary regulators in Australia. Can anyone recommend a good lab/bench-top power supply or alternatively a cheap way of getting 3.3 V? <Q> Decent bench power supplies are quite expensive. <S> However, you've said that you have used an ATX power supply in the past. <S> This is what I've done - I've modified an ATX supply to have a switch, an LED and some 4mm sockets on it with +12V, -12V, +5V, -5V <S> and 3.3V. <S> It's a cheap and very effective way of having a range of voltages available for development. <S> The ATX supply pin-out is here . <S> Alternatively, there are a wide range of 3.3V regulators available, including switching ones like the LM2574 or linear ones like the 78L33. <S> Farnell or RS will ship to most places (and they stock both of these parts); alternatively some bits are on ebay (search for 78L33 <S> and you get a few links from "international sellers") <S> and you can probably get them shipped pretty much anywhere. <S> Where are you located? <S> Apologies for the lack of links for Farnell, RS or ebay: it'll only let me add one hyperlink as I'm a new chiphacker.com user! <A> The standard part for 3.3V would be the 1117 at 3.3V I suppose. <S> It is indeed somewhat hard to get, even here in Germany (for example, Reichelt only has the SOT 223 variant of the LT1117). <S> As a lab supply <S> I have a cheap chinese 15V 3A unit . <S> That should also be ok, though I prefer the regulator approach. <A> For quick prototyping designs with dual rails supply voltage (i.e. 3.3V and 5.0V), I have recently been using a breadboard with an adjustable breadboard power supply . <S> With this, I can use it with a USB plug or with an ac-dc power adapter and a JST-DC adapter, or for more portability, I use a 9V battery with the JST connector. <S> Search "JST" at seeedstudio for the adapters. <A> kit capable of taking in DC from a standard 2.1mm center pin positive barrel and outputting selectable 5v or 3.3v. <S> I myself have one and find it extremely reliable. <A> I recently picked up a kenwood bench psu for a very low price on ebay as new old stock, it's only 1A 60V <S> but that's quite enough for 99% of things I will ever do <S> and it cost about 10% of it's list price. <S> So ebay might be worth a look. <A> I use one of these: PSU 140 <S> It's very good. <S> The only shortcoming is the sockets, I'd have preferred terminals with sockets. <A> The surplus company Marlin P. Jones (http://www.mpja.com) sells a varietyof supplies made by MasTech. <S> I don't know the quality of this brand butif they meet the specs and are reliable they would be a good value. <S> Same caveats. <A> Electronics Express has some power supplies. <S> http://elexp.com/tst-pwr.htm <S> They also sell some kits such as this one. http://www.elexp.com/tst_3010.htm
|
You could use an LM317 and set that to 3.3V. The Extech power supplies look good. LittleBirdElectronics in australia sells a simple, build it yourself
|
What are Atmel Fuses? What are Fuses in Atmel microprocessors and when I should or need to change the default settings? <Q> I see blalor already has an excellent answer for the purpose of Atmel fuses. <S> To answer the follow-on question of "are they physical fuses or are they software programmable", the answer is neither. <S> All modern Atmel and Microchip microcontrollers store the "fuse bits" in nonvolatile memory cells -- physically the same as SLC flash cells. <S> When you use a chip programmer to download a new program into the microcontroller program Flash memory, it also erases and re-programs those fuse bit memory cells. <S> However, the software running on a microcontroller cannot change the fuse bits -- not even if you are using a "self-programming" microcontroller -- i.e., a microcontroller that allows bootloader software running on it to re-program <S> its own program flash memory. <S> Some Atmel processors (especially the low-power ones) allow software running on them to change the clock source on-the-fly by writing to some configuration register -- <S> but whenever they are reset (or the power goes away and then comes back), they go back to using the clock source specified in the fuse bits. <S> Decades ago, those configuration bits (and the program memory as well) were actually stored in fuses -- a bunch of thin strands of metal; appropriate ones were selectively "blown" by applying 12 V until the metal melted and disconnected and the bit became non-conductive. <S> As you have probably figured out, that make the microprocessor one-time programmable (OTP) -- the only way to un-blow <S> a fuse was to throw the entire microprocessor away, pull out a fresh new one, and start all over. <S> We still call those configuration bits "fuse bits" for historical reason -- much like we often call the program memory "ROM" (even though it's not really "read-only" on a self-programming microcontroller), and we have "solid-state relays" that have no moving parts, and "telephone companies" that spend only a small fraction of their time actually dealing with sound, and "computers" that spend most of their time displaying pictures and playing music rather than, you know, computing numbers. <A> They're essentially configuration parameters, or like the chip's BIOS. <S> There's a fantastic fuse calculator for Atmega AVRs here: <S> http://www.engbedded.com/fusecalc/ <S> They control things like which oscillator to use, and what speed to run at (ie. <S> the internal 8MHz oscillator, or an external crystal), brownout detection, and the size of the boot flash. <A> They can be a bit of a pain if you make a mistake with them, and configure your chip for use with an external oscillator when it uses a crystal or internal oscillator. <S> You then find that you can't program your chip, and need to inject a clock signal into the oscillator pin to recover it, by setting the fuse correctly.
|
The only way to change those fuse bits is with a chip programmer.
|
Firsthand experience with Linux AVR IDE I am looking for some input into getting a good integrated development environment set up for AVR programming under Linux (Assembly and C). My studies gave me some limited practical experience with AVRs but I fear I am getting a bit rusty so want to get busy with some projects but also want to persist in performing all development under Linux. I use Ladyada's USBtinyISP and have been programming my chips using AVRdude but have yet to find an IDE that works as I like under Linux so have been compiling and building via my Windows lappie and AVRstudio. (This is why I love Arduino, good IDE & works straight away!) So, does anyone have any first hand experience using an IDE with Linux that they have successfully developed their AVR projects with start to finish? <Q> The thing about linux based developers is that they usually have their own unique workflow (vim vs emacs, etc). <S> In my opinion, linux is one big IDE that you add your own parts to. <S> With that in mind: If you are using a debian-based distro, run this in your command line: sudo apt-get install build-essential avr-gcc avrdude <S> Then find a text editor you like (google is your friend but here are a few: <S> vim/gvim, emacs, geany, kate, jedit) and write some C. <S> When you are ready to compile, jump onto avrfreaks and have a look at other peoples makefiles . <S> You can probably just steal a makefile from someone else's project and modify the target device, XTAL frequency and source filenames. <S> After you run make and have a .hex file, use avrdude to program your chip. <S> To go into detail would take much more space than I have, but that is the basic process. <S> When you are comfortable with the process you can do extra cool stuff in the makefile like having a single command that compiles and downloads your code. <S> Some text editors (like geany) let you set custom make commands to GUI menu options <S> so you could have a compile+download button like I do. <S> Also, the fantastic thing about this process is that it is pretty much the same whether you are building for ARM, AVR, x86, SPARC, whatever. <S> Once you have makefiles and gcc down, the rest of linux development is a piece of cake! <A> (Like the majority of other Eclipse modules I've used) <A> I haven't got any first-hand experience with it, but KontrollerLab sounds interesting. <A> As the makefile approach seems to deal with the C side of my question <S> I did a little more experimenting here (such as it was) and found that I had the resources to build assembly code also. <S> Using AVRA , a command line assembler, I have tested the building of an old school project of mine and output an identical *.hex file comparing it to my original AVRstudio output. <S> While I haven't actually programmed the AVR micro, based on the output alone I am happy to say I have firsthand xp now <S> , albeit limited :) <A> ECLIPSE is working fine on an EeePC with the AVR patch... <S> But it is a little slow.
|
There is an Eclipse module for the AVR, but I used it and it seemed to be much more trouble than it was worth.
|
SPI or I2C: which to use for a longish bus I'm contemplating a project that would require several AVRs talking to each other over a bus. They'd be separated by as much as 6 feet. It seems like both I2C and SPI can let a series of micros communicate over a bus, but I haven't seen anything talking about how long that would be. Has anyone tried connecting these protocols over distances of several feet? <Q> As others have said, SPI and I2C can be used over long distances as long as the pull-up resistors, clock frequencies and so on. <S> The main alternatives (which will give better noise immunity) are RS485 and CAN . <S> Both of these use differential lines in order to minimise noise issues and are better suited to this length of data transmission than I2C or SPI. <S> However, I don't think many (any?) <S> AVRs come with built-in CAN peripherals, which make CAN use much easier. <S> I would say that the most important thing to consider when picking a bus is to ensure that the protocol you use for communicating between devices includes a CRC or equivalent so that you can determine whether a message has been received correctly (CAN has this as part of the packet). <S> Considering this, it's also useful to have an ACK/NACK type response as part of the protocol so that a corrupted message can be re-transmitted. <A> Several feet shouldn't be problematic, just use twisted wires if you can. <S> SPI is much easier to buffer (if you need to) than I2C since SPI signals are all unidirectional, whereas I2C's signals are on shared lines. <S> can the AVR microcontrollers handle I2C and SPI slave modes as well as master modes? <S> (you'd need both) <A> For I2C over long distances you might want to seek out some "I2C bus repeater" solutions. <S> Keep in mind that any maximum distance you might find for I2C or SPI communication is mostly referring to the total bus distance and not the to distance between two nodes in a bus. <S> You might want to look into RS485 for these kinds of problems. <S> It's a serial bus protocol which communicates over differential lines, so when using twisted wires, the chances of noise are minimized. <S> Very long distances can be reached this way. <S> The downside would be that you would need an extra RS485 encoder IC (like a MAX485 ,not very expensive) in your circuit. <A> One advantage not yet mentioned of SPI over I2C is that all SPI wires are unidirectional and are always driven high or low. <S> This allows much faster communication than is possible with I2C, reduces susceptibility to noise, and allows simple gates to be used as repeaters. <S> Another useful option is simple async communication (one wire each direction). <S> The only downside I can see to async communication is that it generally requires both sides to be "awake", with a stable clock, to exchange data. <S> For a project of my own, I used a 3-wire slightly-modified SPI protocol and have found the results satisfactory. <S> I send display bitmap data (where occasional data corruption would be no big deal) at 10mbps and other data at 2.5mbps without difficulty. <A> Just an FYI, the interface between the wireless Nintendo Wii remote and its Nunchuck companion uses I2C over a cable that is about 3 feet long. <S> There are also 3-foot extensions cables that extend the total length to about 6 feet. <S> Not exactly the same as your setup (only two devices connected together), <S> but it is an example of I2C over a cable in a widely-used consumer product. <A> While I have little experience with SPI, I2C isn't terribly difficult given that you always need to calculate the proper size for your pull-up resistor. <S> Additionally, there are dedicated, and inexpensive I2C buffers that are quite easy to use. <S> However, you will still have to use a properly-sized pull-up resistor for your network. <S> I have used I2C to network between two AVRs at a distance of 8 feet, using only pull-up resistors and high-quality, well-shielded, twisted cable. <A> As many have suggested, I2C and SPI are best used for short distances. <S> While it may be possible to implement a solution with these interfaces, I would higly recommend that you look for a different, "more standard" solution (e.g. Ethernet, RS485, CAN, etc). <S> -- Especially if you're planning to use cables to reach the 6ft distance between microcontrollers. <A> I worked on a project involving about 80 AVR-based nodes in a star network communicating over I2C. <S> It was a total mess and didn't work in the end. <S> Getting updates to all the nodes took seconds and one faulty connection would throw off the whole network. <S> Last I spoke to the guy who made the nodes, he said he's stopped using I2C for projects like this. <S> Unfortunately I don't know why specifically I2C was inadequate here. <A> It should be easy with that short distances. <S> What you could do is figure out what those distances and your cabling means in terms of capacitance and line impedance and see what kind of frequencies (rise/fall times) you can get through them. <S> Beyond certain point, it's best to treat them as transmission lines. <S> If it looks bad, you could indeed switch to some other serial line like EIA-232 or 422. <S> That might mean an extra chip at both ends but will stretch far. <S> If you really need to go fast and far, you'll need something more (ethernet, don't count out radio or laser :). <A> If you can control the clock speed and you don't need high-speed data transfer, you should try to slow the clock down. <S> This will make it less susceptible to noise.
|
While both I2C and SPI are designed for short-distance hauls (a few inches), both can be utilized on longer hauls with proper cable and attention to overall bus capacitance.
|
Best way to control 75 LEDs with Arduino I need to control 25 groups of 3 LEDs or 25 RGB LEDs. Each group will be dismissed from the uC by up to 20 cm (about 8 inches). 20 cm is very safe assumption but I think it will be 10 cm or less. However, I think If it be even 5 cm, it will be hard to create in matrix way, so I think using MAX7219 likie IC ( http://www.arduino.cc/playground/Main/MAX72XXHardware ) is not best idea. I will probably use shift registers ( http://www.arduino.cc/en/Tutorial/ShiftOut ). I can connect multiple 74HC595 or use something like STP16C596. I prefer STP16C596 but they are obsolete. I found SCT2026 ( http://zefiryn.tme.pl/dok/a04/sct2026.pdf ) but I'm not sure is It right choice. One more note.My current project requires only "2 bit control" over each group (3 LEDs off, or selected and turned on only one of them), but I don't think it make my project easier or cheaper, also controlling each LED separately will give much more flexibility in case of changes. What solution will be fit best for my requirements. It will be nice if parts will be available in this shop - http://www.tme.eu/en/katalog/?&page=1,20#main or http://eu.mouser.com/ (but i prefer first one). <Q> I would suggest going the matrix route with a driver like the MAX7219 you mentioned or maybe, if you wanted a lot more control, the TLC5951DAP, a TI LED driver meant for RGB leds that will give you 24 channels with a 12 bit resolution (4096 different steps of brightness for each channel). <S> This will allow you to turn on each of the R, G, and B LEDs to different brightnesses to mix the colors to what you want. <S> You could use ribbon cable for the wiring to each of the LEDs <S> (I'm assuming wiring is why you do not like the idea of the matrix) and have all of the cables plug into a controller board. <S> That's just what I would do though. <S> The STC2026 looks to be directly compatible with the STP16C596, so that's a perfectly good replacement if you want to use it. <S> I would agree that controlling each LED individually will probably be cheaper and easier than trying to use some sort of MUX to have 2bits control which LED is on. <S> Hope that helps. <A> I don't know of any chips off the top of my head, but perhaps some of those I2C GPIO/output expander chips might be the way to go. <S> It has been a while <S> but I'm sure I saw 4bit ones around. <S> Of course, going this avenue may not be as cheap as some other solutions but it would be easy to expand it in the future and use minimal arduino pins. <S> Apologies for the lack of detail <S> , I am posting from my phone. <A> You can use the M5451 chip to economically drive constant-current outputs. <S> My board uses them to directly drive 70 constant-current "sinks", and provides 16 500mA "sources" for people who want to do large LED matrices. <S> http://www.toastedcircuits.com/html/product/Lightuino_5.0.html <A> I've used a bank of three TLC5490 chips to do individual control of 16 RGB LEDs. <S> It's used in my RGB LED Shield project . <S> If I were reimplementing it now, I'd use the easier-to-program TLC5497 chip which has 24 output channels, versus the 5490's 16 channels. <S> MaceTech is selling those in small quantities with immediate availability. <S> I'm planning on using one with a FT232R to make a LED USB dongle for the Chumby. <A> You can find detailed documentation here: <S> http://www.elcojacobs.com/shiftpwm And a schematic for regular LED's here: <S> http://www.elcojacobs.com/using-shiftpwm-to-control-20ma-rgb-leds/ <S> I recommend using a TLC5916 over a 74HC595, which is a shift register with constant current sink outputs. <S> You would not need resistors with this driver.
|
For something like this, I would definitely recommend that you make a pcb for the controller because that's a lot of connections to try to do by hand. I wrote a library for Arduino to do this with shift registers, it's called ShiftPWM.
|
Is it OK to attach an LED directly to a 5V Attiny? From the datasheet , I though the AT90S1200 had current-limited pins and when running at 5V would sink the proper amount of current through a green LED attached to + (0 turns on the LED, 1 turns it off) without any external resistors. Unfortunately when I attached 8 of them the IC burned out after a few minutes. I also have a dodgy solderless breadboard and may have otherwise shorted out the part. What did I misunderstand about that datasheet ? <Q> From the data sheet DC Current per I/O Pin ............................................... <S> 40.0 <S> mA DC Current VCC and GND Pins................................ <S> 200.0 mA <S> Now each led will be over driven at 40mA (as there is no current limiting resistor) - enough to shorten the life of the led but otherwise not too bad. <S> This is enough to greatly exceed the 200mA total allowed, hence your burned out chip. <A> It's fine to attach LEDs to your micro without current limiting resistors as long as you don't mind spending money on replacing the micro every once in a while. <S> You will continue to break them if you just hook up LEDs. <S> Chip manufacturers put current limits on their output pins so you don't burn up the part or make it drift from all the heating that will result from pulling so much (relative) power through it. <S> Resistors are very cheap and I can't think of a situation that would make sense not to put one in line with the LEDs. <A> <A> They did not build a current limiting function into the chip, however they are CMOS drivers, and by their nature increase their resistance <S> the warmer they get, so they will generally safely self-limit on a per-port basis <S> (although you could end up driving more than 20mA through a given LED, which might exceed the LED's rating) as long as you keep the voltage low (ie, each port doesn't have to drop more than a volt or two above the diode). <S> But the supply lines internal to the chip cannot handle all 8 lines being maxed out. <S> It's not ideal to do this, as you are stressing the part, but if you really want to drive an LED without the resistor, as long as you don't exceed the aggregate current, you are ok. <S> However, you can get around this by running the LEDs in a PWM manner. <S> Only drive one LED at a time, but sequence through them quickly enough that they appear constantly on to humans, even though you're actually blinking them at 30+ times per second individually.
|
I have not looked in a while but you may be able to get LEDs with internal current limiting resistors. Still, resistors are cheap, so unless you have a great reason to drive them directly with no current limiting, it's best to design the circuit so that both the microcontroller and the LEDs are operating within their design limits. However running 8 leds will draw a total of 320mA from the microcontroller - together with any current it itself requires to run (depends on clock speed).
|
How do I read analog devices that produce relatively high voltage? I found a sensor recently that emits ±90V (AC) on stimulus. How would I go about reading this from an arduino? Update I didn't think there were so many options. :) The kind of thing I'm looking at is a piezo vibration sensor . The current is small, but 90V sounds like a lot (and I'm kind of new to electronics, so I don't really understand what high voltage/low current means in terms of damaging stuff). If it were just 90V DC then I'd get the voltage divider idea, but reversing polarity sounds like it could be a bad thing. Perhaps voltage divider + a diode or two (or a rectifier) would work? <Q> Piezo vibration sensors produce a high voltage, but very low current. <S> Further, you are generally interested in sensing only a few things - level of vibration, frequency, amplitude, shocks, etc. <S> So the interface will depend greatly on what you want to sense. <S> Assuming you only want to know one or more of the following, then the interface suggested below will work. <S> A vibration event such as a shock or sudden G force <S> The vibration level <S> The general interface is to push the signal through a diode, then a resistor into a capacitor that's attached to ground. <S> In parallel with the capacitor is a clamping diode that limits the voltage spikes to a more reasonable voltage (5V, for instance). <S> Now each time a spike happens, the capacitor will charge a little bit. <S> If you have continuous vibration it will charge more quickly. <S> It'll eventually reach the level of the clamping diode as long as the vibration exceeds the capacitor's self discharge rate. <S> Sense <S> the voltage on the capacitor, and you'll learn about the signal coming in. <S> If you put a resistor in parallel with the capacitor then you can define how quickly the capacitor discharges. <S> A small resistor will discharge quickly, and you can count how often the piezo is hit or dropped. <S> A large resistor will allow the charge to build up <S> so you won't see individual events, but instead get a higher voltage with more vigorous vibration, a lower voltage with less vibration, and no voltage with no vibration. <S> If you need more information than this simple technique, then you'll want to use a signal transformer to bring the signal down into the 5V range, and a precision op-amp and ADC. <A> If this sensor is connected to line voltage <S> I would not connect it <S> tothe Arduino with any circuit that does not provide isolation. <S> This provides isolation and lowers the voltage. <S> You coulduse a rectifier to convert the AC to DC. <S> You would need to checkthe transformer loading on the sensor. <S> A resistor divided followed by an isolation amplifier would worktoo. <S> There was an article in the April 2002 of Poptronics called"Build this Home Appliance Watt Meter/Watt-Hour Meter". <S> Thearticle documented how to safely measure line voltage (with a step-down transformer) and how to safely measure linecurrent with a current transformer. <A> Is it only +90V or -90V? <S> Or is it a range from -90V to +90V? <S> If it's a binary +/- <S> , you could use a voltage comparator (aka an op-amp), otherwise you could use a voltage divider (aka two resistors). <A> Check out the MID400 8-Pin DIP AC Line Monitor Logic Output Optocoupler . <S> There's a very good application note for this device. <S> I use it for monitoring my furnace, which operates (in part) at 24VAC. <S> You'd need a 22.5k 0.5W resistor in series with the input to give a high output when voltage is present. <S> That'll give you a binary output if you just need to sense whether there's voltage or not. <S> If you need to actually measure the voltage, however, the MID400 won't really work (or, at least, I'm not sure if the output will be linear with the voltage; it may just pulse if the input current drops too low). <S> For my home power monitor, I'm planning to measure RMS values for voltage and current with an AD737 RMS-to-DC converter . <S> You'd probably need a transformer and/or voltage divider to get the voltage down to the 200mV input required by the AD737. <S> Or you could go the cheap way <S> : step down the voltage and feed it through a diode into a capacitor and resistor, which will give you a half-rectified somewhat-smoothed DC output correlating to the input... <A> Just use a voltage divider. <S> You can measure thousands of volts that way. <S> http://www.rossengineeringcorp.com/hv_dividers.htm <S> And yes, dividers work for AC, too. <S> :D <S> They just make the signal smaller. <S> You'll want a capacitor coupling the piezo to your input to block DC and bias it to the Arduino's reference voltage. <S> I doubt it will do any damage, because the arduino input already has clamping diodes, and the current will be very low <S> (piezos are high impedance sources, plus your divider provides a large impedance), but you can always add an extra clamping diode to protect the input. <S> Actually, depending on what you're doing, you might want a high-impedance amplifier right at the piezo to prevent it from being loaded down or picking up interference. <S> What specifically are you trying to do?
|
One safe way to measure the voltage is to use a step-downtransformer.
|
What are the best Electronics Soldering Techniques? Is there a tutorial that shows different techniques and the dos/don't of soldering? I was doing a kit last night that just said heat up both components for 5 seconds then put the solder close and let it oose into the join -> they all worked nicely....but as instructions go they are a bit basic, and from past experience there are certain components that you shouldn't heat up too much. I was doing Through-hole soldering but Surface Mount would also be great to learn about. <Q> I'm going to second and expand on Jason S's answer. <S> Clean and tin the iron (rosin) flux the joint to be soldered with your third hand, touch the iron to the part to be soldered, and simultaneously, touch the solder to the part - not to the iron. <S> Hold <S> until you see the solder "flow" and fill the joint/through hole/twisted wire/etc pull the iron away quickly <S> You'll know when it's good if you can still see the parts of the joint, and it's shiny. <S> As in, if you still can see the two wire twisting together. <S> You don't want to make a super-full 'ball' of solder, since then no one else can, by inspection, see that it's a good solder joint. <S> Worst case is if you get a ball of solder where the joint is with a dull sheen. <S> That's a cold solder joint and needs to be redone. <A> I use a Metcal system. <S> Provided that the correct cartridge is used, I get a perfect joint every time, with minimal risk of damaging parts. <S> Metcal uses RF heating with very accurate temperature control built into the cartridges. <S> They have excellent tutorials on soldering techniques, like this one: Metcal tips <A> Are you doing SMD or TH soldering? <S> This is an excellent SMD instructional video --- http://www.youtube.com/watch?v=wQXhny3R7lk <A> You don't need to preheat components except in special situations where there's lots of metal. <S> If you do it this way rather than touching the solder directly to the iron, it will make sure you don't get a cold solder joint (where the solder melts and then freezes but doesn't bond to the tinned component/board.) <S> If you are soldering two components together, twist the leads together, then touch iron to the leads and touch solder to the leads until the solder flows. <A> If your looking at SMD, you could look at using a solder reflow technique using solder paste. <S> Here's a video of a simple version using a kitchen hot plate -> <S> http://www.youtube.com/watch?v=lqYjPJJBiZo <S> A hot gun can also be useful for concentrating heat on a particular part of your PCB Solder paste ROCKS! <A> More tips, Use a damp sponge to keep the tip clean. <S> When soldering normal components (not SMD) use a powerful hot iron (I use an Antex 25w for general work). <S> When wiring up a big job I'll often use a 40w iron with a fine tip. <S> It stays hot <S> and I can get a good rhythm going. <S> The quicker you get the joint done the less chance of damage/excess heat transfer to other parts etc.
|
I learned to solder components to circuit boards by touching the iron to the component pin, and then touching the solder to the pin, until the solder flows into the pad or hole.
|
Which soldering iron tip should I use? This is a pretty open-ended question intentionally. :-) All of the soldering I've done to this point has been with through-hole components. I hope to move up to some smaller surface-mount parts at some point in the future. I've got a Weller WES51 soldering station that came with a "screwdriver" tip (ETA, I think) that's starting to feel a bit like working with a sausage as my skills (incrementally) improve. There is a large number of ET series tips available . How do I choose the right tip for the components I'll be working with? <Q> It depends on what you're soldering, and how skilled you are at soldering. <S> You can, in fact, solder a 0.4mm pitch TQFP with a tip that spans several pins, such as the ETA you mention, but it takes a lot more skill (and flux!). <S> If you're doing mostly through hole components, the ETA is perfectly fine. <S> I'm also doing SMT and very fine SMT work, so I also purchased the 0.030" and 0.015" conical tips. <S> I use these under a microscope to do the 0.4mm (about 0.016") <S> pitch TQFP chips. <S> It is worthwhile getting the biggest chisel tip you can, as well, for the occasional need to deal with soldered heatsinks, or parts soldered to ground planes or PCB heatsinks. <S> These can pump all 40+ watts of your iron into the joint, allowing you to remove it without heating the component up too much. <S> Keep in mind that typical wet sponge tip cleaners can lower the tip's temperature significantly, especially with the small tips. <S> I use a gold tip cleaner similar to this Hakko product , which doesn't soak as much heat from the iron on each wipe. <A> Obviously for smaller SMD parts, you'll need a smaller tip, but smaller tips are also slower to transfer heat, making it harder to solder. <A> Mini-wave tip: <S> http://www.sterntech.com/soldering.php <S> My two cents worth. <S> I recently had to solder on of our prototype boards, which had only SMD components. <S> I agree with most of the comments above for general SMD parts. <S> The toughest part I found (only when I did this for the first time), was to solder the microcontroller on the board. <S> It is extremely critical to get this part aligned on the pads. <S> There are a few tricks that make this the easiest part to solder in the end: 1) Lots of FLUX on the pads where the part will be placed! <S> 2) <S> And then this magical tip called the mini-wave tip. <S> After tacking on the corner pins to ensure proper alignment, you fill the tip with solder and <S> just slightly drag it along the pins of the microcontroller. <S> Once all the pins are tacked on, you can use this tip to drag/suck away the excess solder off the pins! <S> Works much better than tacking each pin on and using wick to dab away the excess solder. <A> I like the 20mil tip with a 30deg bend. <S> Great for SMD. <S> I use widerparts of the tip for larger leads. <S> The Metcal heats the tip mass veryquickly. <S> If I am soldering a lot of connector pins I keep the 20+year oldWeller on. <S> Large chisel tip. <S> The part numbers for the tips and my tools are at http://tinyurl.com/5foeou <A> I prefer a knife-style tip: http://www.cooperhandtools.com/brands/CF_Files/model_detail.cfm?upc=037103166463 <S> These are designed for PLCCs but work really well for SOIC or TSSOP style components. <S> What you do is to bead up a blob of solder, place the edge of the blade at the angle between the toe of the lead and the pad, then drag the iron down the row of pins. <S> The reason for this technique is that it is faster and gives a better result than pin-at-a-time. <S> The solder follows the heat but leaves each lead with a perfect joint and heel fillet. <S> One thing to note is that if you are really good, you can do a whole row of fine pitch pins with no bridging - the solder just walks off the end and onto the iron. <S> Me, I'm not that good and always end up removing the solder bridge on the last two or three pins of fine-pitch SMT parts. <S> These tips also work well for discrete SMT components and even through hole leads. <S> By rotating the blade, you can get contact with a larger surface of a through-hole lead for getting extra heat to ground or power pins. <S> By rotating the other way, you can use the tip of the tip for SMT chip components. <S> I disagree with the advice to use the micro-conical tips. <S> These have never done anything for me except F-up boards and joints. <S> Either they don't melt the solder, or you turn the temperature up so high that you start burning away solder mask and start seeing the tip dissolve away in the solder. <S> Also, consider the boards you'll be working with. <S> Things that work with a little two-layer board or one of those unpopulated, phony "practice" boards the soldering iron vendors give out fail miserably on 4+ layer, fully built, assemblies.
|
Get the biggest one that is comfortable to use for the parts you are soldering.
|
Non-isolated input conditioning for a crude switch I'm trying to build something Arduino-based which can (among other things) detect when a user touches two specific fingers together. The best idea I can come up with is to have a wire on each finger that forms a circuit when they touch each other. I'm afraid that some kind of static discharge or other accident applied to the wires could fry the Arduino. I read that using a Zener diode attached to ground before the input would work but that it might not catch very fast spikes (as in the case of an ESD, I would presume). Is there a better way to protect the chip from such circumstances? Or better yet how can I improve my design so that this doesn't become an issue? Thanks! <Q> standard practice is both of the following: zener diode connected from outer input to ground small resistor connected from outer input to CPU pin (20-100ohms?) <S> The zener diode clamps outer input between (ground - Vbe diode drop, where Vbe = <S> between 0.7-1.0V) and (ground + zener clamp voltage at high current). <S> The small resistor helps limit current from outer input into CPU pin. <S> ESD-clamping diodes (more commonly known as TVS = transient voltage suppressors <S> ; tons of companies make them, good mfrs are ON <S> Semi and Diodes Inc and Fairchild ) are really just zener diodes optimized for this use, that can handle high surge power w/o getting damaged. <S> If you are concerned (or if you are working on a commercial product), I'd use one of them, but a regular zener will almost certainly work. <S> Make sure you use minimum wire/lead length from outer input to ground: the more inductance you introduce in series with the clamping diode, the worse it will perform. <S> ( NOTE : <S> regular zeners add capacitance, maybe a few hundred pF. <S> These usually have the following topology internal to the part: <S> *-----+--->Z------|<------+------* | | <S> +------>|-----------+ <S> -->Z-- <S> = <S> zener <S> -->|-- <S> = <S> regular diode <S> The regular diode in series with the zener reduces the capacitance, and you then need another diode in parallel with those two, in order to clamp in the other direction.) <A> A circuit like sketched below shurly will work too. <S> The two diodes clamp the voltage against VCC and GND and the Resistor limits the current ------------------------*-------- VCC | --- ^ <S> / \ <S> --- <S> ---- <S> |Ext Input --| <S> |------*-------- <S> Arduino Input <S> ---- <S> | <S> 10k <S> | --- ^ / \ --- |------------------------*-------- GND <A> I would use a capacitive sense IC like the Atmel Q-touch devices. <S> In general for transient suppression I would use a transient voltage suppressor (TVS) <S> witha series current limiting resistor. <S> Very fast.
|
If you have a communication line or other circuit node which is sensitive to capacitance, you'll need a special clamping diode that is designed for low-capacitance. I like the Littefuse SP-7xx devices.
|
Best methods to fix broken tracks I've made a couple of PCBs which need the odd few 10 mil tracks, but are mostly 20/30 mil. Unfortunately the etching process isn't fantastic and there are numerous breaks in the traces, most of them small. I've managed to convince solder lumps to go over the top of the smaller gaps, and have used components legs to bridge some of the larger ones. The solder lumps don't feel particularly reliable though, and there are some gaps which are too small and awkward to get a piece of wire across but too big to be bridged with just the iron. Are there any standard ways to reliably fix up broken traces? Update: Thanks for the suggestions everyone! I found and tried out a silver conductive pen. As a first time user I found it difficult to dispense, and obviously I didn't use enough of it or mix it properly because it didn't even end up being conductive. It seems like the main problem was that I was trying to use pieces of wire which are too short. I found some small gauge tinned wire and used longer lengths, running it over significant lengths of good track on either side of the fault. That makes it much easier to position, and you can tack them down one end at a time. <Q> I use wire-wrap wire to fix broken tracks, or to modify boards. <S> It's very thin, and easy to solder because of the silver coating. <A> I've had the same problem in the past, if you really don't want to etch another one, I'd just solder a jumper wire across the gap <S> (use single strand/bell wire, it holds it's shape better)I've tried conductive pens in the past <S> and they can be a bit hit and miss, not sure about the paint tho, it may work well if you build up a few layers <S> here's an example - <S> > <S> PCBrepair <S> It's ugly <S> but it works! <A> Sometimes it is best to run a wire between the two nearest solder pads along that trace rather than try to fix it in a very tight area. <S> If you do this then put a few drops of super glue on the wire after you are done to hold it in place and prevent vibration from breaking the connections. <A> Clean the traces with steel wool and tin them. <S> Then solder 0.2mm (32 AWG) <S> tinned wire onto them. <S> This diameter lets itself bend easily to follow the traces' turns. <S> The small diameter also means that during soldering only little heat is transported over the wire to points you soldered earlier; a thicker wire may come loose again. <S> I find Erem 102ACA precision tweezers handy to place the wire, and a pointy knife like X-Acto to cut the wire after soldering. <A> I use solder lumps and component legs. :) <A> One option is a " conductive pen " or " conductive paint "... <S> dunno how well they work though. <A> One maintenance shop I worked in had trace repair kits. <S> They had various sections of straight traces and different types of pads. <S> Carefully remove any conformal coatings from the board, trim the new trace to size (about 5x the width of the trace works well for overlaps on each side,) and carefully solder it to the original trace. <S> Clean it well, then cover it with conformal coating spray or a thin epoxy. <S> I've been able to successfully fix some pretty bad boards (holes burned through) after filling any holes with epoxy, then using this method. <S> Unfortunately, I don't know where to get these, but I would try any of the "usual suspects" such as DigiKey, etc...
|
It breaks easily so some sort of glue to hold the wires in place is advisable, I just use masking tape, sometimes.
|
eZ430-Chronos Development on *nix? So I just got my TI eZ430-Chronos Dev kit (a runners watch & eZ430 micro dev combined), and I am chomping at the bit to start playing around with my new toy. I have just a few issues the recommended tools from TI are Windows based, and I am lacking a valid windows OS right now. Also I brought the watch back to work, but left the programmer and AP at home. So I am left reading articles and links to wiki's, but unable to try anything out for myself. Stuff I have read so far: http://www.linuxjournal.com/article/8682 http://wiki.msp430.com/index.php/EZ430-Chronos http://sourceforge.net/projects/mspgcc4 http://blog.makezine.com/archive/2010/01/ti_ez430_-_chronos_development_kit.html I also searched the mspgcc sf mailing-list, it had no mention of the chronos. Has anyone been able to get mspgcc or mspgcc4 to work with the Chronos. I have searched for information about this on the various sites, but found no answers. It should be very straight forward, but I will give it a shot later and report back if I don't hear back. <Q> check out mspdebug <S> it should get your code onto the device and do some debugging there. <S> I also saw that someone patched mspgcc v3.2.3 to handle the cc430 in the chronos. <A> I got mine yesterday. <S> They have only just started shipping them in quantity (I know several people who have just got them), so I think it will be some time before anyone has a go at porting the software to Linux. <A> The Rowley crossworks toolset is a very high performance development system for the MSP430. <S> It is available for Linux, MAC OS-X and Solaris as well as Windows. <S> It is not free, prices according to license type: $1500 — Commercial License $300 — Educational License $150 — Personal License <S> This supports both the 430 and 430X (larger memory) architectures. <S> IIRC <S> the GCC port only supports the 430. <A> Several people are using mspgcc4 including me. <S> I'm the rare type in that I used it in XP (work machine) and haven't actually tried Linux. <S> I have some 430's and I'm waiting to see if they'll ever ship me a Launchpad <S> so I expect I'll get back to the arch sometime in near future. <S> Either way, have a look at the non-dead, uncrippled, and not broken_on_half_the_compilers_advertised <S> Openchronos and #openchronos on freenode. <S> All these people are using GCC4 on the Chronos kit. <A> There is the control panel and sample code software available for Linux for download from TI. <S> I'm not going to look it up <S> but you can. <S> I installed it but was having a problem with it seeing the USB adapter. <S> I'm not a Linux guru <S> but I can I was able to get it going just never bothered to finish up with the USB problem. <A> here you can find instructions on how to install the latest mspgcc (as of 06/12/2011) <S> https://github.com/sergiocampama/Launchpad/blob/master/README.md <S> i am 99% sure that the cc430 is supported in this version, and mspdebug should be able to install it, so the chronos should be supported.. <A> I don't know specifically what you need, WINE might help you somewhat, but if you need access to USB ports etc then you may be stuck (I had a similar problem <S> whereMPLAB appears to function properly under WINE but can't access the USB port - but for PICs there are Linux alternatives). <S> Hopefully when you get home you'll be able to check if you can connect to the device from the command line etc, as mspgcc etc appear to work under Linux. <A> I just got started with EZ430 Chronos hacking, but it seems that on a contemporary Debian, all the tools you need are easily available: apt-get <S> install mspdebug gcc-msp430git <S> clone git@gitorious.org: <S> openchronos/openchronos.git OpenChronoscd OpenChronosmake config && makemspdebug rf2500 prog\ <S> build/eZChronos.txt
|
It does run and like I said it was the adapter driver that was the issue.
|
sensing light and outputing voltage suitable for audio I have an idea for a project where I use a pc fan to make an oscillator. The oscillation is created by the cycle of light/dark falling on a light sensor as the blades of the fan rotate. My initial research points to the use of the photodiode in combination with a op-amp to provide a suitable line audio output. My question is: What are the critical parameters for the circuit? Here is the datasheet for the photodiode i'm prototyping: http://www.jaycar.co.nz/products_uploaded/ZD1948.pdf Rob <Q> If you just use a 555 timer you won't need to amplify it, you can plug it directly into a line level input (microphone in on computer, aux in on hifi etc). <S> By putting the photocell on the bottom of the fan and a light source above the fan you could get some interesting results. <S> Amos is right, you could use a very similar circuit to the one in my Posc, I'll draw up an example just give me a mo.... <A> The critical parameters are the light and dark currents. <S> The dark current has a maximum value of 30nA. Thelight current has a minimum value of 30uA and a typical value of 40uA. <S> Since the ratio is 1000:1there will be a large difference between on and off. <S> If you use an op-amp to output a line level I would set the gain resistor so that a 40uA current gives you 80-90% of the line voltage level. <S> The downside is that the level may be different for different diodes. <S> You could put a pot in the feedback loop for adjustment. <S> If you want to get more complicated you could have thephotodiode trigger an analog switch (SPDT). <S> The precise line level could be set by adjusting the inputs of the switch. <S> On the Hamamatsu site there is some good technical informationand application hints for photodiodes. <A> Alex who is a member here has details over on his tinkerlog site of something he calls Synchronizing Fireflies , these may have some useful details in. <S> But of more use to you is probably Jim 's site Sonodrome which has details of his Posc on it. <S> This has two oscillators controlled by light dependent resistors and can output to a stereo. <S> There is a schematic etc in there somewhere. <A> Sorry it's not too clear, but you should get the idea, just ask if you wanna know more.
|
The speed of the fan would create an oscillation, also the 'brightness' (pitch of harmonic content) of the oscillator could be adjusted by changing the intensity of the overhead light source.
|
Dealing with excess heat As a sort of weird side project, I'd like to make an oven timer that has selectable food stuffs and associated timing information. Now while this device would be simple to make I would like to stick it on the oven which means it would have to deal with some significant but not ridiculous temperatures (gas oven, metal structure). Has anyone has any experience heat proofing things like HD44780 LCDs, AVRs and other delicate components or do I have to go and get hold of those military grade parts? <Q> Typical ovens with electronics use a back panel to place the electronic components on. <S> Putting an additional panel above or to the side of this panel will provide the best location. <S> Mark has a good point though test the temp experienced at the location you plan to put the project before you start to build. <S> the component should be exposed to. <S> You may also consider using an old pc fan to place in the enclosure to aid in keeping everything cool. <A> Do you really need to put the electronics in that environment? <S> Couldn't you simply use high temperature wire for the sensors and such, then mount the electronics in a slightly cooler location? <S> Not trying to be mister obvious here just asking to understand. <S> An oven is a rather dangerous appliance to automate, not that it can't be done safely, just that you need to make sure you have proper fail safes and such. <S> I have built some very large kilns that were gas fired <S> so I do understand some of the challenges with dealing with the heat. <S> I always tried to remove any electronics to a temperature friendly zone. <A> why not use some insulation between the electronics and the thing that sticks to the oven? <S> e.g. take a square potholder, affix electronics to one side and an applicance magnet to the other side. <A> There's always and only three ways for heat to transfer: <S> radiation, conduction and convection. <S> Account for all three by shielding, isolating, and "mitigating". <S> That said, sticking electronics (of any kind) in an oven is not a great idea; out-gassing could occur with the plastic parts and thermal cycling is a great way to check the reliability of parts and their interconnects. <S> For temperatures above the 'normal' industrial range (say 70C), it's not just the military grade parts you'll need, but (perhaps) the ceramic PCBs, the heavy traces and bomb-proof assembly. <S> It's why they're so expensive. <S> Much, much cheaper is what Mark B said, get the electronics outside, and just sense the temperature.
|
Each component you use should have a rating given by the manufacture of the max heat
|
How do I physically work with a hobby motor? How do I incorporate a hobby-style motor into a project, physically. How do I mount it and connect a wheel to it? (Assume that I have a working H-bridge or even switches, and am not concerned about how to use the motor electrically, just physically.) I've purchased small, hobby style motors at various times. Typically, they run on 1.5 V to 12 V, and many of them have no built-in gearing (and thus spin really fast with very low torque). How do I connect a wheel to it, or a gear or pully? Next, most motors of this sort are round. Round! If it was flat on one side, I could glue it down. It looks like they are designed to be screwed into something at the front or back, but I don't know how I'd make a surface to mate to it nor make marks to drill holes through it precisely enough. What have you found works for when you want to make an electronics project move around on its own? <Q> I would suggest you look at some shapelock. <S> Shapelock.com <S> You can mold any type of mount you want with this. <S> But as cheap as they are you may want to consider buying some with the gearbox already attached. <S> Most hobby supply stores have assortments of wheels, sprockets, gears and pulleys for these <S> or you can find them on ebay. <S> Good luck <S> and let us know what you build. <A> get some cardboard or even decent paper & push the axle through it without enlarging the hole. <S> You may need to place masking tape to reinforce the hole once you've made it. <S> The idea here is to maintain the accuracy of the centre hole. <S> After this get a pencil & rub it on the paper so as to make a kind of 'picture' of the surface end of the motor, making sure you can see the mounting holes in the picture. <S> You can then use this paper as a template to make a right-angle mounting bracket for it. <S> careful not to use too long a mounting screws into the end of the motor as they may foul the commutator brushes or the armature. <S> I find a good source of tiny little self-tappers in cheap import shops, not available separately but in carefully chosen throw-away cheap plastic toys etc. <S> Just choose yourself a toy with lotsa little screws! <A> Mounting motors can be a pain. <S> One ugly, but workable trick in some situations is using hose clamps. <A> Get one of the Tamiya Double Gearbox kits. <S> They are quite cheap, and come with two motors and two gearboxes, with shafts for attaching wheels. <S> I've got a couple of them, but haven't got round to assembling them. <S> When it's put together all you need do is build it into a little cart, add a couple of H-bridge drivers and start programming. <A> If nothing else you can buy motors from Roombas rather cheap here: http://www.protechrobotics.com/ or even cheaper here at roombarecycle <S> The Roomba motors either have gearheads on them or a head to use a rubber pulley. <S> Most mechanical parts can also be found there.
|
You could also buy gearboxes that are designed to mount on these hobby motors.
|
How do I program an AVR Raven with Linux or a Mac? This tutorial starts with programming the Ravens and Jackdaw with a Windows box. Can I do those initial steps with a Linux or OS X machine instead? If so, how? Is there any risk of bricking the hardware if I just try? I have a USB JTAG ICE MKii clone, which is supposed to work for this. I'm totally new to AVR, but very experienced with C/C++ programming on Linux or OS X, up to and including kernel programming. <Q> If you're developing projects on Linux, do some searching for a good Makefile that supports avr-gcc and avrdude. <S> You should then just have to edit the Makefile to specify your hardware and source files and you're away. <S> To build a binary you generally just call make , to program a device is often make program and sometimes make fuse to set the fuses on the AVR. <S> I've used Mfile for generating Makefiles on Windows, but it looks like they support *nix also. <A> Avrdude works just fine on OSX too. <S> Just, port install avrdude avr-gcc avr-binutils avr-gdb avr-libc <S> And you're ready to do everything that WinAVR does. <A> It supports most programmers and most AVR chips. <S> The main thing to watch out for, is that I think you need to use avr-objcopy to extract the data from the 'ELF' binary files, you can't program the 'ELF' directly with avrdude. <S> Random googling for avr-objcopy / avrdude commandlines comes up with this, which looks like it might work: <S> # create demo.bin from demo.elfavr-objcopy -j <S> .text <S> -j <S> .data <S> -O <S> binary demo.elf <S> demo.bin <S> # program demo.bin to the 'flash' memory in an 'atmega128' chip,# using a 'stk200' programmer connected to the 'lpt1' port on your computeravrdude <S> -p <S> atmega128 <S> -c <S> stk200 -P <S> lpt1 -U flash: <S> w <S> :demo.bin:r
|
Under Linux, you'd probably use avrdude to program them.
|
How to supply power from vehicle to a low power device? I am a programmer with only basic understanding of electronics/electricity. I am trying to install this device into my vehicle. The device accepts a wide DC power input (10V to 30V), but has a maximum power supply rating of 12W (Edit: had typed 1W) . I am assuming that means the input current should be somehow controlled, external to the device. What do I need to do this? A current limiting circuit ? A fuse for extreme situations? A current limiting circuit as described in wikipedia will dissipate power? Are there off-the-shelf components for this? Is a separate spike guard required? <Q> I am mostly self taught on this stuff <S> so someone please correct me if I am wrong. <S> I think you have a slight misunderstanding as to how current flow works. <S> Unless there is something seriously wrong with your circuit, that rating means that it will use at most 1W of power from whatever supply system it is hooked up to (so don't hook it up to a 0.5W supply). <S> I guess the best way to think of it is that the device is responsible for how much current it draws; the PSU will not "force" extra current down into it. <S> Current limiting circuits and fuses are used to protect against short circuits because when you short out the power supply (connect the two terminals together), the load resistance drops to essentially 0 and current flow theoretically approaches infinity. <S> You can see how infinity amps of current could break something! <S> Think about it: <S> V = <S> I <S> * R <S> if V = 30V and R = 0 ohms, V/R = <S> I (rearranged equation) <S> 30/0 = <S> I (a divide by zero situation) <A> You are good to hook it up without any other circuit, although a fuse is never a bad idea. <S> It is actually to prevent damage to the wiring or other devices in you car in the event your device shorts out. <S> Are you sure the rating you looked at didn't say a "minimum power supply rating" instead of maximum? <S> Most likely it was stating the maximum power the unit would consume. <S> Don't loose sight that your unit will be draining the battery if you are not running the car unless you hook it up to a switched circuit. <S> Good luck. <A> Have you checked with the manufacturer for installation instructions and application notes? <S> Since the flyer lists a wide range input ( and has a big picture of a car ;) you may not need anything. <S> A fuse won't hurt but you will need the manufacturerto tell you the value. <S> Again themanufacturer will tell you this. <S> The device may have an internal fuse and filtering.
|
The device may have a high in-rush current that couldblow a fuse that is sized for the maximum operating current. Also an EMI filter or transient protection component may be recommended. Unless there is a defect in your circuit it will never consume more than the 1 watt it is rated at.
|
Is there any way to determine the correct voltage for a stepper motor? I recently bought a CNC mini-mill at an auction. It is fitted with steppers on the three axis. The X and Y are the same, and the Z is a bit smaller (physically). All the markings were removed from the motors and they are painted flat black. Yet another reason to hate proprietary hardware. The machine was originally designed to use a custom controller which is missing. My question is, can I figure out what voltage the motors were intended to run at? Does the coil resistance offer any clues?I have a good quality multi-meter, and I have already reverse engineered the wiring. I don't want to fry the motors though. <Q> If you use a good driver circuit that has current limiting and chopper features, it really won't matter. <S> Basically you can slowly crank up the current on these drivers while checking the stepper motor temperature and usually you can operate them at a voltage MUCH higher <S> then they were intended with the right circuit. <S> I am currently in a CNC build project and I am about to do that very thing. <S> You can follow me on my Blog. <S> WWW.MENDINGTHINGS.COM Good luck. <A> The total weight of the motor and the coil resistance might be a good guide. <S> I have done similiar things with rechargeable batteries matching chemistry and weight. <S> I also think that Mark B's advice is pretty good, but suggests an over sized driver. <A> Steppers get marked like other motors, but they aren't operated like other motors. <S> Your motors, depending on size, might have two or three heavy coils in parallel. <S> This drives the resistance down to 1 or 2 ohms. <S> At 100% duty, this gives them a nameplate rating of 3 or 4 volts. <S> But, in actual operation, you don't use 100% duty. <S> When you are running, the coils are at 50% duty or lower. <S> When at rest, you usually switch them off or go to a 10% holding current. <S> So to run them at high speed and/or high acceleration, the packaged drives use a high voltage (somewhere between 24 and 90 volts) and a current limiting resistor. <S> This overcomes the internal inductance to give a snappy response. <S> It's not plan <S> B <S> , it's just the way they work. <S> So, the critical part of the nameplate is the temperature rating. <S> It's usually around 120F. <S> If you can keep your hand on it for a half second or more, then you're fine. <S> But acceleration and deceleration is important, too. <S> You usually can't just jump in a full speed. <S> So you best bet might be to find a mill control box that has the drives and a control computer that does the profiling that you want.
|
See if you can find some specs on the web and match them to your motor.
|
How does an audio jack detect when a speaker is plugged in? Some sound card audio jacks can now inform recent Windows OS's that an audio device is plugged in. Anyone know how it does this? I'm thinking it uses some kind of voltage comparator or resistance measurement. This question was asked at Superuser . My gut feeling is that the circuit is not as trivial as one of the participants is suggesting, but I'm a bit rusty on circuits. <Q> Most all jacks (DC power or audio) have an extra terminal that is switched on plug insertion. <S> This is a mechanical switch. <S> Some designs use this extra terminal to switch between battery and external power (in the case of DC jacks) or to switch between headphones and speakers (in the case of audio jacks). <S> In the photo of this DC jack on Digikey <S> you can almost get a good view of the internals. <S> The two lugs on the back of the jack are for the two DC power connections. <S> The third lug on the bottom is the switch input. <S> Audio jacks have a similar arrangement. <A> While audio jacks often have switches that can be used for plug detection, most codecs now implement jack sensing that measures the impedance and other characteristics of the plugged in device and make that information available to the processor they are connected to. <S> This is also very helpful in preventing an audio amplifier from trying to drive speakers outside its impedance range and damaging the amp or the speakers. <A> Does it not measure the impedance of whatever is plugged in and then determines what it is based on known values ? <S> when I insert my speaker jack into the plug, i can hear all the speakers "clicking" one by one, as if the computer is testing to see if they are there... <S> I found this on http://www.freepatentsonline.com/7579832.html <S> The jack sense circuit includes left and right amplifiers and a cross-drive impedance sensing circuit. <S> This cross-drive impedance sensing circuit, which is electrically coupled to the left and right audio ports and the left and right amplifiers, detects the resistances of left and right output loads in order to determine characteristics of a device connected to the CODEC audio jack. <S> The cross-drive impedance circuit is configured to measure a resistance of <S> a left output load electrically coupled to the left audio port, in response to a “right” test signal generated by the right amplifier, and is further configured to measure a resistance of a right output load electrically coupled to the right audio port in response to a “left” test signal generated by the left amplifier. <A> Take one apart and find out. <S> :) <S> There are several things it could be doing, depending on whether it's just measuring the presence of a plug (just a jack switch will do), or if it knows the difference between a mic and a headphone, etc (resistance measurement?).
|
An audio system includes a CODEC audio jack having left and right audio ports and a jack sense circuit.
|
What are some of the more compelling use cases for plug computers? Are plug computers useful for anything besides network-attached storage? I know that you can hang a bunch of drives off them, maybe set up your own web server. But those uses have limited attractiveness in a home environment, and in a corporate environment, I suspect that ordinary servers would be used. I could see them used in an industrial environment, perhaps as environmental controllers or energy management devices, but the lack of I/O (keyboard and display) appears to limit their usefulness. Am I missing something? Or do I simply lack imagination? Do you envision a way to use these in a home environment, other than as a media server/poor man's Tivo? <Q> There are quite a few people (including me) using them with arduinos. <S> Currently it's only being a temperature sensor. <S> I run a MQTT Server on the sheevaplug and use php scripts to get data from the arduino and send messages into the server for receipt by a few clients. <S> I also monitor the sheevaplug usage via MQTT and post it all to pachube . <S> My plug also acts as a testing platform for testing websites and an ssh gateway to my network. <S> Other than that you've pretty much outlined the uses, using <5W is a big advantage over anything if you're running a computer 24/7. <S> A lot of people are doing home monitoring these days and it could become the next cult computer for that after the viglen mplc or the linksys slug <A> here are some past experiences + ideas I have been entertaining concerning homeplugs. <S> Although I agree that lack of keyboard <S> I/ <S> O may limit its usefulness, in some cases, it is actually a good idea. <S> For example, one past project I had worked on involved an embedded thin-client (it wasn't called plug computer back then...) <S> with only an uart IR barcode scanner. <S> And it worked magic for the guys on manufacturing / logistic sites. <S> There was little to no training required. <S> It is directly connected and bootloaded off of the network so it can be easily re-programed for different inventory sets. <S> It was cheap and extremely portable. <S> It can also serve as a cheap "rugged" computer replacement. <S> For home use, it can be easily used to as a gateway to home automation like X10 / Homeplug. <S> It can also be used to make a mother of all twitter-enabled devices (although you can do it much easier with arduino + ethernet shield or a microchip enc28j60). <S> Of course, most plug computer does not have video out, but some do, and you can probably get away with using a beagleboard for this purpose as well. <S> The beagleboard has HDMI out IIRC and runs a full blown Cortex-A8 processor. <S> As always, treat my ideas with a LOT of skepticism. <A> Right now you can get a plug computer for $50. <S> In a few years they'll be $5 or less. <S> At that point, you might as well buy the plug with the computer built in and use it for home energy insight, automation, and control. <S> Or build it into every appliance, or both. <S> Once the appliances can talk to the plugs and the internet, lowering your carbon footprint from your PDA in real time will be trivial. <S> Leave the house <S> and you can know that you're only consumption <S> is to keep the pipes from freezing. <S> If you notice a surge in usage when no one is supposed to be home, then you can check on things and see if the police are needed. <S> But keep in mind that it's just a development platform. <S> It's a small, low cost, easy to use, low energy computer. <S> Remove the plug and you've got a $50 computer that can be run off solar cells and an SLA battery. <S> Get a wifi or cellular model, buy a few thousand of them, attach a cheap webcam, and mount them on utility poles pointing at gas station signs. <S> Viola! <S> A real-time gas price website for all the gas stations along a few hundred miles of freeway corridor. <S> If you get each of a thousand people to pay $0.99 per month for the iPhone gas app for that one freeway, you've just made an income source that will keep you in the black for your next project, and you can sell your data to many other services. <S> Ignore <S> the fact that you plug them in - <S> that's just part of the built-in development kit. <S> They are $50 linux computers. <S> What can't you use them for? <A> "Classic" ideas: http://www.openplug.org/index.php/us/resources/innovation-plans <S> But If You connect Arduino to it then skyt is the limit ;). <S> Most advantage over using ethernet shield or even openWRT base router for it is having full Linux distro already installed. <S> You can ssh to it install python, pySerial, cherrypy and You got perfect web controller. <S> I did exactly the same using Asus WL-500W <S> but it was much harder <S> , router took more place on my desk, I had to use pen drive for storage and router was more expensive. <S> Of course lack of WiFi is disappointing, but GuruPlug will have it. <S> I all ready prerecorded GuruPlug and I will use my SheevaPlug as base for internet radio (I will connect it to good external sound card like sound blaster extigy or similar) //edit: <S> One more interesting idea: http://groups.google.com/group/wview/web/tutorial---wview-on-the-sheeva . <S> I also think about replacing power supply with battery (ther is also solar panel example on the Wiki), and use it in robot. <A> Remote serial and jtag access for embedded development. <S> Instead of paying for pricy networked jtag devices you can get an plug computer, a few usb to serial converters and a few amontec or other ftdi based jtag wigglers and get a lot more bang for your buck.
|
I have also been entertaining the notion of using Xdmx / VNC and a homeplug to create "extra" monitors for my linux workstation at home. Connect one to several cameras and GPS on top of your car, use another inside your car as the NAS, and build your own Google streetview car on the cheap for $200.
|
Is there a common netlist format? Is there a common netlist format that is portable between different schematic/pcb/EDA/CAD tools, and if so where is the format or reference so I can implement it? If not, does each package implement it differently, or are there a few standards that, if implemented, might give greater compatibility with a broad range of tools? <Q> EDIF - Electronic Design Interchange Format - is a vendor neutral format in which to store Electronic netlists and schematics. <S> It was one of the first attempts to establish a neutral data exchange format for the electronic design automation (EDA) industry. <S> See http://en.wikipedia.org/wiki/EDIF for more information and links. <A> I have not seen any standards. <S> Each package implements their own format. <S> Fortunately the format is very simple making it easy to translate between packages. <S> For example the gEDA netlist consists of records in the followingformat -- NETNAME <S> REFDES-PIN REFDES-PIN ... <S> here is a sample from one of my boards -- <S> unnamed_net39 <S> J28-3 <S> U11-12 <S> unnamed_net38 <S> J28-1 J16-2 <S> J27-1 <S> GND J16-3 C16-2 J15-3 C15-2 <S> You could easily read this netlist file into a data structure and translate itto a different format. <A> If they are saved in ASCII form it is quite easy to convert them, I can import most formats into the Pulsonix PCB software I use. <S> The only awkward one is Eagle; Eagle schematics, PCBs and libraries have to be converted by a specially written ULP. <A> I haven't seen a standard format anywhere, either. <S> However, as others have mentioned, netlist formats are very simple and usually text-based, and thus trivial to translate between various forms. <S> A netlist is simply a list of nets (wires), with a list of ports (pins of components) that attach on each wire. <S> Although the details differ, it's all a variation of the same theme. <S> In the past I've written several scripts in Perl and Python that easily manipulate netlists. <S> As a matter of fact, netlist files are a great exercise in beginner-level text processing. <A> Honestly, if you really want a netlist format that will in practice work with just about any tool, you have just two serious choices: VHDL <S> Verilog <S> Yes, these are full-blown hardware description languages, and using them as a netlist format could be considered overkill. <S> However, it is very easy, and if a tool spits out simple, structural VHDL or Verilog, you can be quite confident that you'll be able to pull the design back into just about any other EDA tool. <S> As a side benefit, most other netlist formats (e.g. EDIF) need to have an externally defined set of primitives -- either something vendor specific, or something like LPM. <S> With VHDL and Verilog, the lowest level leaves (primitives) can just be whatever you want (e.g. synthesizable RTL code, simulation models, black boxes, etc).
|
However, if you absolutely must have an actual netlist format, I second the suggestion to use the gnetlist format, which can then be converted to many other formats.
|
How much current do you require in Arduino and embedded systems projects? How much current do you require in Arduino/Sanguino or other embedded systems projects? After responding to the LM2575 inductor question I started to take a closer look at the TI power DC-DC converters. It would not bedifficult to replace the linear regulator + or'ing diodes on allmy Arduino/Sanguino compatible boards with a TI step-down converter. This would provide a >90% efficient conversion, input voltages from 5-15Vand a 2.5A output that is regulated and adjustable. What would besacrificed would be the ability to power off of the USB. The incrementalcost would be in the $5-$8 range. Wider range inputs are also possible. Is the 500mA you can get from the USB port all you ever need? Would this be useful in your projects or is it too little current? <Q> About the worst case current draw <S> I have seen from a higher-end micro controller is about ~200 to 300 mA. <S> This was the LPC2388 (ARM7, 32-bits) with the usb, emc, and all the more power hungry peripherals turned on running at the highest clock speed (288MHz internal PLL divided down to 72MHz). <S> Generally, I would highly recommend going to switching regulators if cost, noise, and complexity is not an issue. <A> I've been using my own custom arduino compatible. <S> I've actually gone with a 150mA voltage regulator because I generally don't need more than 75mA or so. <S> I have done a couple projects that required more than that - one that needs ~250mA and another that actually needed a full amp. <S> I've got another in the works that'll need considerably more to drive a motor, but I intend to bypass the regulator and only use the regulator for the ATtiny chip on that one. <S> So... 90% of the time I've needed 75mA or less. <S> If I need more, I've been able to get away with swapping out for a heavier voltage regulator like a 7805 (I picked my smaller regulator to fit in the same footprint). <A> My worst case current draw is around 320mA - Arduino, Ethernet shield, XBee, SD Card, and a few I2C devices. <S> I would seriously consider a switching regulator - in fact I often power Arduino mini pro + peripherals from a 5v switching regulator and bypass the on board linear regulator. <A> You are really asking two separate questions:1. <S> How much current can you drive through the Arduino and 2. <S> How much current do you expect your project to use? <S> Answering 1. is easier: Max current is 50mA / pin on the 328. <S> The Arduino has a fuse at 500mA total: <S> http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove <S> There really is no simple answer to 2 - this discussion leads into the importance of signal level vs drive level currents. <S> One goal should be to keep signal currents as low as you can get away with. <S> (This is really a separate discussion). <S> You can easily switch an amp with a TO-220 package transistor, and if you need more you can use relays to drive whatever current you like. <S> However, as a general rule of thumb I like to take extra safety precautions if I am going above about 12v / 1amp. <A> Even running an FPGA, microcontroller, and RAM only draws ~200-300 mA. <S> Though, if this device ever needs to be certified by the USB IF (i.e. you want to go commercial with it), you should be aware that during enumeration, a USB device is only allowed to draw 100 mA. After enumerating successfully, it can request 500 mA from the host. <S> The host can deny this request. <S> Now, most USB ports will feed you your 500 mA before enumerating, so you probably won't ever experience this limitation...unless you send your device to the USB IF for testing, in which case they will most certainly fail you.
|
The only time I ever need more than 500 mA is if I'm driving a bunch of LEDs.
|
Is there a Cortex-M3 with external voltage regulators? Does anyone know of an ARM Cortex-M3 microcontroller with both the 3.3V peripheral and 1.8V core voltages supplied by external sources? Everything I have found so far has an internal regulator for the 1.8V CPU core. My problem is that I'm working in a high temperature environment and the internal regulators all have a thermal shutdown circuit to protect the chip which shuts the 1.8V off at 125C. I would like to supply the 1.8V with my own extended thermal protection that will run up to 200C but have not been able to find a microcontroller that will accept one. <Q> Have you looked into Honeywell's HT83C51. <S> It is a 8051 compatible microcontroller rated to work up to 225C (and derated up to 300C). <S> I believe this chip is designed from the ground up to work in harsh conditions. <A> Even if you do, you will be violating the maximum temperature for the part. <S> It will not necessarily work, even at lower frequencies above its maximum temperature. <S> Remember the "absolute maximum" is for damage, not functioning. <A> I found one so far. <S> It looks like the Atmel SAM3S series allows for external regulators to provide power for both the <S> I/O and the CPU core. <S> The down side is that is does not have as much RAM (only 48 k bytes) as most competitors (typically 64 k bytes). <A> Microchip has MCUs <S> that are qualified for 150C operation. <A> Not a Cortex-M3 but LPC2101 ARM7TDMI <S> from NXP requires external 1,8V regulation. <A> The maximum operating temperature of the cortex M3 chips I've looked at is 125C - which is right about where you found the thermal shutdown protection. <S> You'll have to call the manufacturer for use beyond those conditions, but I expect that you won't get the answer you need. <S> You may need to locate the computing elements away from the heat, or use some active cooling solution because there are very few microcontrollers that operate above 125C. <S> If you want to play with pushing them beyond your limits, though, you're right, you need one that allows an external regulator. <S> They aren't ARMs, though, so if that's a core requirement then you may simply need to contact a manufacturer.
|
I believe both the PIC32 and AVR32 have internal regulators, but they are on accessible external pins and may be bypassed with your own power supply.
|
How do you develop software for the Arduino? Is the main way of programming the Arduino's Atmel MCU thru a Visual Programming environment such as Max/MSP? Or do you have to write typical C code? What are the different ways available? <Q> The main way of programming the atmel chips is using avrstudio a windows IDE or avr-gcc. <S> In C or assembly. <S> The arduino simplifies this to use a simple variation of c++ in its own simple IDE. <S> There is no visual programming method for arduino/avrs as far as I know. <A> I program the Arduinos and Atmel chips a couple of different ways -- <S> The quickest and easiest way is to use a uC with the Arduino bootloaderand use the Arduino IDE and libraries. <S> Quick and easy but can can belower performance depending on your task. <S> I find the command line a lot quicker than the ArduinoIDE. <S> Haven't played with AVR studio. <S> When I develop Arduino libraries I usuallyuse this method. <S> Program the uC using just AVR studio or from the command line. <S> No Arduino bootloader or libraries. <S> Porting the Atmelapplication code is easy. <S> This is my preferred method. <S> C from the command-line using Make. <S> EMACS for editing files. <A> I use Eclipse as my main IDE for my Arduino projects and write C/C++. <S> I wrote a tutorial on how to set up Eclipse with Arduino that you might find interesting. <A> Here's a good tutorial for programming the AVR ATMega chips in C, without the Arduino IDE. <S> https://www.mainframe.cx/~ckuethe/avr-c-tutorial/ <A> There is a visual studio addin in beta at the moment. <S> its free, if you want to be part of the beta then you just need to email beta @ <S> visualmicro.com or take a look at http://www.visualmicro.com <S> The arduino addin for visual studio provides intellisense and allows you to select arduino boards, libraries. <S> it also supports compile and upload from visual studio directly to the arduino <A> For avr I normally program in assembler using a text editor. <S> use avra or something like it to assemble and have my own simplified loader to load the programs into the device (command line). <S> http://www.dwelch.com/arduino
|
You can use the Arduino bootloader and libraries from AVR studio orthe command line.
|
What's the simplest Linux capable board I could make at home? I'd like to make a single board computer capable of booting Linux, with my low-tech garage tools (2 sided PCBs, reflow skillet, no plating through holes). What's the simplest hardware design I could choose? Are there any microcontrollers with enough onboard flash/RAM to run Linux/uCLinux? <Q> I'd like to see this too, but my gut instinct is to say "maybe, but it's a lot of work". <S> Even the smallest Linux distro is going to need around a megabyte of RAM to run. <S> This means at least 30 or so additional pins for the RAM controller in the microcontroller, and a couple of big RAM chips. <S> One of the simplest architectures I know that has Linux for it is the Atmel AVR32 series of parts. <S> The smallest, the AT32UC3A0128 comes in a relatively hacker-friendly 100-pin TQFP package. <S> This is at least amenable to hand-soldering, unlike most of the OS-capable embedded microcontrollers that come in BGA packages. <S> (the chips that have the little solder balls underneath them) <S> You can get an idea as to the complexity of a circuit using that chip by examining the EVK1100 eval board. <A> Linuxstamp is probably your best bet. <S> It's open and has the PCB drawings, schematics, etc available. <S> But as far as doing it at home - probably not. <S> There's some very fine pitches on some of the parts. <S> You're welcome to try, but it seems like a fair bit of consternation to me. <A> The Nintendo DS is capable of running uCLinux. <S> You can get a used one for cheap, the only peripheral you need to run Linux on it is a microSD adapter (can be had for $15 from dealextreme.com) and <S> a microSD (small ones are basically free these days) <A> You pretty much need a decent size piece of RAM and flash outside the MCU/MPU. <S> You could make a tiny PCB with 4MB of RAM, 2MB of FLASH, RS-232 transceiver, COM port, and the ARM. <S> You could get real fancy by adding ethernet, but that won't add too much real estate to the PCB. <A> I believe you are looking for something like the following http://hforsten.com/making-embedded-linux-computer.html
|
If I was going to make a bare bones Linux system, I think I would go with simple cheap ARM with a serial port.
|
What are the best free schematic tools out there? I'm sure there are plenty of schematic tools available. Which ones do you use/prefer? Feel free to also list tools which aren't completely free but very popular. <Q> The de facto standard (at least acc. <S> to my impressions) is Eagle CAD . <S> It is not open source, but there is a free non-commercial license availlaible. <S> It is limited in PCB production (2 Layers, 10x16cm) and can handle only one schematic sheet. <S> I like it a lot. <S> A good open source alternative is Kicad . <S> But I have not used it often enough to give good advice. <A> I use gEDA/PCB. <S> The file formats are open and ASCII. <S> The open fileformats make a wide variety of EDA automation tasks possible. <S> TheASCII format makes them easy. <S> I have switched from Eagle to gEDA <S> /PCB. <S> I have found gEDA to be a moreproductive tool. <S> The schematic capture is better but the PCB layoutseems more difficult. <S> The scriptability is what has made thedifference. <S> There are also tools for simulation. <S> Be careful of choosing a free version of an EDA tool that is crippledor a tool that locks you in to a specific PCB vendor. <S> There is alearning curve associated with any EDA tool or other complex piece ofsoftware. <S> It will be very time consuming to switch tools. <S> The footprint library that I use is available at http://www.luciani.org <S> Also I have a variety of <S> EDA automation scriptson my site. <S> As an example of gEDA/PCB I did a remix of the Drawdio circuit designthat ladyada did (CC 3.0 BY-SA). <S> The remix includes the EDA files anddocumentation. <S> All of the files are at http://wiblocks.luciani.org/remix/index.html <S> A couple of additions -- <S> XCircuit <S> Themost extensive example would be the open textbook at http://www.ibiblio.org/kuphaldt/electricCircuits <S> If you use La/TeX you can create inline schematics using macros. <S> This could be useful for very simple schematics <S> but I can seethis getting very cumbersome very quickly. <A> You haven't said what your schematic is for. <S> If it's purely an illustrative <S> schematic-- one that won't be used to generate a netlist (and/or PCB) <S> --then you may find that general-purpose drawing tools work very well, often much better than engineering applications. <S> For example, we often publish circuit diagrams on our blog, and write up projects that we contribute to books and magazines as well. <S> In situations like this, I use Inkscape to make great looking schematic diagrams that show exactly what I want to show. <S> (You can see a few examples in this article .) <S> It produces very clean vector-pdf output that make for good looking printouts. <S> It has the limitations that other EDA tools have-- a learning curve and less control over the visual output than an illustration package like Inkscape. <A> I tried it once, and it was quite easy to use. <A> In my eyes the best software is Cadsoft EAGLE . <S> Its the best schematic editor on the market. <S> The new version V6 is easy to learn and easy to use. <S> We also use it in university.
|
http://opencircuitdesign.com/xcircuit is an open sourcepackage that produces some very nice looking schematics. If you need to use a dedicated schematic package, as part of a PCB layout, then I'd also recommend gschem, part of the gEDA suite. I don't use it (I have a very good PCB CAD package), but TinyCAD is very popular.
|
Readable and educational implementations of a CPU in a HDL Can you recommend a readable and educational implementation of a CPU in VHDL or Verilog? Preferably something well documented. P.S. I know I can look at opencores , but I'm specifically interested in stuff people have actually looked at and found interesting. P.S.2. Sorry about the sucky tags, but as a new user I can't create new ones <Q> You may enjoy an article series I wrote on this long ago for Circuit Cellar magazine, Building a RISC System in an FPGA . <S> Happy hacking! <A> Get this book, I've got the first edition. <S> A few years ago I implemented their CPU in a little Flex 10K10 FPGA on a PCB I designed, with a couple of push buttons and a single 7-segment display for entering data and displaying the results. <A> A lot depends on what is your purpose of studying the code? <S> In other words, what does interesting mean to you? <S> If you are doing it in order to see how much complexity can go into a CPU, you may be more interested in studying the source of OpenSPARC architectures. <S> It will take a long time to dive in but you will get an appreciation for the overall big picture view of a complex microprocessor. <S> Then, if it is to study specific computer microarchitecture features, you will want to look at some straightforward RISC machines like the AEMB , a small and fast multi-threaded 32-bit RISC processor (shameless plug). <S> However, if your purpose in studying a processor is to learn how to design one yourself, your best bet would be to start with one of the simple 8-bit machines (there are many AVR, 8051, PIC examples on the net). <A> You may try examining some Forth CPU designs. <S> Forth is a simple programming language whose specification and implementation is defined by means of two stacks stack (one for data and one for return addresses). <S> Several small VHDL/Verilog processors are freely available: http://www.ultratechnology.com/4thvhdl.htm <S> http://www.jwdt.com/~paysan/b16.html http://www.jwdt.com/~paysan/4stack.html <S> http://www.cse.cuhk.edu.hk/~phwl/mt/public/archives/old/msl16/msl16.html <S> Some more links can be found here: <S> http://www.ultratechnology.com/chips.htm <S> PS. <S> Despite Forth being a fairly old and obscure language many modern stack-based VMs (Java, fast JavaScript VMs) have similar low-level design so learning about it can be fruitful. <A> PicoBlaze is nice, however it is not available in vendor-independent VHDL. <S> Some other choices are: A Picoblaze clone in Verilog (you should be able to find this easily). <S> Not sure if it is maintained Gumnut is a nice small core supported by a recent Ashenden book. <S> The tiny register machine/computer by Thacker (about 200 lines of Verilog) <S> Jan Gray's XSoC/XR16 (already mentioned here) <S> Also, if you are looking for a compiler for your CPU, it is most probable to get one for a 16-bit CPU. <S> Once there was Poderico's compiler from a C-like language to Picoblaze <S> but it has been taken off the web. <A> It's a minimal 8-bit embedded microcontroller, and the source code should be available. <A> Too late, however I provide a small answer. <S> There is a course named fromNand2Tetris from University of Jerusalem, this course is also present on coursera, I built the computer they created in that course. <S> I implemented the language in scheme to be able to see myself how the computer works in the least detail. <S> And I succeeded, the simulator they created in Java cannot do everything I wanted to see. <S> https://github.com/alinsoar/little-computer
|
You may have a look at the Xilinx PicoBlaze processor. Then, if what you want is to learn good coding styles and conventions, the LEON2 design is a good place to learn good VHDL coding style.
|
Suggested exercises for learning with Arduino I just got an arduino and have been working through some of the exercises in the tutorials, making good progress. When I'm learning a new programming language or tool, I usually work through a few steps: do the tutorials, modify the tutorial programs, get them to do new stuff, and solve a problem not covered in the how-to to make myself figure out how to do stuff. With Arduino, I have a bit of a chicken-and-egg problem. I don't have a good enough idea what I can do with it to come up with interesting problems to solve. What are some good problems/exercises I can tackle as a beginner to help myself learn more about what Arduino can do and how to do it? Problem statements only, please. Any instructions for solving them would defeat the purpose (though, it might make sense to point out what hardware is required.) <Q> To learn what you can do we should start with hardware capabilities ofthe platform. <S> The Arduino (and other uC system that uses the ATmega328 or ATmega644) have a basic set of resources that are brought out to pins on the uC -- <S> digital inputs - You use this to read a binary signal. <S> A voltage greater thanaround two volts is a one and less than 0.8V <S> is zero. <S> These are used to read the state of a binary device like a switch (mechanical, tilt, etc). <S> digital outputs Binary outputs. <S> Use to turn on or off a device. <S> LEDs, motors, etc. <S> With high current devices you usually need to add additional circuitry (like a transistoror motor driver). <S> analog inputs <S> These are used to read signals from analog outputs -- such as from a sensor. <S> Low cost temperature sensors can have analog outputs, light sensors, etc. <S> The analog input converts the analog signal into a digital value that can be usedby your program. <S> communications ports To communicate to the outside world a UART is provided. <S> Thisenables you to send ASCII strings to an external device (most people convert the UARTto a USB port). <S> There are two other protocols available -- SPI and I2C. <S> These areprimarily used for communications within a system. <S> Using these two communciationsinterfaces additional capabilities can be added to a system such as high currentlatches, analog outputs, real-time clock, SD storage. <S> The list of SPI and I2Cperipherals is long. <S> I presented an "Intro to Microcontrollers" at the MIT Barcamp in 2009.The handout <S> is at -- <S> http://www.luciani.org/not-quite-ready/not-quite-ready-index.html <S> Now that we have a summary of most of the capabilities what are your interests? <S> Here are some example projects -- robots <S> A lot of people do simple robots with their Arduino. <S> art <S> Add motion,motion sensing, leds, <S> sound music <S> You can create a numerically controlled oscillator (see http://wiblocks.luciani.org/docs/app-notes/nb1a-nco.html ). <S> You could createa midi device or an analog output sequencer that controls an analogsynth. <S> datalogger <S> A number of people are doing datalogging applications. <S> Temperature, humidity, light. <S> Performance measurements for physical activity, etc. <S> Energy monitoring. <S> control <S> A number of people are doing CNC control with the Arduino or Sanguino. <S> If I were starting I would purchase a copy of "Making Things Talks" (MTT) from O'Reillyand extend the examples. <S> MTT works as a cookbook and a reference. <A> The best beginners guide I have found is http://www.earthshineelectronics.com/files/ASKManualRev5.pdf <A> One suggestion is to get one of Zach Hoeken's Danger Shields from the MakerBot Store and try to do something awesome with it. <S> I used that to get started with the Arduino and going through its examples and modifying the code <S> taught me a lot about interfacing with more than just LEDs. <S> For a problem you can try to solve, how about building your own special purpose PC keyboard that hooks into a PS2 port for controlling a game? <A> You might find some of these articles interesting . <A> You should get a waveshield and make an xmas decoration that says 'braaaaainsss' when you push a button on santa's hat. <S> Or a different saying if you push his hands first. <S> How about that as a problem? <A> Take a look at this answer: <S> I understand Arduino: now what?
|
A number of artists create interactive pieces with the Arduino.
|
USB scope probe - request for comments and ideas Idea: Take one oscilloscope probe, and one USB cable. Cut the BNC connector off the oscilloscope probe, and the USB B connector off the USB jack and splice them together. Mount all the USB <--> analog circuitry inside the scope probe body and/or the USB A connector body. It would essentially compete with all the other USB oscilloscopes out there, but it would be in a single cable design - no extra boxes, etc. Is this a product you would like? What are your minimum specifications for this type of product? What are your ideal specifications for this type of product? Would this be any more useful or desirable than the current USB oscilloscopes available? My biggest concerns are: Obtaining the speed necessary to be reasonably useful without requiring a lot of components Synchronizing multiple probes into the computer (Getting nS accuracy without wiring the probes together seems problematic...) Fitting it all into the form factor and power limitations of a USB port (ideally 100mA unpowered hub ~0.5W) Keeping the assembled cost low I'd appreciate feedback on any or all of the above (what you want vs how to implement it). Ideally it'd be completely open source, but using very tiny surface mount parts it might not be easily assembled by hand. <Q> Multiple inputs are pretty important. <S> If you could figure out how to use one probe to trigger the others there would be some good potential. <S> A single probe useful but on a pretty limited basis. <A> I would certainly be interested in this. <S> Particular things that would appeal to me: Isolation from PC and from other channels Multiple synchronised channels Polished cross-platform interface software <S> Cheaper than the competition: the other self-contained units such as the handheld picoscopes . <S> I've used quite a few USB scopes, but the (single- and dual-channel) picoscopes trump the rest simply on the software at the moment. <S> To be honest, personally I'm not that bothered by the self-contained thing or the unpowered hub thing. <A> You might also be interested in: Digital Oscilloscope at fpga4fun. <A> Yes 1MHz, 1Msps, completely isolated from my PC's USB port 10Mhz, 10Msps Only if it were a lot cheaper. <S> The DSO nano is $89 and is self-contained. <A> See this interesting little AtmelTiny45 CPU based scope . <S> This could easily fit in a probe shell and gives basic functionality for a few bucks...
|
If I could find some good, cost-effective, multi-channel USB scopes that worked on any platform, had good software, reasonable specs and isolation between the channels, I'd be over the moon.
|
MD5 implementation for microcontroller Does anyone have any examples of the MD5 algorithm for a microcontroller (preferably an 8-bit one)? Our project is going to use a Microchip PIC18 series device. <Q> <A> Here's the MD5 implementation from the EtherNut (AVR based) <A> I would stick with a known reputable implementation of MD5, and stay away from libraries you find from 3rd-party vendors. <S> The original RFC 1321 which described MD5 has a sample C implementation. <S> Reminder: <S> the known weaknesses for MD5 are collision attacks, and not preimage attacks , so it is suitable for some cryptographic applications but not others. <S> If you don't know the difference you shouldn't be using it, but don't discard it altogether. <S> See http://www.vpnc.org/hash.html . <A> You can find a good description and some pseudocode for the MD5 algorithm wikipedia at http://en.wikipedia.org/wiki/MD5 <S> You might also consider posting this question on stackoverflow since it is geared more towards programming questions. <A> from the wikipedia page on MD5 : ... it has been shown that MD5 is not collision resistant as such, MD5 is not suitable for applications like SSL certificates or digital signatures that rely on this property. <S> and from the SSL researchers on the same page: <S> We also hope that use of MD5 in other applications will be reconsidered as well. <S> I understand that you probably don't want to hear this, but do you really need MD5? <S> It shouldn't be used for cryptographic purposes as it is too insecure (and there are boatloads of rainbow tables available). <S> If you are looking for something to just validate data, look into CRC <S> (code here ) which is computationally cheaper. <S> If you are using it for cryptographic purposes though, then may I suggest moving to SHA ? <S> The only problem is that most cryptographically secure algorithms do not run particularly well on microcontrollers. <S> I know it may seem like MD5 is "good enough", but the engineering way is to err on the side of caution.
|
If you are looking for a C implementation, the Microchip TCP/IP stack has an implementation of MD5 in the Hashes.c file.
|
Does this exist: Insulating material to cover circuit For example when you build a circuit you have the board and the components between them is air. Is there a clay like material that will act like air does? Application: you could bundle simple circuits into a ball, attach adhesive to the outside and throw them at things (LED throwie) <Q> As far as getting something sticky on the outside for use in throwies I would do that as a separate step once the circuit is insulated so you have more options and you can be more creative. <A> If you want something like clay, what's wrong with clay? <S> Just check it to make sure it's not conductive. <S> I think you'd have more difficulty finding conductive clay than non-conductive... <S> Here's Elmer's Tac 'N Stik , which is probably more like what you want: <S> Also, here are instructions for cooking up insulating dough and conductive dough . <A> We use this pink stuff as a conformal coating. <S> It is removable, which is great if you messed up and need to redo it. <S> EDIT: <S> We've discovered that when the pink stuff is exposed to temperature changes in a vehicular environment, it can crack and moisture gets through and can cause damage to the board. <S> You'll want to use something else (probably something that isn't totally hard) if you're project is used outside and/or on a vehicle. <A> There are also soft epoxy materials for electronic assemblies. <S> IIRC <A> Kapton tape is often used to cover and insulate circuits. <A> I've worked with circuits potted in wax. <S> They were in a housing filled with wax, but you could use something like a milk carton and cut it away when the wax has cooled. <S> The neat thing about potting with wax is that you can solder right through it. <A> Try some polycaprolactone, its a low temperature melting plastic. <S> http://www.shapelock.com/page2.html <S> Never used it before, but from the looks of things you should be able to melt it in an oven and handle it with your hands to mould it into something. <A> I would second some of the epoxy resins. <S> You can really easily mix some of the stuff up, and coat your electronics in it. <S> You can create a mold to shape the epoxy out of wax. <S> Make the final shape out of balsa wood or something (called the pattern), then melt some wax and push the pattern into the wax until the wax solidifies. <S> Then place your electronics in the wax mold, then pour in the epoxy. <S> You may want to brush on the epoxy to make sure you got it in all the right places and then put it with the rest of your epoxy. <S> And since epoxy doesn't stick to wax, you just pull it straight out! <A> Silicone, like Dragon Skin from Smooth-On , works great. <S> It's expensive though. <S> And if you don't want it to cure with tiny bubbles in it, you need to use a vacuum chamber (I have access to one at my university). <A> The wax, epoxy, and clay answers above might work, but if you want to have something tested with electronics, you want potting compound . <S> 3M Scotch-Weld DP270 ( datasheet ) and MG Chemicals' 832 series (different datasheets for color, strength, viscosity, hardness, etc.) are both popular examples. <S> See the MG Chemicals appnote here [pdf] for a description of the potting and conformal coat processes. <S> Conformal coat is almost what you want: It insulates, but it doesn't provide the structure you want. <S> It's a very thin coating (Like paint, but it's usually clear) <S> that provides a high dielectric between the components and the air. <S> Techspray, Humiseal, Loctite, MG Chemicals, and Chemtronics all manufacture it. <S> The other option is hot glue. <S> Every stick I've used is nonconductive. <S> Not sure how well it would work to make a ball, but it's worth a shot.
|
Epoxy Technologies (http://www.epotek.com) makes soft epoxy. There are plenty of things out there that you could use as a conformal coating to insulate the circuit (just search digikey).
|
How to I determine/ interpret values of autoranging multimter I have an autoranging multimeter and many AA batteries.... how do I interpret the readings when deciding to keep or discard AA (1.5 volt) batteries? <Q> Look up voltage curves for the chemistry of your batteries. <S> From this graph, when it reads 1.0V, there is roughly 20% power left, and when it reads 0.8V, roughly 5% power left. <S> Of course, it's hard to extract 100% of the power from a battery, since many devices require a certain voltage level to operate, and when it drops too low, they cannot run. <S> Depends on the design of the device. <A> Be careful not to confuse voltage with the amount of charge left in a battery. <S> The open circuit voltage of a battery probably changes very little until it's virtually dead. <S> However, over the same period of time the internal resistance of the battery my increase a great deal. <S> Also notice that in the interesting graph davr posted that it's for batteries discharging 500 mA. <S> So that means if you have a nominal 1.5V battery, you will want to short it with 3 ohm load and measure the voltage. <S> Careful, that means if you use a resistor, that resistor will need to be rated for greater than 3/4 Watts. <S> This also means you are using up your charge during your test. <S> You might want to run an experiment yourself and short a battery with a load mimicking a likely current draw for your purpose, and logging the voltage. <S> Determining the charge left in a battery is a non-trivial problem. <S> Many consumer products don't quite get battery monitoring right. <A> I am assuming Alkaline batteries -- <S> In the Energizer datasheets the capacity is specified down to 0.8V. <S> I would discard themif <S> they are less the 0.8V. <S> If it is a battery that I may notcheck too often then I might set the limit at a volt or so.
|
Depends on the exact battery, but you can gauge how much power is left based on the voltage:
|
Where can I fnd a header for this goofy chip I got this chip and didn't realize the pins were not the normal spacing. Anybody know where to find a header for it. BTW the chip is a re-issue of the old sound chip SN76477 <Q> That looks like the 0.070 spacing on 600mil centers. <S> Mill-max makesa socket for that. <S> See http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ED90227-ND <S> After you get the socket I would route a slot in the Vector board with a Dremel tool and glue the socket in place. <S> Run short jumper wires from the socketpins to pins on the Vector board. <S> (like Vector K24A or T42-1) <A> What you seem to have there is a "thin body" SN76477N. <S> Radio Shack/Tandy had it "custom packaged" in the USA. <S> It being an antique, I doubt you'll find anyone selling an adapter. <S> You could make one... <S> Buy a piece of copper clad board, a fine tipped etch-resist pen and some etchant. <S> Drill holes spaced correctly for the chip, draw on the tracks with the pen, submerse in etchant until all of the unwanted copper is gone. <A> This is not a header, but it is a cheap and easy way to get standard spacing: http://www.bgmicro.com/index.asp?PageAction=VIEWPROD&ProdID=12925&HS=1 <S> They also have the chips themselves: http://www.bgmicro.com/index.asp?PageAction=VIEWPROD&ProdID=12924&HS=1 <A> Hard to tell from the photo, but looks like common 0.1" pin spacing to me. <S> So it should plug into a breadboard just fine. <S> But you can take a 28-pin 0.6" width socket like this one from Jameco , cut it into two pieces along the three cross-braces, and remake it into a 0.4" width socket.
|
If it's the SN76477NF, which is the 0.4" across narrow version of the chip, then yes, a normal socket (that come in 0.3" & 0.6" widths and is what I assume you mean by "header") won't work.
|
In theory, is it possible to make a logic gate that uses zero current? CMOS greatly reduces the current draw of ICs because one of the complementary FETs is always in the non-conducting mode, so there is only a flow of current during the transition between states, which is just the amount of charge on the gate's equivalent capacitance and maybe some leakage when both gates are open momentarily. Is it theoretically possible to make a logic gate that has zero leakage while changing states (using any realistic technology), and the signal is just passed through the circuit as changes in voltage causing other changes in voltage? If not, what's the theoretical minimum? <Q> Yes. <S> Since current is changein charge over change in time, as the change in time goes to infinity thecurrent goes to zero. <S> Run your logic as slow as you can while meetingyour other system specifications. <S> Your homework assignment for tonight is to read the "Thermodynamics ofComputing" chapter from "Feynman's Lectures on Computation" ;) <A> It is not possible to make an electronic logic gate that functions even when its current is always zero. <S> However, it is possible to arrange CMOS electronic logic gates in such a way that the energy capacitively stored on the transistor gates <S> is later returned to the power supply, so it is using almost zero net power. <S> Once the system is powered up and all the bypass capacitors are fully charged, those logic gates can do an arbitrarily large amount of computation while pulling nearly zero current from the battery. <S> Such arrangements are often called non-destructive computing. <S> Also, there are many ways to build logically equivalent computational structures without any electronic devices. <S> Such non-electronic logic gates naturally use zero current, although nearly all of them require much more power to operate than their logically equivalent electronic logic gate. <S> non-electronic computing <S> Some non-electronic logic gates are listed in the article "Ten weirdest computers" . <S> A few more non-electronic logic gates that are apparently not quite weird enough to make that article: David Cary has designed a CPU to be built entirely out of spool valves, and is still pondering whether to power the thing with traditional hydraulic oil pressure, water pressure, or air pressure. <S> The fluidic logic gates have no moving parts, if you don't count the fluid moving through them as a "part". <S> (Is there an article on Wikipedia or some other wiki with a list of ways to implement the abstract concept of a "logic gate" ?) <S> non-destructive computing Non-destructive computing, also called reversible computing, Charge Recovery Logic, or Adiabatic Logic, involves gates that use almost zero power. <S> When a computational system erases a bit of information, it must dissipate a theoretical minimum energy of kT ln(2) -- the von Neumann-Landauer limit -- where k is Boltzmann's constant and T is the temperature. <S> Most logic gates erase a bit of information for every logic operation. <S> However, there are a few logic gates that preserve every bit. <S> In theory these non-destructive logic gates could use far less power than the theoretical minimum power of bit-destructive logic gates. <S> "Reversible Logic" by Ralph C. Merkle at Zyvex <S> RevComp - <S> The Reversible and Quantum Computing Research Group has some nice photos of their reversible CPU. <A> No, it is not possible. <S> The gate capacitance is a function of the transistor geometry and the properties of the transistor materials. <S> There will always be capacitance. <S> In an effort to minimise capacitance there will always be trade off between transistor speed, voltage breakdown, gain and other device properties. <S> Not only that, but in order to use the output of the gate, the transistor must drive any output capacitance. <S> Again, the output capacitance is a function of the wire geometry and the properties of the surrounding materials. <S> There are also other leakage effects. <S> Across the drain and source of any transistor in the off state and even some leakage current into the gate. <S> While these effects are for the most part negligible in actual silicon parts, you would come up against them sooner or later in your quest for a zero-current gate. <A> au contraire: <S> Your posed headline question can be solved with out using current, or any type of circuit. <S> http://www.youtube.com/watch?v=SudixyugiX4 <A> If you don't have to run the program to get the result , that would seem like a step in the direction of computing something for nothing, though their apparatus must have been dissipating some power.
|
You can make a gate that switches with zero current if you don'tmind waiting an infinite amount of time ;)
|
Securing code on an AVR/Arduino and delivering updates What is the best way to protect code flashed onto any AVR based device from reverse engineering? What is an easy way to provide updates to end users to flash on their own without disclosing the code? (Is it with a bootloader that decrypts an encrypted image?) Don't flame me for promoting DRM, I am in favor of open platforms--I am just curious how this would work. <Q> Look for the protection fuses in your datasheet and/or programmer documentation. <S> It's not perfect, but it protects you from simple attacks. <S> Second: <S> You cannot download firmware securely. <S> The AVR cannot self-program protected areas: http://www.atmel.com/dyn/resources/prod_documents/doc1644.pdf <S> The best you might be able to do is to use an encrypted token language (such as basic, or forth) and have the interpreter protected on the chip with a bootloader that can program the encrypted tokens into an open area. <S> When running, the chip would decrypt and execute the instructions on the fly. <A> If it's that important and you're particularly worried about competitors stealing your code, take out IP protection on your code segments. <S> You should be looking into this if you're going to try and make money out of a project anyway. <S> Certain elements of code can be either patented (for specific processing methods and novel algorithms) or registered as industrial designs (the look, layout and application of your code to a device). <S> You may wish to consult an IP lawyer on this. <A> If you wrote your own bootloader which accepted encrypted data over the serial port, decrypted it and stored it into code storage area, you could have secure code firmware update. <S> Each device could even have its own unique decryption key in your custom bootloader.
|
First: There are fuses on the chip that can be set to prevent external tools from reading the code off the chip.
|
Best way to install arm-elf-gcc onto a Linux machine Hey folks, I'm working on a device using arm-elf-gcc to compile code for a MakingThings prototype board. My development machine is a Linux box running Ubuntu 9.10. On a different linux box using Ubuntu I got arm-elf-gcc running ok by manually building and installing gcc, after 3 or 4 tries. I'm trying to pick the best way to install the toolchain, but there doesn't seem to be a best way AFAIK. Setting up on 9.08 and 9.10, both seem to fail except for when I manually build and install the environment. I have tried Emdebian packages and CodeSourery, and neither of those worked well. Does anyone have any other good suggestions for doing an arm-elf-gcc setup on a Linux box? <Q> The Lite version is just the GNU tools (no fancy IDEs, etc). <S> It installs cleanly into a single directory, you just need to set your PATH to point at it. <A> Here's a pretty good article that partly covers building your own cross compiler toolchain using crosstool-ng . <S> You may find it helpful as I did. <A> I think the best way is to manually build and install gcc in one try. <S> ;-) <S> Though this requires that you do it a couple of times for practice, and my own score was two tries last time (makeinfo was missing when building binutils, again). <S> I use my own scripts, which are similar but separate download and build. <A> Place your toolchain in something like /usr/local/arm-elf-toolchain and put the appropriate prefixes in your makefiles and you should be alright. <S> I can really recommend putting the toolchain in a seperate directory so you won't mess up your current toolchain(s). <A> I've installed the toolchain using tutorial from Madox . <S> After manual compilation and installation as described in this link everything worked like a charm. <A> I agree with Joby Taffey that CodeSourcery probably is a good choice. <S> However, some time back I started to play a little bit with the stm32 <S> (ST:s arm Cortex M3 mcu) and in the process I create this page. <S> http://www.fun-tech.se/stm32/ <S> http://www.fun-tech.se/stm32/gcc/index.php <S> Maybe it can help you in some sense? <A> If you're not averse to upgrading to a more recent version of Ubuntu, then you can just install an ARM cross-compiler from the official repository. <S> Versions 10.10 ("maverick") <S> and later have a gcc-arm-linux-gnueabi package, and a corresponding binutils. <S> These are in the 'universe' repository. <S> Source: dak <A> Note that this will only work to setup the toolchain for bare metal ARM development and NOT to cross compile for linux ARM targets. <S> For the sake of clarity, that means it won't work to compile a program which can run on linux running on the ARM. <S> Also, this installs the full toolchain, pretty much everything you need to do bare metal work on ARM.
|
The Summon ARM Toolchain script has worked wonderfully for me. I'd say CodeSourcery Lite is the easiest way.
|
How to convert a voltage range to LED brightness without a microcontroller? I have a hall effect sensor which outputs 0V when on the North pole of a magnet, 5V when on the South pole. It idles at 2.5V. I want to connect 2 LEDs to show the reading, one activated from 0-2.5V, the other from 2.5V to 5V. I could use the ADC on a microcontroller to read the sensor then drive the LEDs with two PWM channels. But, this seems like overkill to me. Can anyone suggest a better way? Without using a microcontroller? <Q> If you want to do this with just a single LED you could just use a simple comparitor to generate a PWM signal to power the LED. <S> Connect the positive lead of the comparitor to the output of your hall effect sensor and the other lead to a RC triangle wave generator. <S> For a good example of this type of circuit see http://www.solarbotics.net/library/circuits/bot_ornament_qlf.html . <S> Just replace the connection to the lower frequency oscillator to your hall effect IC and you will have a PWM LED fader with 0 digital electronics! <A> Maybe one of those tiny 6 or 8 pin SMD microcontrollers that are like a quarter inch square. <S> That wouldn't really be overkill, it might be $1, but to do it from standalone components you'd probably need quite a few different pieces. <S> The main issue is that the way to vary LED brightness is via PWM, so you'd need some kind of oscillator that you could vary the frequency based on input voltage. <S> Then use the output of the oscillator to drive the base of a transistor which is driving the LED. <S> For example this uber tiny microcontroller: ATtiny5 <S> 512 Bytes of In-System <S> Programmable Flash <S> 32 Bytes Internal SRAM. <S> One 16-bit Timer/Counter with PWM channels 8-bit ADC Analog Comparator. <S> Up to 12 MIPS throughput at 12 MHz. <S> 1.8 - 5.5 V operation. <S> Max <S> I/ <S> O <S> Pins: 4 <S> Package: SOT23 6 <S> Dimensions: <S> 1.6mm x 2.9mm, thickness: 1.1mm <A> Simplest but probably worst method: Connect the LEDs back-to-back, connect one leg to your signal voltage, and connect the other leg through a few kΩ resistor to a fixed 2.5 V source. <S> Then one LED will be on from 0 V to 0.5 V, off from 0.5 V to 4.5 V, and the other LED on from 4.5 V to 5 V. <S> Actual voltages would be determined by the color of the LED , and I think the brightness would only vary a little. <S> (brightness proportional to voltage), but <S> I'm having trouble thinking up a circuit.
|
You could probably get exactly what you want with some kind of combination of the ideas of precision rectifier (using feedback for turn-on with no dead zone) and voltage-to-current converter
|
How to build a USB controller having knobs, sliders, and switches How does one go about building an interface for a USB device that allows interfacing pots, linear/log tapers, and momentary/toggle switches to a computer? If someone could give me a high-level description, I would appreciate it. I can read spec sheets, so understanding details is not a problem as long as I know where to find the sheets. <Q> I'd use one of the Teensy boards. <S> These are Arduino-like microcontroller boards which have USB support. <S> Unlike the Arduino, they can appear to a PC as any sort of USB device. <S> This means that you can create your own custom USB keyboard, joystick, MIDI device, etc and have the PC use standard drivers. <S> The Teensy supports the Arduino IDE , or you can program in C and use LUFA (for USB support) directly. <S> Here are some project links to help. <A> I would use a microcontroller board like an Arduino. <S> You read the ADC and digital <S> I/Oand send ASCII characters to the PC using the UART->USB connection. <S> How much external hardware you need depends on the accuracy you require. <S> I would debounce the switches in hardware. <S> For the USB interface just write a simply parser so that you can query the readings. <S> For example if the PC sent the string "A00?" <S> the uC could send back the readingon analog channel 0. <S> "D00?" <S> the uC could send back the state of digital input 0.To change a digital output maybe something like "D00=1" or "D00=0". <S> These are short strings in a fixed length. <S> Should be very easy to parse. <A> I like using Arduinos, they're simple to program <S> and you can easily send data to your computer from the various inputs via the onboard USB connection. <S> The data can be sent to the Arduino programming environments Serial Monitor - which is useful for debugging. <S> I then use a program like Pure Data (PD) or Max MSP to receive the serial data. <S> Data can be sent out from these programs in all kinds of useful formats. <S> Cuz it's simple enough to do any kind of log curves or scaling in the software - you don't have to worry about buying expensive log pots or using hard to find values - just buy a job-lot of the same value and worry about the specifics later <S> (1K or 10K is normally easy to get). <S> This one's free: http://puredata.info/ <S> This one is the payed for swanky version, but it has a good demo: http://cycling74.com/downloads/ <A> Get an Arduino <S> Get a DangerShield . <S> Write code to send DangerShield sensor data to PC via RS-232 over USB connection. <S> Write custom app in like VB.NET or something to translate data into something useful on PC, like Win32 window messages or something. <A> I would suggest using PoKeys . <S> Very easy adding 55 digital <S> I/ <S> O, 7 analog inputs (12-bit), PWM outputs and more. <S> It can even be combined with something like this . <A> I would go with an Arduino or a Sanguino as most folks suggested. <S> Just google for them. <S> They are extremely easy to use and you can be up and running in a few hours once you have all the necessary components. <A> Take a look at ObDev V-USB AVR based projects: http://www.obdev.at/products/vusb/prjhid.html . <S> I think that this one might be just what you are looking for: http://www.fredrikolofsson.com/pages/hardware.html . <A> If you just need knobs, check out YoctoKnob: http://www.yoctopuce.com/EN/products/yocto-knob <A> You'll need to match some of the electrical characteristics, but the hard work of coding/USB comms etc. <S> is done for you and usually the comms protocols / input mapping is well known. <S> Chinese knock-offs of PlayStation-style USB controllers etc. <S> can be had for a few bucks, which is well below the price of hobbyist *duino IO boards etc. <S> and cheap enough to be disposable when you blow the first one or two up. <A> The GamepadBlock makes use of an ATmega32U2 together with LUFA to implement a full speed USB HID device to poll several original game controllers. <S> The ATmega has a hardware USB interface and getting started was easy since LUFA provides several demo projects.
|
I would thinkfor most applications the hardware internal to the microcontroller would be sufficient. An alternative which may or may not suit is to buy commercially available analogue joysticks / joypads (from $fckall on ebay china, or from the games store) and replace their analogue input components with your own, or just rip the main PCB out and transplant into your hardware.
|
Source a really big LCD character display I'm looking around for a large LCD character display (metre-ish long, 10-15cm high), and on the cheap side (of course) Any suggestions? Actually I think I meant LED display, max $150ish <Q> If it has to be LEDs, you could base it on this XMOS kit , using your own LED array. <A> Hmmm. <S> I'll assume that you mean an LED display. <S> If you are wanting to display a full character set, you might want to consider using several 5x7 led matrix. <S> See http://www.best-microcontroller-projects.com/led-dot-matrix-display.html for an introduction. <S> MAX7221 driver chips can be used to instead of multiplexing the rows and columns. <S> While the extra chip does add to the parts costs, it will mean bright letters and less pins being used. <S> Give the dimension of the display that you are after, you'd need to find a LED matrix which contains 10mm LEDs. <S> I don't see this as a cheap project by the time you assemble the LED matrix displays. <S> Good luck as it sounds like fun. <A> How about hooking several LCDs with a 10-15cm dimension together to form a larger screen. <S> Software can easily handle splitting the text to multiple such screens. <A> Could you work with these: http://www.littlebirdelectronics.com/products/7%252dSegment-Red-6.5%22-Display.html Cheers, Marcus
|
An LCD TV might be the cheapest option, with an MCU generating VGA.
|
Does a radio station main amplifier work at the speed of light? I'm having an argument with a classmate and we can't agree. He tells me that it's not possible for the amplifier of a radio station to amplify the input signal "instantaneously" (at the speed of light), because they work with very big powers (tens of kilowatts) and you can't accelerate the electrons that quickly. I insist that since it's an analog device, it will work at speed of light, and that you don't need to accelerate the individual electrons, but only the electric/magnetic fields. So which one of us is right in this particular case? Is there a delay in amplifying a signal for a high powered radio station? The radio station part is important. He agrees for example that a typical home audio amplifier is instantaneously. It would be great if you could provide a reference link for an answer (if possible). Wikipedia would be fine. But don't waste your time searching for one. <Q> you can't accelerate the electrons that quickly. <S> I think the problem lies in a misconception. <S> The electrons don't move at the speed of light, in fact if you could 'tag' an individual electron coming into a wire and then sense when it leaves you could measure it with a stop watch in a reasonable length of cable. <S> The effect of the electron, or in other words the wave that is generated when an electron is pushed into a conductor, can be sensed almost at the speed of light on the other end of the conductor, but the individual electron you pushed onto the cable will not appear there for some time based on current, voltage, etc. <S> So the amplifier does not accelerate electrons to anywhere near the speed of light. <S> It induces waves in the electrons in the cables, or amplifier, which are sensed by the semiconductors which induce waves in other cables and other semiconductors. <S> There is some inherent delay with every amplifier, but it's so small as to be unnoticeable by human ears. <S> Note that if amplifier introduced significant delay, then BBC broadcasts on NPR stations in the US would be delayed much more than the few hundred mS <S> it already is. <A> It really depends on what you're talking about. <S> The signal does not travel at the speed of light in the cables connecting to the antenna. <S> Cable propagation speeds are often around 2/3 the speed of light, for instance. <S> It doesn't travel at the speed of light through an amplifier, either. <S> Any filtering incurs a small delay , for instance, which is why filters are implemented using delay lines in the digital realm. <S> (It's not instantaneous through a home audio amplifier, either, so you're both wrong.) <S> :D <S> After it gets out of the antenna it should travel at the speed of light in air, which is almost c , and I don't know of any reason why this would vary with the amount of energy. <S> The sun puts out a lot more electromagnetic energy than a radio tower, and it still travels at c through space. <A> The signal may travel fast but the electrons do not. <S> Google electron drift velocity. <S> Speeds are measured in cm per sec or perhaps cm per hour. <S> Here is one pretty good hit http://www.eskimo.com/~billb/miscon/speed.html <A> Actually you do need to move the electrons around in the active component of the amplifier, for example the junction of a bipolar transistor, as the amplifying effect depends on that. <S> The junction is small, but you still get a delay in the pico- to nanoseconds range. <S> Along wires the signal runs at the speed of light in that medium, which is somewhat lower than the speed of light in vacuum. <A> I think the answer depends on the media and not the amplitude of the output signal; the amplifiers, in this case, and not the signal. <S> Electromagnetic waves (like the signals described) travel at the speed of: (speed_of_light) / <S> sqrt(permittivity_of_material <S> * permeability_of_material) <S> The speed of the signal depends on the permittivity (electric attribute) and the permeability (magnetic attribute) of the media, not attributes of the signal itself (it's amplitude, frequency, phase shift). <S> So it depends on the amplifiers themselves, and the differences in permittivity and/or permeability between the two, but not the amplitude of the output signal. <S> Your reasoning is better than your friend's in this case. <S> Source: http://wiki.answers.com/Q/Do_all_electromagnetic_waves_travel_at_the_same_rate <A> To debunk your friends argument, start with a single low-power amplifier. <S> He agrees that it works fast. <S> Now take 1000 of these amplifiers and connect their outputs together. <S> Obviously each one will work just as fast as the single one, so thogether they still work just as fast. <A> There seems to be this fixation on how fast electrons or signals move in wire. <S> That does represent a fundamental lower limit on propagation delay thru a amplifier, but that is swamped by other delays in most amplifiers. <S> The individual active components of the amplifier will have a greater delay, and then there will be delay associated with the bandwidth of the amplifier. <S> Usually there are deliberate bandwidth limiters in the path that represent the largest input to output delay. <S> The reason for the deliberate bandwidth limiters is to make it predictable. <S> Individual transistors or other active devices can vary significantly. <S> Device are chosen to still operate well up to the intended upper frequency or bandwidth. <S> The bandwidth or frequency limiters then guarantee that the active devices are only presented with frequencies they can handle. <S> If you give them frequencies outside that range, all kinds of undesirable non-linear effects can occur. <S> A radio transmitter in particular has very carefully tuned and usually sharp cutoff bandwidth limiting on its modulated signal. <S> There are practical reasons for this, but also legal reasons. <S> The spectrum of a transmitted signal depends in part on the bandwidth of the modulation signal, and there are legal requirements as to how wide that bandwith may be. <S> If the modulated signal weren't bandwidth limited in the transmitter, then the radiated signal would spill from the assigned band to a band assigned to another station, which of course is not allowed. <S> So the signal path from the input of a radio transmitter to the broadcasted signal always has some delay for various reasons. <A> (sorry couldn't help but add my dry humor as the question has already been answered correctly)
|
No radio station amplifiers and transmitters work at the speed of sounds, hence you hear the radio at the other end, whereas television amplifiers and transmitters work at the speed of light, as you can see the pictures at the other end .....
|
Amplifying instruments by measuring current in conductive strings The normal musical instrument pickup uses a magnet inside a coil, and the movement of a ferromagnetic string causes changes in the magnetic field, which then induce currents in the coil. Another possibility would be to use just a strong magnet near a string, and measuring induced currents in the string itself. This would only require a conductive string, not a ferromagnetic one. Does anyone actually use this method? Is there a name for it, or is it useless, so no one talks about it? I tried it last night, and it works, but the signal is very low (-50 dBV, for instance, vs -5 dBV for a magnetic electric guitar pickup). <Q> Does anyone actually use this method? <S> For stringed instruments, no, but the principle is used in many, many places. <S> is it useless, so <S> no one talks about it? <S> It's not useless, but it has some significant disadvantages, and other methods are simply far superior. <S> I tried it last night, and it works, but the signal is very low. <S> That is the main disadvantage. <S> Others are: <S> You are measuring low induced voltages in the string that is in contact with a conductor (human) which messes up the measurement <S> More advanced measuring techniques induce a voltage in the string, but again the human conductor is in the way <S> The strings are more variable in terms of electrical properties (resistance, capacitance, inductance) all of which affect the sound, and mean that two instruments might sound very different <S> The strings, being long, are not unlike antennas and inductors and are very good at picking up stray noise in electrical and magnetic fields. <S> You can be much closer to a lamp ballast with a coil pickup before picking up the AC hum than you can with a string pickup. <S> There's no galvanic isolation, so the amp has to be isolated from the AC line and high voltage sources, which pretty much rules out tube based amps. <S> Electrostatic discharge from the user into the string and conducted into the equipment is damaging, but even if it's suppressed you can't easily filter out the additional noise it causes. <S> Getting a good electrical connection to the string in a performance environment is difficult since it's hard to tin the metals used in many strings, and vibration, corrosion, and other environmental factors complicate it. <S> That's just the start. <S> Don't misunderstand, coil pickups have disadvantages too, but they are superior in many areas. <A> Yes, this method IS in use and has been for quite some time. <S> stringamp.com is a Danish company that uses the technique and carried the design forward, after another company went under (in the 1930s, I believe). <S> They have multiple leads from the instrument, to a belt-hung controller/pre-amp (6 controls for a 4 string violin), which I presume to be 4 tone controls and a balancing volume between the top and bottom pairs of strings (Presumption based on conventional 2-pickup, 3-potentiometer controls of 2-pickup guitars). <A> Moving coil and moving magnet phonograph cartridges (and other similar transducers) embody essentially the same principles as what you are describing. <S> As you would expect from your experiments, moving coil cartridges have a much lower output than moving magnet. <S> However, the fidelity is presumably better with moving coil cartridges. <S> If you can get an acceptable signal to noise ratio, I don't see any reason why this wouldn't work. <S> I would expect the timbre to be somewhat different, however. <S> You will most likely need an additional 10 to 20 db of voltage gain. <S> You might (carefully) try a high-impedance microphone input, or placing an op-amp in the signal path to get a bit more gain. <S> Given the eclectic nature and history of pickup coils (such as humbuckers) <S> and the demands put on musical instruments by the stage environment, I would characterize your application as a "specialized use. <S> " <S> There's no way to know ahead of time if the strings will be more sensitive to feedback, for example, without testing it first. <S> I once put a condenser microphone on a pillow, set an autoharp on top of it, and cranked up the treble. <S> The resulting recording was awesome. <S> Keep experimenting! <A> See this link for details on using a moving string as a pickup. <S> http://music-electronics-forum.com/t14952-2/ <S> The most practicle way is to use an 8 ohm to 20K ohm or higher miniature transformer (8 ohm side) attached across a string behind the nut and the bridge. <S> The string acts like the ribbon in a ribbon microphone. <S> Attach the high impedance side of the transformer to the amp input. <S> Also, attach one leg of the low impedance side to the high impedance ground side to minimize noise. <S> You can also pass a string or strings through miniatute toroid current transformers to obtain sound from each independent string or the combined strings. <S> Transformers are the most practicle way to boost the very low impedance of a guitar string in the .5 to 1 ohm range up to a higher more useable level without introducing too much noise. <S> The sound quality with this setup can be more acoustic sounding than the traditional sound of a high impedance guitar pickup that all have a resonant hump in the 2Khz to 5Khz range.
|
Place one or more magnets in the space between the neck and the bridge and listen for tonal changes as the magnet position is changed.
|
How much does it cost to etch your own PCBs? I am at the point that my projects are becoming limited by the space on my breadboard. Rather than buying more, I have decided to look into PCB fabrication. My question is this: is it cheaper to make your own PCBs for prototyping, or should I send my plans away and have them fabbed elsewhere? If you do make your own boards at home, how much does it cost per square unit (approximately) and what method do you use? If it helps, I am in Australia so I don't have many fab businesses close by. <Q> I often make my own prototype PCBs at home. <S> I made my own UV exposure unit for about £20, and use a cheap HP inkjet printer with Mega Electronics (UK) <S> Jetstar Premium film for the transparencies and Mega's FPC16 positive resist pre-coated boards, developed in sodium hydroxide solution and etched in ferric chloride. <S> The FPC16 costs about 1p <S> a sq. <S> inch, and the film costs roughly the same. <S> I can make a PCB in about 30 minutes (not including drilling), and can do 8/8 mil tracks without any problems. <S> Join the Homebrew PCB Yahoo group if you need more information on the various techniques that are available. <A> Yeah I do the laser printer transfer method, if you work in an office with a laser printer you could probably sneak a couple of prints for prototypes. <S> I would highly suggest using a laminator and not an iron for the transfers, you will get much more crisp results. <S> I regularly use the method for smd components with small lead spaces without any problems. <S> I use a mixture of muriatic acid, hydrogen peroxide, and water for my etching. <S> I would also suggest a fish tank air pump with a ceramic (not the blue ones, they will dissolve) aerator. <S> It will etch a 3.5 by 5 inch pcb board in about 8 min and the solution can be used over and over again if the aerator is left on in solution. <S> Laser printer $80, laminator $30, fish tank pump and aerator $15, muriatic acid and hydrogen peroxide <S> $8 and stack of 10 12" <S> x 6" copper clad boards about $15 dollars on ebay <S> so it's about a $150 dollar investment in the beginning <S> but you can cut most of your costs by borrowing a laser printer. <S> It is more than worth it though because you can design and test out your boards all within an afternoon so the prototype phase is much shorter. <S> I know this is a shameless plug but <S> here are some example results from my website http://www.aaronalai.com/ultrasonic-navigation and http://www.aaronalai.com/business-card <A> I'm in Australia too. <S> There are no Australian fab houses (as far as I know) which will do small runs without large setup costs. <S> I have used BatchPCB for commercially produced boards and found them to be good. <S> I etch my own boards where I can <S> - it's quite easy to do using toner transfer - a laser printer, some magazine pages, & some copper clad + ferric chloride etchant. <S> It probably costs a dollar or two a board - I don't really think about the cost, given that I only do low volumes. <S> I'm in Adelaide, I buy my stuff from Aztronics - it usually costs about $5 for a largish copper clad offcut, which lasts me a while, and about $10 for a few hundred mL of ferric chlroide, which again, lasts a while. <S> If you want more precision than you can get with toner transfer, you can use UV exposure for better results, combined with a bubble etching tank - you'll be able to do double sided boards too then. <A> A first step up from breadboard is probably perfboard, stripboard, veroboard or such. <S> The next might be etching copper. <S> Toner transfer is probably least involving (presuming you have other use for a laser printer) followed by photoresists. <S> There's also tape up and pens if you don't mind the handiwork. <S> It all depends on availability. <S> Simple designs on thick material can even be carved with a rotary tool. <S> Having access to a suitable router or a fab place changes the game of course. <S> Google around for those and maybe also "Manhattan method". <S> See if any of them is accessible. <S> You may be able to use many of them for different purposes. <A> I'd been producing my own boards for nearly 10 years. <S> But for me at least, it is no longer the most cost effective solution. <S> If you are looking for good English customer service, these are a few of tried during the past year (for low volume quantities): <S> internationalcircuits.com <S> pcbexpress.com <S> jetpcb.com <S> Regards <A> +1 for pcbexpress.com Great quality and price and good service. <S> I have used them a few times over the last 4 years and will continue to do so. <S> They are based in Texas, and they send the Gerber files to a shop in China that ships directly from there to your home/business.
|
With the prevalence of PCB manufacturers in Asia -- I just find it so much inexpensive for someone to do it for you.
|
Video overlay / on screen display architecture I want to take a NTSC/PAL component video and overlay graphics over it. I am aware of solutions that either use the max7456 overlay chip, or accomplish it with just an AVR but these seem to have limited resolution and are monochromatic. Ideally I would like to have something comparable to the performance of this setup . Here is what I know I will need: Video decoder (to digitize NTSC/PAL) Some sort of buffer/processor to overlay graphics onto the digitized frame Video Encoder (to re-encode to NTSC/PAL) The middle part is what I am not sure how to setup. Are there existing chips that will automatically do this overlaying for me somehow, or do I just need a sufficiently powerful MCU and RAM to buffer/manually manipulate a bitmap? Ideally I would like to have something low cost, and preferably a single chip solution. <Q> Something like an ADI Blackfin could do that, or an FPGA with some fast RAM. <A> I'm not sure about the overlay part, but you can generate an NTSC/PAL video signal on an AVR using AVGA . <A> I have been working on my project Super OSD which supports 192x128 pixel graphics and is open source. <S> I'm planning to migrate to a high resolution display - up to 512x384 pixels bilevel (black and white pixels) or 320x240 with 2-bit greyscale, on a PIC32. <S> A dsPIC33F with SPI and external muxes can easily do it (it's even possible without muxes or SPI, but you get less processing time that way), and it's available in DIP. <A> what about a BOB4 - http://www.decadenet.com/ not really cheap <S> but I used them in my last job to good effect <A> For OSD solution, an FPGA-based approach could be an alternative. <S> OSD can be achieved with an alpha-blending implementation. <S> The alpha-blending is an algorithm for mixing 2 images into one. <S> The good point is that this gives you the possibility to configure the level of transparency of individual picture elements. <S> In few words: being <S> x <S> and y the inputs and z the output video signal. <S> An alpha-blender circuit can mix them implementing the equation: z <S> = x.(alpha) <S> + y <S> (1-alpha) alpha is the coefficient or level of blending. <S> Then you can define "x" as the NTSC video and "y" as the overlay. <S> Everything (enc/dec and their required memory interfaces and the OSD) could fit on a single FPGA (if big enough).
|
Additionally, an FPGA could match your needs in case you may consider additional logic as the video encoder/decoder you mentioned.
|
Start off with embedded C with ATmega32 (ATmega AVR series) I have a ATmega32 board laying around and I figure it would be perfect to start off with microcontrollers. I once did some babbling in embedded C (thats when I got this board) but the flow was stopped due to some things. Now I have two questions: What is the best free resource to start off with C for the avr series. I know of AVR-GCC but was looking for some tutorials or free books to start me off. Should I directly jump to C or go through ASM first? I see there are many asm books around. So what is a better option? While searching the Internet, I found the Arduino bootloader for ATmega32 here http://retrointerfacing.com/?p=30 but the problem is I a hesitant to do some tinkering with the fuse bits and all. Is it safe to do so? <Q> Here's another one . <S> Personally, I prefer working in C. Making use of avr-libc <S> gives you good code portability within the AVR family. <S> However, if you're doing anything timing critical, you may have to resort to ASM. <S> If you have a parallel or "high voltage" AVR programmer <S> then you can always reprogram the fuse bits. <S> If you're using serial (In-System-Programming, ISP) then be careful not to disable the SPIEN or RESETENABLE bits as these will prevent you from being able to reprogram. <A> Join AVR Freaks . <S> You'll find lots of resources and help if you get stuck. <A> I would start off with C. <S> You may need an occasional snippet of ASM butfor most applications that would be about it. <S> The exception would bea bootloader if you decide to roll your own. <S> Dave Mellis put an AVR tutorial up on the MIT HLT wiki. <S> He discussessetting up the tools for the ATmega328 <S> but it seems generic enoughto help you with different devices. <S> See http://hlt.media.mit.edu/wiki/index.php/AVR_Programming <S> The libraries and examples at the Atmel site seem to be good. <S> I have used a number of snippets from their app-notes. <S> The I2C (TWI)library <S> I use in my RTC code <S> comes from the Atmel site. <A> I would go with Arduino first. <S> Lots of books, tutorials and example code. <S> And a great and nice community. <S> Then if you are familiar with Arduino, try out C with AVR-GCC. <S> I can not recommend ASM these days. <S> There maybe some corners where you may have to use ASM but most things can be solved with plain C. <S> With ASM you can learn some very details about how a microcontroller is working, but if you want to make things happen faster, I would stick to C or C++. <A> You can start off from C programming for microcontrollers by Joe Pardue. <S> Use AVRStudio5 and stick to http://avrfreaks.net ,you can get a lot of cool and helpful guys here.
|
The avr-libc documentation is a great source of information for C on AVRs. There's an Arduino HV programming shield available.
|
What is the purpose of a bias resistor? Could someone explain what "bias" is. And why do some devices need an external bias resistor? <Q> If your device is powered from a single voltage and ground, it can't output anything below ground. <S> In order to reproduce a signal that varies between +V and -V, you need to shift it upwards so that it varies from 0 to +2V instead. <S> The DC offset is the bias. <S> http://en.wikipedia.org/wiki/Biasing <A> The bias is the operating point. <S> For a bipolar transistor (BJT) <S> the bias resistor will maintain enough current intothe base so that the transistor is neither saturated (fully on) or cut-off (fully off). <S> Some BJTs come with an internal bias resistor to reducethe parts count in a design. <S> If you are switching BJTs on or off you don'tneed a "bias" resistor but you may need a resistor to limit the current into the base. <A> In analogue working, transistors (and before that, valves (or vacuum tube devices)) do not have a fully linear response, ie the output is not exactly proportional to the input over the full operating range. <A> For the AC input signal to be amplified correctly by the transistor,so that there is proper flow of zero signal collector current and the maintaince of proper collector-emmitter voltage during the passage of signal. <A> Biasing resistors are also used in RS485 interface. <S> There are two signals in the RS485 - A and B (some people call these TRX+ and TRX-). <S> And the RS485 transceiver outputs signal to the UART controller according to the difference between A and B as followed: <S> A-B > <S> 150mV <S> : outputs High <S> A-B < -150mV: outputs Low <S> If the A-B is between -150mV <S> and +150mV, the output state is unpredictable. <S> So the biasing resistors are required in RS485 circuit. <S> The biasing resistors in the RS485 circuit keep the A and B signal line a High or Low level in RS485 idle state.(See the below.) <S> A: should stays high state B: should stays low in idle state
|
If you are wanting a linear response, you move the input signal into the middle of the linear part of the operating range by using bias resistors (and you restrict the input signal such that it does not go outside the linear range).
|
Polyphonic sounds from a microcontroller? I can make monophonic sounds by toggling a single pin ( at a varying rate ) connected to a piezo buzzer. How can I generate two mixed audio signals in software to create polyphony? Here's the code I'm using to play a simple tune. #define F_CPU 8000000UL // 8MHz#include <avr/io.h>#include <avr/interrupt.h>#include <avr/delay.h>// number of timer0 overflows/sec#define INT_PER_SEC 31250// Frequencies (in Hz) of notes#define F_FSH_4 370#define F_A_4 440#define F_B_4 494#define F_E_4 330#define F_CSH_5 554#define F_D_5 587#define F_FSH_5 740#define F_CSH_4 277#define F_GSH_4 415// number of timer0 overflows for notes#define REST -1 // special case#define FSH_4 INT_PER_SEC/F_FSH_4#define A_4 INT_PER_SEC/F_A_4#define B_4 INT_PER_SEC/F_B_4#define E_4 INT_PER_SEC/F_E_4#define CSH_5 INT_PER_SEC/F_CSH_5#define D_5 INT_PER_SEC/F_D_5#define FSH_5 INT_PER_SEC/F_FSH_5#define CSH_4 INT_PER_SEC/F_CSH_4#define GSH_4 INT_PER_SEC/F_GSH_4#define SEMIQUAVER_TIME 60 // ms#define BREATH_TIME 20 // msvolatile uint32_t intrs = 0;volatile int32_t curNote = REST;// TIMER0 overflowISR(TIMER0_OVF_vect){ if (curNote == REST) intrs = 0; else { intrs++; if (intrs >= curNote) { PORTD ^= _BV(PD4); intrs = 0; } }}void play(int32_t note, uint32_t len){ int i; curNote = note; for (i = 0; i< len; i++) _delay_ms(SEMIQUAVER_TIME); curNote = REST; _delay_ms(BREATH_TIME);}int main(void){ /* setup clock divider. Timer0 overflows on counting to 256. * 8Mhz / 1 (CS0=1) = 8000000 increments/sec. Overflows every 256, so 31250 * overflow interrupts/sec */ TCCR0B |= _BV(CS00); // enable overflow interrupts TIMSK0 |= _BV(TOIE0); // PD4 as output DDRD = _BV(PD4); TCNT0 = 0; intrs = 0; curNote = REST; // enable interrupts sei(); while (1) { // Axel F play(FSH_4, 2); play(REST, 2); play(A_4, 3); play(FSH_4, 2); play(FSH_4, 1); play(B_4, 2); play(FSH_4, 2); play(E_4, 2); play(FSH_4, 2); play(REST, 2); play(CSH_5, 3); play(FSH_4, 2); play(FSH_4, 1); play(D_5, 2); play(CSH_5, 2); play(A_4, 2); play(FSH_4, 2); play(CSH_5, 2); play(FSH_5, 2); play(FSH_4, 1); play(E_4, 2); play(E_4, 1); play(CSH_4, 2); play(GSH_4, 2); play(FSH_4, 6); play(REST, 12); }} <Q> Then modulate each pin at a different speed, and you can play two notes at once... <S> basically the speaker is mixing them together for you. <S> More than two notes and <S> you will have to do it in software as mentioned. <A> The standard way of getting polyphony is to interrupt at some fixed interrupt rate (most often 8000 Hz or 44100 Hz), get a "high" (+1) or "low" (-1) (or something intermediate) from each sound source, add up all the numbers to get a total, then send that total number out the DAC. <S> As others have said here, with a bit of cleverness a high-speed PWM can replace a DAC. <S> The "microcontroller polyphony" page gives some more details and tips. <A> I think this nice old little PC DOS game gem used real polyphonic sound through the PC speaker: Digger . <S> I don't know how they made it, but you can download the C source code from the site. <A> This might help -> <S> simple PWM <S> DAC <A> you could simply add two square waves, and use fast pwm to output the "analog" signal to the speaker. <S> here's yet another different method if you like game sound, quick and dirty: https://gitweb.bl0rg.net/cgi-bin/gitweb.cgi?p=arduinisten.git;a=blob;f=projekte/soundz/arpeggio/arpeggio.pde;h=6ceb64a57916c094e87e5983c07b5dd1b4623083;hb=HEAD <A> If you're using software to time your speaker events, the easiest approach is probably to generate two independent data streams and alternate between them. <S> This approach can work pretty well whether the speaker output is controlled by an I/O pin or a DAC. <S> For example: int selector;uint16_t phase[8],freq[8] <S> ; void interrupt(void){ selector++; selector&=7; phase[selector] + <S> freq[selector]; DAC_OUT <S> = sinewave[phase[selector] <S> > <S> > 8];} The above is the essential approach I used in a PIC-based music box in 1996 (using assembly code rather than C). <S> Note that the interrupt rate has to be 8 times the effective sample rate, but each interrupt only has to do the processing for a single voice. <S> Note that if the output filtering is good, this approach will yield 3 bits more of effective DAC resolution than would adding the samples numerically and then outputting them, but it will generate a lot of noise at the sample rate and multiples thereof. <S> Filtering is thus even more important than it would be otherwise. <A> They used to do this on old game systems and in the days of " PC speakers ", but I don't know how. <S> First guess: <S> Think of the wave you would ideally make, then imagine distorting it into a heavily clipped square shape, then create that square shape by toggling your output at the appropriate times. <S> Would have lots of intermodulation , though. <S> Second thought: Can you greatly increase the frequency of oscillation and output analog signals PWM-style ? <A> I believe there is a tone library for the Arduino that does two tones. <S> You should be able to adapt the code to the AVR chip you are using. <S> There are also a couple of excellent waveform generation threadsat arduino.cc <S> If you decide to add a DAC <S> I have a numerically controlledoscillator example at <S> http://wiblocks.luciani.org/docs/app-notes/nb1a-nco.html Four independent output channels. <S> The quad DAC and reference is onlyabout $2 or so. <A> As has been mentioned you could do this the same way it used to be done with a PC speaker (which only supports on/off optionally attached to a PWM controller.) <S> Basically my understanding of the method is that you switch the speaker on and off fast enough that it's never fully on or off (a bit like how a switch-mode power supply works.) <S> This leaves the speaker constantly moving between on and off, generating an analogue signal. <S> The only gotchas are that you need a real speaker (I think a piezo moves <S> so fast it reaches full on and full off too quickly) and you need to be able to toggle the bit fast enough. <S> I did some experiments and came up with a maximum speed of around 5MHz which should be ample for an 11,025 Hz audio signal (probably the best quality you could hope to get.) <S> Of course 11025Hz @ <S> 8-bit is 11 kilobytes/second, which is much faster than the speed of a serial port. <S> It would only allow maybe a second or two worth of audio to be stored in the flash <S> , so you're pretty much limited to playing audio generated on the fly, providing that leaves enough spare CPU time to twiddle the speaker! <S> There are a couple of other methods to achieve this too, and it looks like there's already an implementation for the Arduino of the method described above. <A> You can just add the streams as described here: http://www.vttoth.com/digimix.htm <A> Play sound A for a moment, like maybe 50 ms then sound B and switch back and forth. <S> The idea is to switch faster than the ear can tell and it will sound like both playing at the same time. <A> Here is my code for playing 2 tunes at the same time. <S> Sorry, you have to register to AVR freaks to get access.
|
Well one easy trick is to use two pins with PWM, and tie them to the opposite sides of the speaker.
|
LED producing heat and best power supply I was wanting to get a bulk lot of small LED lights similar to Basic LED - 5mm Yellow . I want to put them in balloons so that the balloons appear to glow ina dark environment, so I have a few questions: Would the heat produced by these lights be likely to burst theballoons? I understand that most LEDs produce little to no heat. Is there a decent and inexpensive alternative that have a powersupply "built in" or attached? (so we dont have wires running from theballoons). Failing this is there an alternative that just need a smallbattery to be connected? <Q> 1) <S> The LED would be fine and never produce enough heat to pop the balloon.2) <S> You could make them into LED throwies . <S> Just a small coin cell batter and an LED. <A> Supposedly they stay lit 1-2 weeks. <S> The internal resistance of the battery limits the current . <A> Don't forget the resistor! <S> If you add a resistor, it will last for much longer on a single battery, and is less likely to damage the LED. <A> Depending on the type of LED, you may or may not need a resistor in a throwie configuration. <S> I wrote up an article examining some of the subtleties involved in that question; you may want to take a look. <S> (Spoiler: For red or yellow LEDs, DEFINITELY use a resistor.) <A> For simplicity of construction, get an led that will work on a 3v button cell without a resistor. <S> You can then make a "throwie" that can be constructed with just the led, battery and a bit of tape. <S> It won't make much heat at all, the button cell will have enough internal resistance so it won't act like a short though the led. <S> The alternative is to cannibalize some Ethernet cabling or old printer cables. <S> Run the cabling up the string or, alternatively, use the cable as the string itself. <S> This means one controller board and power supply can drive the LEDs at the smallest current possible, making the least amount of heat. <S> But really this is much more complicated, just stick some throwies in balloons and inflate them. <S> The only prohibitive thing is the cost of the batteries.
|
You could make LED floaties , just an LED taped to a CR2032 3V Lithium coin cell, put inside the balloon before filling it with helium.
|
SDHC card, a microSD shield, and Arduino Duemilanove I got a new microSD shield from LittleBird and am having some troubles with it. I downloaded the sample library that it said to used, threw in a microSD card and expected it to work... It won't initialise for some reason, and I have done a bit of googling and can't see how to get it working. Everyone just say use this library, use that one. Hardware MicroSD shield Arduino Duemilanove ( ATmega328 ) SanDisk (4 GB) microSD card (HC) Is the SDHC card part of the problem? I work off a Mac and even formatted the card on a Windows XP machine to fat 16, but still no luck. <Q> I am adding a microSD card to my new '644 board to make a low-cost data logger. <S> All my boards are 3.3 V, so I won't have the 5 V issues. <S> I have tried three different libraries and none of these initialize the cards :( <S> I have also tried three different SD and SDHC cards from two differentmanufacturers (all large capacity) and none initialize. <S> I have my logic analyzer on the board now, and I am reviewing thespecification. <S> I am almost certain that the SDHC is different. <S> There is no response to the initialization routine. <S> From a lot of googling I have found out the following: NB : (I have not verified this information, only found it ;) <S> Using the resistor dividers to translate from 5 V to 3.3 Vcan be problematic due to loss of edge speed due to theseries resistance. <S> I am not sure how much edge speed is lostor how sensitive different cards are to this. <S> Since this is not an issue for my 3.3 V board I wasn'tworried. <S> If the I/ <S> O pins are not at 0 V when power is applied to thecard the card may be startup in an unknown state. <S> Unfortunatelythe datasheet does not mention if there is a softwareinitialization procedure that can be used to reset thecard to a known state. <S> In version 2.00 of the SD specification the initializationprocedure changed. <S> I am not sure if the libraries supportthese changes. <S> Some people have reported success changing to low-capacitycards. <S> I was hoping to find a low capacity at the officesupply store, but the smallest they had in stock was 2 GB.I am suspecting that it may not be the size of the card,but the age (since most smaller cards are also older cards). <S> SPI support is optional for microSD. <S> I would be surprised ifcards <S> didn't support SPI since if is required for the otherformats. <S> I was hoping to find a list of cards that wereknown to support SPI, but I could not find it. <S> That is where I am at. <S> Unfortunately I probably won't havemuch time to work on this during the week. <S> My next stepis to go through the specification and write a simpleinitialization function and verify the output on thelogic analyzer. <A> Unless the library specifically includes SDHC support, it won't work. <S> SDHC and SD have different addressing modes and a few differences in their initialization routines, and it's enough to keep it from working. <S> Get a 2GB or smaller SD. <A> I got one of these, too, from SparkFun , and it only kind of worked. <S> I checked out the comments at the bottom of the product page, and there might be a couple of issues: <S> The size of your card 3.3 V -> 5 V incompatibility. <S> The last comment looks promising. <S> I used SparkFun's diode scheme to connect a 3.3 V pressure sensor to an Arduino, and it worked just fine. <S> See SparkFun microSD Shield . <A> I believe I have found my microSD problem! <S> Hopefully this will help someoneelse. <S> My main problem was a schematic error :( <S> While looking for the schematic errorI found a couple of other potential issues -- <S> For SPI operation all the RSV lines (pins 1 and 8) need to havepull-ups even though they are not used <S> (Samsung microSD datasheetpg 14 (version 0.3, Mar 7 2007)). <S> I am not sure if this is aSamsung requirement or a MicroSD requirement. <S> Also recommended arepullups on all the RDAT lines and the RCMD line. <S> At least 8 clock pulses are required before the card will give a responseto a command. <S> This wait is labeled NCR in the Samsung DS and has a minumumvalue of 8 (pulses) and a maximum value of 64 (pulses). <S> I have tried a Transcend 1GB and SanDisk 2GB uSD card. <S> Both initialize toidle state. <S> I am now going to finish the uSD libraries for my '328 and '644boards. <S> If I discover any other hardware or software issues I will tryto update this post. <A> I haven't any of these toys <S> but I saw this requirement for a TFT/LCD module including an SD slot :"You must use a micro SD card that supports the SPI interface, and is 2GB or less. <S> Please note that not all uSD cards support SPI." <S> http://www.robotshop.com/eu/4d-systems-3-2-qvga-touch-screen-lcd-3.html <A> It is unlikely that this is your problem, but the microSD standard does not list SPI compatibility as compulsory. <S> A while back I had a specific microSD that wasn't talking to my AVR <S> and I could have sworn <S> it was because it was missing an SPI interface. <S> Perhaps try another card of a different brand?
|
It looks like the initialization procedure is different forthe newer card.
|
When to avoid using a breadboard What are the cases where one should avoid using a breadboard? e.g. high frequency, noise prone circuits etc. <Q> Areas where the common breadboard does poorly: High voltage High frequency (above 10MHz) <S> Where the additional breadboard capacitance would present problems (oscillators, etc) Where glitches due to poor wire connections would result in poor operation <S> Where most of the parts are not through hole 0.1" (2.54mm <S> ) centers <S> For anything but on-the-bench <S> prototyping (ie, don't take it out of the lab and expect it to work) <A> Perhaps a better way to phrase the question would be when IS it ok to use a breadboard. <S> I'd say if the following cases are true it's probably ok to use a breadboard. <S> Rapid prototyping (not built to last) <S> Few connections external to the breadboard <S> Mostly thru-hole components <S> Low voltage <= <S> 12VDC Low frequency <= <S> 10Mhz <S> There are a few exceptions for example you can have more external connections if you use cables with multiple wires and good thru-hole style connectors like ribbon cables. <S> Don't try running lots of jumper wires from the breadboard to other devices or you will spend lots of time checking for broken connections. <S> Many SMD -> thru-hole adaptor boards are available online that will allow you to use SMD parts with a breadboard. <S> This also helps with the frequency issues as the clock circuit can be built on the SMD board while only the low frequency analog/digital circuits are passed to the breadboard. <A> When you want to use surface mount parts <S> When you want something that won't fall apart When you've only got one breadboard... <S> I use breadboards to help with circuit design, then make a PCB at home when I'm confident. <S> For surface mount parts, I often make adapter boards which can go into a breadboard. <A> I try to avoid them all the time. <S> I have found when I use the breadboard <S> I spend 90% of the time troubleshooting the breadboard. <S> I like to useVectorboard and hardwire the circuitry. <S> It does not take too much longer. <S> An advantage is that Vectorboard is inexpensive enough so that you can leaveyour circuits assembled. <S> See my Breadboard hints for an example and a listof supplies. <S> I would avoid a breadboard for all of the examples you listed -- high frequency,low-level signals, high impedance nodes. <S> I would add power applications. <A> I never use them. <S> I make a PCB at home if I need a prototype quickly. <A> Anything more than maybe 100mA of current. <S> You could probably push an entire amp through if you had to, but with just those little spring-grippers for contact, you could get some hot spots. <S> When I see a blog with an entire 8-bit micro wired up on a breadboard, I have to marvel at the sheer tenacity involved. <A> I'd agree with many of the above, although breadboards are useable for low-power mains voltage applications with suitable external safety precautions (isolation, current-limiting/fusing). <S> One thing you really shouldn't try to use them for is any sort of switching regulator. <S> SMD is asily handled with breakouts - SM discretes can be easily soldered to 0.1" pin headers. <S> The probability of dodgy connections means that larger designs are more prone to problems and should probably be avoided, but BBs are the ideal way to check out small bits of circuitry that you're not sure about. <A> what Adam said, but also high current. <S> The protoboards have high parasitic capacitance and inductance. <S> I use them to test pieces of circuits I know are OK, but not for larger systems. <A> Absolutely. <S> Just got burned trying out a large breadboard. <S> Honestly, I threw it away last night! <S> Still have a small one for the quickies though. <S> Will never buy one from eBay again... craptacular.
|
Mainly though, if your circuit can't take noise introduced by loose wires, a breadboard is not the right medium. Sensitive analog electronics, such as sensor usage
|
H-Bridges and Motor Stall Current How do I determine how powerful an H-Bridge I need to control a DC-motor? In particular, does an H-Bridge need to be able to supply the full amount of current a motor will use when stalled, or would it be okay to use an H-Bridge that supplies enough power for a motor under standard load (and then some, but not stall conditions), and if so, what happens if the motor wants to draw more power than is available? (Does the H-Bridge fry, or does the motor just stop?) <Q> A current sensor, such as a resistor in series with the load, is often used to protect the system. <S> A better solution may be found in Linear Technology Design Note 407 that is titled Dual Current-Sense Amplifiers Simplify H-Bridge Load Monitoring. <A> How do I determine how powerful an H-Bridge I need to control a DC-motor? <S> (e.g. a 0.3 ohm motor connected to a 12V battery will draw 40A at stall) <S> If you want to be able to drive the motor to full speed, then reverse it, it will draw twice that current. <S> If you have a current sensor, you can (with suitable control circuitry) limit the current to any value you choose, for a "soft-start". <S> This is usually a good idea. <S> A less complicated route is to have a current trip sensor which then turns off the H-bridge (do NOT short the motor out, it will overcurrent if it is spinning) if there is an overcurrent detected, then retry some time period later. <S> This has inferior performance to current limiting but will generally be adequate. <A> I like the above, but if you want the best protection try using a PTC resettable fuse in line with the motor that will break before your H-bridge is damaged. <S> Ideally you never want to stall your motor, so I'd design for ideal conditions, add 25-50% of overhead and then put a PTC in line with the motor that will trip when those conditions are exceeded. <S> I suggest the overhead because you never know what your robot is going to see. <S> I have a roomba that had a failing motor - the shaft kept getting stuck with friction. <S> The H-bridge couldn't drive it loose when it got like that, but if I applied the voltage directly to the motor with a 3A source then it would break free for a bit and continue running. <S> It was likely operating under increased load conditions before that occurred - but <S> it kept running. <S> The overhead will ensure that if you've misjudged the power requirements your robot won't just stop dead if it hits a snag.
|
If you want to provide full stall current, measure the DC resistance of the motor leads.
|
Does the frequency of a crystal influence its height? Here is a picture of two crystals: Does the difference of frequency explain why the 6 MHz crystal on the right has a lower profile than the 5 MHz one ? <Q> Influence, yes. <S> Determine, no. <S> For example, here's selection of shapes and sizes for the same spec crystals (and some ceramic resonators...) <S> The frequency is determined by the size, shape and cut of the quartz crystal inside the package, as well as where the electrodes are placed on it. <A> There seems to be a confusion between the size of a (quartz) crystal package, and the crystals' physical properties which include the crystal's size <S> and it's resonant frequency due to its piezoelectric properties. <S> In your photo, the crystal on the left appears to be a very common HC-49/U package size. <S> The one on the right is most likely an HC-49U/S . <S> From ICM, a crystal manufacturer, <S> By carefully polishing or lapping a crystal, it can be made to oscillate at any frequency." <S> ( source ) <S> In fact, amateur radio radio operators ("hams") historically were known to polish surplus crystals to their desired frequency, back when the cost of manufacturing was much higher. <S> The practice was sometime referred to as "rock grinding." <S> ( ref one & ref two ) <S> You can verify this by looking at a manufacturers' specifications for crystals in different packages. <S> E.g. <S> FOX through-hole crystals and ICM , where in fact the larger package includes overtone crystals ( page 3, PDF ) for higher frequencies (looking at HC-49/U and HC-49/S). <S> At fundamental frequencies they are often the same frequency range available. <A> And the size of the crystal! <S> With the usual AT-cut crystals the size is inversely proportional to the frequency - low-frequency crystals are larger than high-frequency ones.
|
"The frequency is a function of the thickness of the crystal.
|
Good filter design software for Mac OS X/Unix? I need to implement a simple lowpass filter for a data acquisition circuit (using stretch conductive fabric as a resistive sensor). Various sources have recommended that the best way to go about this is to use filter design software. I haven't found a filter design tool (calculator) that I like yet. The online ones I've found have been buggy/obnoxious. The best solution would be one with a nice GUI that works with Mac OS X. Alternatively a Unix/Linux solution could work. Windows is a no-go for me. I found this list: http://www.circuitsage.com/filter.html EDIT: I'm using this web-based one right now, specifically for active filters (which are more applicable for sensors as they are more stable with low frequencies). <Q> MATLAB is a pretty good place to start for filter simulation and design. <S> There is a filter design toolbox that is pretty useful. <S> However it does come at a cost. <S> For sensor applications <S> Butterworth filters are generally better as they have a maximum flat passband (at the expense of phase response and roll off). <S> That means that your signal amplitude will be flat throughout the frequency range. <S> Stay away from implementing a Sallen-Key topology active filter, it is very difficult to get all the components to be matched and maintain good accuracy, try doing a Monte Carlo simulation on a Sallen-Key circuit to get a better understanding. <S> Switched capacitor filters are good for steep roll-off and these are available in Butterworth filters. <S> These do need a single pole before and after them to remove an aliasing due to the clock signal of the switching which occurs anywhere from 50 - 100 times greater than your cut-off. <S> Alternatively use a simple single pole RC filter (active or passive) and feed into a higher speed ADC and then you can use digital signal processing on an embedded platform or PC to perform decimation and analysis. <S> This shifts cost and complexity from analog components to software and processing requirements. <S> Most importantly - ensure you comply with the Nyquist criteria and that you are sampling at at least twice the highest frequency, in practice <S> , this means sample at four - 10 times your highest frequency, to allow for filter roll off well below your ADC resolution level at the Nyquist rate. <A> Try Scilab , it comes with FIR and IIR filter design and simulation functions. <S> It's free! <S> There are Linux and MAC versions. <A> Depends what you mean by "simple lowpass filter" and what you need the software to do. <S> If you just want the -3 dB frequency for an LC filter: Google Calculator Wolfram Alpha <A> It designs <S> Sallen Key, Multiple Feedback, State Variable, and Biquad active filters. <S> The attenuation of a low-pass filter is about 12 dB per octave per 2nd order stage (buffer between stages).
|
Analog Devices has a filter wizard: http://www.analog.com/en/amplifiers-and-comparators/products/dt-adisim-design-sim-tool/Filter_Wizard/resources/fca.html
|
How do I connect components when using a circuit board with pads but no traces? Given a matrix board with soldering pads but no traces, how would you connect adjacent components (including the ends of the jumpers for longer stretches)? Some possibilities I've come up with: Solder the individual leads as usual, then bridge the pads with solder. For each connection wrap one of the leads around the adjacent component's lead before soldering the two pads (ensuring there's more than just solder joining the two components). I started with the former before I came up with the latter (which seems like at least an improvement), but I'm wondering if there's some even better solution I haven't come up with yet. <Q> Here's another interesting method of perfboarding, this guy does it with SMD components and really tiny wires. <S> He made a special little wiring pen for laying down the wires: Progressive Wiring Techniques <S> (source: davr.org ) <S> Personally I make solder bridges for pins that are in adjacent holes, for things further away <S> I use thin wires (though not as thin as the ones above) in adjacent holes to the things I want to connect. <S> Top of my board: Bottom of my board: <S> And no, I didn't just wire those pins all on the fly, I had drawn up a detailed schematic in advance. <S> There's no way I could keep track of so many wires just in my head. <A> I have tried both the methods listed above, and I can certainly recommend the second one over the first. <S> Trying to create solder bridges across the pads is not fun! <S> The solder tends to blob onto the pads, and it does not like forming bridges. <S> Heaven forbid if you have to make more than one bridge, then you end up creating one bridge, then destroying it as you try to create the second! <S> Perfboarding is an art, and requires a lot of thinking and forward planning to get neat. <S> Never try to create solder bridges without something conductive in between. <S> The best option is to use component leads to form the connections. <S> Most through-hole components come with leads much longer than necessary, so you can use this to your advantage. <S> If you need more material, you can use the snipped off ends of resistor legs, if you have them lying around. <S> This is much less tedious than trying to carefully arrange multiple resistor legs along the bottom of the board, not to mention a better use of space. <S> If your circuit can be less compact, then you can use strip board (a.k.a. Veroboard) which has long continuous copper strips along the board. <S> You can break the lines by grinding off the copper with a knife, scalpel or drill bit. <S> If you really want to be embarrassed about your perfboarding skills then look no further than: this . <S> This guy knows the art! <A> I always bridge pads with solder, even for big circuits. <S> It comes automatically after some practice. <S> These are two boards I've recently done (both of them deals with 220VAC) <S> alt text <S> http://lbw.axe-man.org/solder/thumb/t_RELAYV2B.jpg alt text <S> http://lbw.axe-man.org/solder/thumb/t_RELAYV2F.jpg <S> alt text <S> http://lbw.axe-man.org/solder/thumb/t_RELAYV3B.jpg alt <S> text http://lbw.axe-man.org/solder/thumb/t_RELAYV3F.jpg <S> I've built the second one directly from this breadboard version <S> alt <S> text <S> http://lbw.axe-man.org/solder/thumb/t_RELAYV3P.jpg <S> My first realizations were more "fuzzy" ... <S> this was a 8x8 led matrix I made more than 18 years ago, with NO MULTIPLEX: each led was directly connected to buffer output. <S> alt text http://lbw.axe-man.org/solder/thumb/t_LEDB.jpg <S> alt text http://lbw.axe-man.org/solder/thumb/t_LEDF.jpg <S> And this is my most "knotty" array cabling: <S> alt <S> text http://lbw.axe-man.org/solder/thumb/t_FPGA.jpg (full size pictures are on this page ) <A> Take a length of wire-wrap wire (30ga or so). <S> Strip end of wire long enough to bridge the two pads. <S> This leaves a short length of stripped wire and the remaining insulation, which now ends at point X. Solder end of wire to one pad. <S> Cut wire at point <S> X. Solder point X to the other pad.
|
In addition, you can use hookup wire on the top of the board for longer connections.
|
I don't quite understand this FET-BJT preamp circuit I see this circuit a lot on electret microphone preamps, but I don't quite understand it. The FET is operated as a common source amplifier, so it has gain, inverts, and has relatively high output impedance. So it would make sense to follow it by a buffer. The BJT is common collector /emitter follower, so it would seem to be acting as just such a buffer, right? It would be non-inverting, with near unity voltage gain, and low output impedance to drive other things without being degraded. The voltage signal from the FET is passed through the capacitor to the base of the BJT, where it's then buffered and shows up at the output of the BJT. What I don't get is why the FET's drain resistor is connected to the output of the BJT, rather than to the power supply. Is this some kind of feedback? Wouldn't it be positive feedback? (As the FET's output voltage increases, it pushes the base voltage upwards through the cap, which then pushes the output voltage upwards from the BJT, which then pulls the FET voltage upwards, and so on.) What advantage does it have over a circuit like this? <Q> Here's the deal. <S> The capacitor provides constant voltage at high frequencies across the BJT base-emitter + resistor combination. <S> This causes fairly constant current through the BJT and resistor, with some high impedance Z, probably determined mostly by the BJT base resistor Rb. <S> The FET has a high transconductance (gm = Iout / Vin), and the net gain is gm * Z. <S> This is the voltage across the FET drain-source . <S> The BJE emitter resistor has constant voltage across it, so there's a bias voltage added to that. <S> The constant current allows the BJT to act as a low-impedance output buffer (=Rb/beta). <A> The current flowing through the BJT (i.e. from collector to emitter) is going to be equal to the current flowing into the base times the amplification factor of the transistor. <S> I_ce = <S> beta <S> * I_b <S> ... if my memory serves me correctly. <S> The FET, on the other hand, can be generally thought of as "on" (letting current flow) or "off" (preventing current flow). <S> If the FET is "off" there will not be a path to ground for the current and no current will flow through the BJT (or conversely any current will flow to ground. <S> The impedence of the capacitor decreases in proportion to the product of the signal frequency and capacitance. <S> Z_cap = <S> -j <S> * omega * C|Z_cap| = omega <S> * C = 2 <S> * <S> pi * f <S> * C <S> I guess that's not really much of an answer to the question, but it's what I remember from "base principles." <A> What I don't get is why the FET's drain resistor is connected to the output of the BJT, rather than to the power supply. <S> The resistor you refer to isn't the drain resistor in the usual sense. <S> If the output were taken from drain, then the BJT and assorted circuitry could be considered an active load; you could replace the entire circuit "above" the FET with a small signal equivalent resistance. <S> If we label the base resistor \$R_B\$ and the emitter resistor \$R_E\$, the small-signal equivalent resistance seen by the drain of the FET is given by: \$R_{td} = R_B || \frac{r_e||R_E + <S> r_0}{1 - \alpha \frac{R_E}{r_e + R_E}} \approx R_B \$ <S> So, for small-signals, the BJT circuit approximately "looks" like \$R_B\$ to the FET. <S> The really nice thing about this is that \$R_B\$ can be made quite large so that the small-signal voltage gain of the FET is large. <S> In the 2nd circuit, the size of the drain resistor is limited by the DC operating point constraints. <S> For example, let's say that you have a 3V supply and a DC drain current of \$I_D = <S> 100\mu <S> A\$. <S> The drain resistor in the 2nd circuit obviously must be less than \$ 30k \Omega\$ for a positive DC drain voltage \$ <S> V_D <S> > <S> 0 <S> \$. <S> But in the 1st circuit, the DC current through \$R_B\$ <S> is <S> \$I_B = <S> \frac{I_D}{1 <S> + \beta} \$. <S> So, \$R_B\$ can be much larger than \$30k \Omega\$ yielding a much larger voltage gain. <S> Of course, if the output were taken from the drain, we'd have a very high output impedance. <S> But, we're taking the output from the emitter node. <S> The voltage gain there is only slightly less than at the drain: \$v_{out} = <S> v_d \frac{r_o}{r_o + r_e||R_E} \approx v_d \frac{r_o}{r_o + r_e} = <S> v_d\frac{V_A}{V_A <S> + \alpha V_T} <S> \approx <S> v_d\$ <S> Where \$V_A\$ is the Early voltage (tens to hundreds of volts) and \$V_T\$ is the thermal voltage (about \$25mV\$) <S> But, the resistance looking into the output node is much less than looking into the drain node: \$r_{out} <S> \approx r_e||R_E <S> + R_B(1-g_mr_e||R_E) <S> = <S> r_e||R_E <S> + R_B(1-\frac{\alpha R_E}{r_e + R_E})\$ <S> So, the 1st circuit offers much higher voltage gain but somewhat higher output resistance than the 2nd circuit. <A> This circuit is often called a Shunt Regulated Push-Pull (SRPP). <S> Normally it is implemented using tubes. <S> In the alternative circuity the output emitter follower runs in class A and relies upon the emitter resistor for pulling down the output for a negative going signal. <S> This can cause distortion, especially if the load has significant capacitance. <S> With the SRPP when the output is going negative, the FET is conducting dragging the output low through the BJT emitter resistor while the BJT is being turned off by the signal coupled through the capacitor to its base <S> This allows the circuit to drive the output close to the ground,the BJT may even cut-off completely. <A> It is interesting. <S> It is important that the bias resistor on the base of BJT to be high enough. <S> If is almost the same value like drain resistor in the second diagram is no deal and in simulation you will obtain no benefit. <S> If the bias resistor is high enough, the BJT is a voltage follower. <S> That means in AC that the drain voltage is the same in the base of BJT and almost equal in emitter. <S> But that means you will have no AC current on the emitter resistor, the both connections of it being at the same AC potential. <S> Dears it is a bootstrap kind of connection that makes the drain impedance of FET very high, increasing the amplification of the system comparing with the second version. <S> It is also interesting that the output from emitter gives low output impedance but output from drain it is the same like a transconductance amplifier, high output impedance proper for reactive charges when the current should be constant (remember recording heads of analog tape recorders).
|
The capacitor provides a path to ground (drawing current away from the base of the BJT) for "high frequency" signals.
|
Zigbee starter kit, any suggestions? i want to start a home automation project, so finally i choose zigbee as the communication system between the devices.I need something easy to start, so, what do you recomend to buy? there is some nice starter or development kit, with something like RS232 or USB output, just to forget about the zigbee protocols and issues, i need something that almost works out-of-the-box... thanks!Br <Q> Digi's online store has an XBee 802.15.4 <S> Starter Kit <S> that includes: <S> (2) XBee 802.15.4 <S> w/ Wire Antenna (1) <S> RS-232 Development Board <S> (1) USB Development Board (1) <S> RS-232 Serial Cable <S> (1) <S> USB Cable (1) <S> Power Adapter <S> (1) 9V Battery Clip (3) <S> Adapters <S> This kit will not only let you start talking with the XBee modules, but actually program them as well. <S> You can see a complete review of the kit from The ZigBee Project blog. <S> There's also a more basic kit XBee <S> Wireless Communication <S> Starter Kit at Trossen Robotics: [2x] XBee 1mW <S> Communication Module <S> XBee <S> Explorer USB <S> XBee Explorer Regulated A to Mini B USB Cable <S> And as always, you can pick up individual modules, Arduino shields, and accessories at SparkFun.com . <A> After spending the last 8 months working on my engineering project involving XBees for my degree, I would recommend a breakout board from ladyada with an FTDI usb to serial cable for programming and an XBee. <S> The board exposes DTR, RST, CTS, RTS, TX and RX for the XBee and regulates the supply voltage down to 3.3V. <S> For automation purposes, there's no reason to go pro unless you live in a mansion imo. <S> The breakout board uses a level converter to switch between RS232 levels and TTL levels required by the XBee, but if your controller outputs serial on TTL levels, I believe you can omit the MAX232 chip or something to keep it at TTL. <A> I would recommend one of my ZB1 Boards ;) <S> The ZB1 is an Arduinocompatible board with an XBee <S> (Maxstream Zigbee) radio and a USB port. <S> There are a variety of accessories and software examples on the site. <S> The XBee's are very easy to start with. <S> There are a variety ofantenna options and a couple of power levels. <S> The downside is thatXBee's cost around $20-$25 each. <S> XBee's can also run standalone. <S> You can setup the devicesto periodically wake, perform a measurement or control task, transmitdata and go back to sleep. <S> With a 0.1% duty cycle (transmit 1sec and sleep 1000 seconds) you can get around a year or two on 2AA cells. <S> I did a Zigbee Overview for the last MIT IAP. <A> That gives you a way to have your computer directly talk over Xbee (with the USB explorer) and then a microcontroller that can carry out actions on your behalf (the XBee Adapter + arduino). <S> I'm not recommending the Arduino XBee shield, because it blocks a lot of the outputs from the Arduino. <S> That XBee adapter kit from AdaFruit looks to be a lot more flexible, even if it does require you to breadboard things together instead of having the nice shield stacking action. <A> How about the Atmel Raven ? <S> It's a usb stick with zigbee. <A> I'm a fan of the freaklabs freakduino since it's an Arduino compatible board that includes the ability to sniff 802.15.4 traffic for easy diagnosis of problems. <S> I have two freakduinos and an XBee <S> Pro module with AdaFruit's XBee breakout board. <S> I've honestly found the freakduinos easiest for getting started. <S> Even better, the freaklabs forums see many ZigBee/XBee/802.15.4 related questions and answers. <A> If you are into the home automation, why don't you opt for real thing? <S> It's called Z-Wave , a the facto industry standard for wireless home automation (the next X10), and there are hundreds of products Z-Wave enabled. <S> Digikey has boards and dev kits, and there is even a small power plug linux box with Z-Wave and ethernet embedded. <S> http://www.z-wave.com/modules/Products/?id=66&chk=94b8927269761c1a0c94de9268724ddb <S> http://web1.zen-sys.com/modules/Products&Techonology/?id=33&chk=7c18247ff46da755b3d1753888e2a342 <S> http://www.tricklestar.com/US/300ZW_US_W.html <S> http://www.ionicsplug.com/stratusplusplus.html http://www.digiwave.dk/en/programming/an-introduction-to-the-z-wave-protocol/ <S> http://www.digiwave.dk/en/programming/an-introduction-to-z-wave-programming-in-c/ <S> http://www.smarthome-products.com/p-625-homepro-zcu201-z-wave-usb-interface-euro.aspx <S> http://plugcomputer.org/plugforum/index.php?topic=1462.0
|
I'd check out the XBee USB Explorer from Sparkfun, an XBee Adapter kit from Adafruit , an Arduino, plus 2 XBee units.
|
Should I default to pull-up or pull-down resistor with tact switches? I understand the basic use of a pull-up or pull-down resistor, including the specific case of using it with a tact switch. When both are an option I was wondering whether I should favor one over the other and if so, why? <Q> Some times you can gain a reduction in current by choosing one over the other. <S> For a momentary switch this would not be the case. <S> If all other things are equal I would favor a pull-up resistor. <S> Some microcontrollers (like the Atmega series) have inputs that can be configured with an internal pull-up. <A> One advantage not yet mentioned for using pull-ups rather than pull-downs is that when using a pull-up, one end of the switch must be tied to ground; when using a pull-down, it must be tied to VDD. <S> Exposing ground or VDD means there's some possibility something else might get shorted to it. <S> Generally, shorting something to VDD is apt to be more damaging than shorting it to ground. <S> Further, exposed connections run the risk of electrostatic discharge; discharge into VDD is often more damaging than discharge into ground. <A> When both are an option <S> I was wondering whether I should favor one over the other and if so, why? <S> If both are a option, then I like to ground stuff. <S> It just feels better since ground tend to have less noise (even thou <S> this is not always true)
|
Using only pull-ups (internal or external) does provide some consistency.
|
Can I Filter This Split Power Supply? I've got a battery powered synth that uses two 9v batteries to make a split rail power supply (±9 and ground). I'm trying to use a regular AC-DC power adaptor to replace the batteries. The adaptor outputs 12v and I'm regulating it down to 9v with the LM317 voltage regulator. To get the required -9v I'm using the ICL7660 CMOS voltage converter. The problem I have is with the noise created by the power supply, when i hook up the synth it works, but there's some oscillations and artifacts on the audio output. Does anyone know if there's a way I can filter out this noise? here's the circuit so far - <Q> I would use the ICL7660S instead. <S> A couple of benefits -- <S> The S version switches at 35KHz which is above the audio range. <S> The S version can switch 12V. <S> If you did a +-12V conversion you could do a <S> + <S> -9V linear regulation on the output. <S> This will reducethe noise. <S> You should be able to add a series inductor and another capacitoron the output. <S> I am assuming you are using ceramic caps (X5R or X7R). <S> The load regulation of these switched capacitor converters is not thatgood under load. <S> I am assuming that your synth only needs currents around 20mA orso. <S> Check the specs for the voltage and current limit specs. <A> Add capacitors between each power rail and ground. <S> They'll act like short circuits to the high-frequency noise. <S> I see that you have one between the -9 V rail and ground-- <S> that's a good start. <S> The type of capacitor you use can make a difference. <S> Electrolytic caps, for example, are relatively cheap, but they only deliver their rated capacitance at low frequencies, so they're not as good for filtering out high-frequency noise. <S> I've had good luck with tantalum capacitors in this kind of application, but be careful that you don't plug them in backwards, as they will explode. <S> Be double careful with the negative rail, because "backwards" might be the reverse of what you think. <S> For both rails, you want the plus on the capacitor connected to the more positive terminal, which is ground for the -9 V rail. <A> Not really an answer but an alternative. <S> For low current circuits you can use an AC adaptor without the rectifying bridge (the one that gives a low-voltage sine wave on it's output) or just a 220/110V->12V transformer and add two half-wave rectifiers (one diode for +12 and one for -12V). <S> This way won't need two separate secondary windings on the transformer. <S> Then you can regulate the voltage using one 7809 and one 7909 (but don't forget the capacitors on these). <S> PS.
|
You could probably just remove some components from your adaptor but be extra careful when dealing with 220/110V circuits.
|
What is the coolest way (using passive cooling only) to step 12V DC down to 5V DC I'm building a project that needs both 5V and 12V rails which will draw about 1A on the 12V and 0.5A on the 5V. I was thinking of using a 7805 to produce the required 5V but this could generate some significant heat. I am not so much asking if it is acceptable to use a 7805 (I just need a mini heatsink), but rather: are there any ways of doing it cooler? Any tips would be great. <Q> Instead of using a linear regulator, which has relatively low efficiency (~50%), use a switching DC-DC converter (efficiency around 80-90%). <S> " It looks like the LMZ12001 would do the job-- up to 1 A at 5 V, and it accepts input voltages from 0.8-20 V. http://www.national.com/pf/LM/LMZ12001.html <A> One of the main issues with regulators like the LM7805 (and linear regulators in general) when you step down from large voltages is that a lot of the energy is dissipated as heat. <S> Depending on what your other requirements are, like noise, stability, EMI considerations, you might look into some of the highly integrated switching regulator modules offered by TI, like the PTN78000W family . <S> That part in particular is nice because of the adjustable output, so you can produce a variety of supply rails off of one part. <S> Cheers! <A> Since you only need 2.5W on your 5V, don't think you need a heatsink too. <S> Lineage has some good DC/DC regulators: <S> http://www.lineagepower.com/category.aspx?NID=5e1812f4-fb02-49f4-ba31-6e312010f40d <S> I'm assuming here that you need a non-isolated converter ie. <S> your 5V does not need be electrically isolated with a transformer from the 12V. Non-isolated dc/dc are cheaper and smaller.
|
Fear not, because if you are willing to put up with a bit more complexity and cost there is another option: Switching regulators , specifically in this case buck converters, which work off of a completely different principle. Switching regulators (aka DC/DC converters) can step down 12V to 5V step without generating too much heat. A decent one to start with is National's "simple switcher. If you are limited to passive cooling only and you have some significant power draw from your load, you might risk thermal overload.
|
Shielding Techniques for Digital Sensor What shielding techniques would be best suited for a digital sensor (3 wires - Pwr, Gnd, Sig) in a noisy environment (specifically fluorescent lighting)? Twisted pair (trio in this case) works well for differential voltages, but I suspect it won't be effective here even though the current in the wires is balanced. Does shielded wire require a separate ground wire, or is it acceptable to use the shielding as ground? Should the shielding be ground at both ends, or only at the PCB? Edit: Sensor is connected to PCB via ~1m of cable. <Q> I suggest you purchase / check out a copy of Henry Ott's "Noise Reduction Techniques in Electronic Systems". <S> It talks about these things. <S> Don't ground the shield at both ends, as this creates a ground loop. <S> The PCB end is probably the best place to ground the shield. <A> You can use the shielding as the ground wire. <S> Given that the sensor current is probably tiny, the impedance of the shield will be very low. <S> It doesn't matter whether you ground it at the sensor or not. <S> What you're trying to do is reduce the size and impedance of loops in noise can be induced. <S> With a digital signal, you should be relatively impervious to noise, anyway. <A> Try using some ferrite beads. <S> They're the big lump at the end of some cords, like USB cords and power cords. <S> They filter noise pretty well. <A> You could probably try filtering out the 60Hz noise using a simple RC filter. <A> If your question is one of signal integrity, are you sure you have a problem? <S> If so by how much and at what frequencies? <S> Are you doing impedance matching between the driver and the transmission line? <S> If so how? <S> If your worried about EM emissions from the cable, which i bet are quite high with a single ended digital signal then the best solution is to create a small pcb for the sensor to live on along with a differential line driver. <S> General question, whats the clock frequency of the signal? <A> Are you sure the problem is noise coupling onto the cable? <S> Is there any chance the ballast is producing a big enough magnetic field to saturate the sensor itself?
|
You should ground the shield at least on the PCB.
|
Why are Atmel AVRs so popular? A recent question asked about the advantages/disadvantages of various types of MCU. AVRs seemed not even worth a mention given the answers. Why then does it seem to an outsider that AVRs are experiencing a rush of popularity? Is this solely due to the Arduino, or is there something else that makes the AVR an especially good microcontroller? <Q> The AVR family has a lot of good, inexpensive, hobbyist-friendly devices with nice peripherals, low power consumption, and good cross-platform support. <S> Yes, Arduino is a big part of it. <S> But I think that Arduino came to exist the way that it did -- and to the success that it has -- partly due to those features. <S> Good: <S> They work well. <S> Easy to program in C for most basic functions. <S> Adequate documentation. <S> Inexpensive: <S> Lots of $3-$5 parts, available from major distributors in small quantity. <S> Hobbyist friendly: <S> Parts in through-hole packages-- <S> a big contrast to many of the chip families out there today. <S> Newer AVR (e.g., xmega) devices are less so. <S> Nice peripherals: Built-in oscillator, flash memory, on-board RAM, serial ports, ADC, EEPROM, and the other goodies that make it possible to run a single MCU on a protoboard to do basic stuff, without too much hassle. <S> Low power consumption. <S> AVR's major pitch point these days. <S> Suckers can run on a battery almost forever if you know what you're doing. <S> Good cross-platform support: <S> The AVR was designed with C support in mind-- not as an afterthought. <S> GCC support came early, and a big open source community developed around that. <S> It's still one of the best MCUs that you can develop from any platform with free tools. <S> This is a big one with respect to the other families, many of which use proprietary compilers or have lackluster gcc support. <S> Even PIC was pretty late to the game with good free C compilers. <S> As for why there wasn't much about it in the replies to your earlier question, I think that (1) you're seeing small sample bias and <S> (2) many of the answers were specifically to discuss non-AVR solutions-- because so much of the discussion on this site is AVR/Arduino-centric. <S> Most of the microcontroller families aren't represented in your list as of this writing-- including some that I use regularly, and others that are among the most popular in the world. <A> I started out using PICs but later switched to AVRs. <S> I switched because there's GCC for AVRs. <S> This gave me an environment that I was used to, for free, and let me compile code on Linux/OSX, not just Windows. <S> Although there are plenty of C compilers for PICs these days, some even for Linux - they all have their own quirks which I didn't want to learn. <A> From what I have seen AVRs have experienced a rush of popularity only in niche marketslike hobbyist tools and rapid prototyping applications. <S> AVR has done an excellentjob of getting cross-platform tool support on Linux, MAC and PC. <S> Everyone I talked to that is using microcontrollers in OEM applications is eitherusing PIC, some sort of ARM variant or an MSP430 (only for low power applications). <S> I have yet to come across anyone using an AVR. <A> Microchip's PIC is number one in 8-bit MCU sales and the AVR is fifth. <S> That could explain why the AVR doesn't get mentioned as often as other devices. <A> Arduino is irrelevant or you'd be asking why is Arduino so popular and not why AVR. <S> Arduino is a product of the same things that made AVR attractive. <S> It's another product, another devkit. <S> AVR is not popular in units delivered where 8051's in devices and PIC's in smartcards or whatnot have massive numbers or in cellphone and PC markets where the AVR doesn't even compete. <S> Instead of popular , you could say AVR is attractive . <S> And it is. <S> You get a real compiler, programming software and hardware designs, docs, samples, libraries, all free as in freedom. <S> You don't have to fight vendors and wonder if you're code size limited or hear that your compiler has been discontinued or won't run on any operating system from this decade. <S> If not before, then once you've been bitten enough times, you'll appreciate open tools and docs where nobody dictates what you can and can't do or know.
|
The main points already came out: It's available and inexpensive, requires very little components or board features (clocks, buses...), is easily ISP and above all, there's good software support. AVR's have been "popular" for a while completely regardless of Arduino.
|
Cheapest way to add wifi to a project I need low power wifi for a not-very-data-intensive application. What modules or chipsets should I look at? Other than low cost and low power, I have no restrictions. The cheaper the better. This is for a high volume product, so both hobby level (since I can trace it back to an oem module) and oem level suggestions are welcome. <Q> There is a list of suggested wi-if modules in this very closely related question: ideal-wifi-to-serial-or-spi-bridge <A> I haven't used this chip myself, but I've looked at the Epcos B30810 series before. <S> They're about $6 in low quantity, and below $2.50 in large quantities. <S> Digikey has them in stock. <S> Unfortunately, their datasheets are behind a signup form. <S> I'd also look at the Atheros chips. <S> I think the most recent low-power one is the AR6003 . <S> I don't know how much it costs; I suspect you'd have to buy it from Atheros directly. <S> I'd be a little wary of the 0.4 mm spacing on the BGA pads-- <S> below 0.5 mm generally costs extra. <A> The router needs to be not-so-new in order to be cheap, and must support Serial/USB or JTAG ports on board <S> OpenWRT <S> ( DD-WRT may work too, but I haven't used DD-WRT for this purpose) <S> See OpenWRT supported hardware page for information on what hardware is supported (note that DD-WRT supports more hardware). <S> Router firmware already has a web server (for serving and admin page), a linux kernel (usually Busybox ), and most everything else you need to have a functional WiFi interface. <S> Since OpenWRT is.. you know.. <S> open , you can do whatever you want on the router side of the equation. <S> Many routers have USB connectors built in. <S> Others have pads on the PCB that can be soldered to. <S> This provides the router/microcontroller interface. <S> One solution is to get the router to do most of the interfacing for you (i.e. run a web server / web client, which the router/openWRT does already), and have your microcontroller just respond to get data requests or push data to the router via the serial/JTAG connection. <S> As an example <S> the D-Link DIR-601 can be found bought for about $5, has a serial port pads (some soldering required) and supports OpenWRT, albeit the flash space is a bit tight. <S> Low power and small form factor <S> this device surely isn't, but you cannot beat the price. <A> Check the WIZnet WIZ610wi modules . <S> It is not clear from the website but <S> AFAIK they have a normal TCP/IP stack hardwired in addition to the WiFi<->Serial bridge. <S> EDIT: <S> Unfortunately it seems it does not have a TCP/IP stack for client use. <S> You need to connect to the MII interface with their W5300 (which handles TCP/IP with 8 sockets) or some other MAC to get TCP/IP. <A> The problem you are going to run into is that the big boys like Marvell and Broadcom will not talk you unless you are someone like Apple. <S> What I have has luck with is someone like Wi2Wi who acts as the bridge to vendors like Marvell. <A> Try this http://ruggedcircuits.com/html/yellowjacket.html Features <S> 41mm <S> x 31mm <S> Microchip MRF24WB0MA WiFi module: 2.4 GHz 802.11b/g/n transceiver with built-in PCB antenna, range up to 400m (1300ft) <S> FCC certified and WFA certified 1 Mbps operation infrastructure and ad-hoc network modes <S> The microcontroller includes: 32Kbytes FLASH (512 bytes used for bootloader) 2Kbytes SRAM 1Kbyte <S> EEPROM <S> 6 10-bit analog inputs, 3 timers, serial, I2C, and other peripherals
|
A very cheap way to add WiFi to a project, is to use a WiFi router as WiFi hardware. ATmega328P microcontroller with 16 MHz 0.005% quartz crystal.
|
Current Sources - Usage and Projects I came across this page on building your own current source . What are current sources used for in real-world applications? The only places I've seen them used are textbooks. Do you have any suggestions for some fun weekend projects involving a current source? <Q> The page you point to uses a current source to drive an LED which is a very popularreal-world application and is also a good weekend project ;) <S> The color temperature of the LEDs changes with current so keeping the current constant is useful for some applications. <S> I have used current sinks to test power supplies. <S> A typically power supply testwill be to run the power supply at it's rated current to verify proper voltageregulation. <S> Your multimeter may use a current source to measure resistance. <S> Pass a currentthrough an unknown resistance and measure a voltage. <S> Within circuits a current source (and sink) can be used to bias transistors (likea differential amplifier circuit). <A> Stepper motor drivers are constant current sources made by switching the motor windings on and off at high-frequency. <S> They monitor the current on sense resistors and adjust the duty cycle appropriately. <S> If you want some examples of the loosy (not switch-mode) <S> kind then Ethernet and CAN use simple resistor current sources and current mirror circuits to limit the current spikes and reduce EMI when transmitting. <S> Another example are laser diode power supplies. <S> The diodes are extremely sensitive to over-currents and have a sharp U(I) characteristic at the operating point. <S> Even small fluctuations in voltage can cause large currents and destroy the diode. <S> One more example is the diode testing mode of a multimeter. <S> It will source a little more than 1mA to allow you to check diode and transistor polarity and forward voltages. <S> PS. <S> All these examples are really constant current/constant voltage since their maximum output voltage is limited by the power supply voltage. <S> In fact both kinds of real sources have a limit: current sources won't work if the load resistance is too high and voltage <S> sources won't work if the load resistance is too low. <A> Solar cells behave like current sources-- <S> their voltage remains relatively constant across different light levels, while the current changes roughly linearly. <S> I've seen current sources used in solar call testing before. <S> LED brightness is proportional to current, so if you made an adjustable current source, you could make a dimmable LED flashlight-- that would be pretty cool. <A> <A> Many sensors and transducers out there are easy to instrument with constant current sources. <S> RTDs are the first thing that come to mind, but really any resistive based transducer can be driven with a constant current source and then all you need to do is monitor the voltage drop across the element with something like an instrumentation amplifier to measure its output. <S> Like endolith mentioned, current sources are very important in many IC's, especially analog IC's including, amplifiers, op-amps, digital-to-analog converters. <S> If I am remembering my basic amplifier design correctly constant current sources are common in the input stages of many designs to ensure proper biasing in the input FETs or BJTs. <A> Op-amps often (always?) use a current-source driven differential amplifier as the input stage, and it is this that confers the high-impedance to the input of the op-amp. <S> A current source provides a fixed current, regardless of the voltage across it. <S> So the impedance of a current source is the ratio of change in voltage divided by the resulting change in current. <S> Since for a current source, current doesn't change, the ideal current source therefore has infinite impedance. <S> Real world current sources do pretty well, 10's of megohms being easily achieved.
|
Current sources are used to linearize transistor amplifiers , and as I understand it are used all over the place inside of ICs . Current sources can also be used in battery charging applications where youneed to maintain a constant current to properly charge a particular chemistry of battery.
|
What's the best bootloader for an embedded Linux board? I'm designing an embedded Linux board for use as a web-based controller. It will be based around an Atmel AT91SAM9G20, which uses an ARM926EJ-S core. Anyone have particularly good or bad experiences with bootloaders? More broadly, how should I go about building/choosing a Linux distribution for this board? <Q> Both the bootloader and Linux distribution depend on what your final application is. <S> RedBoot and uBoot are both popular bootloaders for embedded Linux. <S> They support writing to flash, loading code over serial/ethernet etc. <S> But, for a deeply embedded device, a very minimal loader might be better, leaving everything else to linux. <S> If you need access to a lot of software packages, you might try Debian's ARM port. <S> For anything else, I'd recommend OpenEmbedded or Buildroot - both are configurable build systems for generating linux kernels and filesystems with only what you need and nothing else in. <A> I think your best bet for bootloader is U-Boot <S> It has a port for the processor you're looking for in it's "arch" folder, and it's probably one of the most popular bootloaders. <S> You might look into the atmel board folder of the source for an idea on how to configure your code around your chip. <A> I've used U-Boot before and it is quite good, very flexible. <S> You should contact Atmel to see what SDKs they offer. <S> If you have the space in Flash then Debian is a good choice. <S> It's pretty large but being able to install a package with a simple "apt-get" is much easier than having to try and cross compile it yourself. <S> I use the TIAM335x for my projects and people in the BeagleBone community <S> have even made available tar archives of Debian already cross compiled for the ARM. <S> Installing the root filesystem is then as simple as untarring the provided archive. <A> I have not much experience with bootloaders, but I can answer this question: <S> How should I go about building/choosing a Linux distribution for this board? <S> It has a large package (application) collection for ARM and other architectures. <S> There are some distributions dedicated for ARM, but after 3 years of messing around with devices like Raspberry, BeagleBone etc. <S> - I feel Debian has more packages working on ARM than ARM-specialized distros.
|
You should definitely use Debian as base of your system, because it's the most versatile Linux ever .
|
ATTiny13 -- avr-gcc Hello World uses over 100 bytes? I'm trying to write a program for the ATTiny13. My problem is that it has huge size constraints. Well, when making my first Hello World program, it took 100 bytes of program space just to make a light turn on and off! Are there any options I can give to avr-gcc to shrink this size down? Also, what is in the crt0? I'm not too keen on AVR assembly so I don't understand it much.. I do not want to have to drop to assembly for this project.. <Q> You can use avr-objdump -d .elf <S> to see what's being generated: Let's analyze it a little: [jpc@jpc ~] <S> avr-objdump -d <S> avr.elf <S> | sed -e 's/^/ / <S> ' | pbcopyavr.elf: file format elf32-avrDisassembly of section .text:00000000 <S> <__vectors <S> >: 0 <S> : <S> 09 c0 rjmp <S> .+18 <S> ; 0x14 <__ctors_end> <S> 2 <S> : <S> 0e c0 rjmp <S> .+28 <S> ; 0x20 <__bad_interrupt <S> > 4 <S> : <S> 0d c0 rjmp <S> .+26 <S> ; 0x20 <__bad_interrupt <S> > <S> 6 <S> : <S> 0c <S> c0 rjmp <S> .+24 ; 0x20 <__bad_interrupt <S> > 8 <S> : <S> 0b <S> c0 rjmp .+22 ; 0x20 <__bad_interrupt <S> > <S> a: <S> 0a <S> c0 rjmp <S> .+20 ; 0x20 <__bad_interrupt> <S> c: 09 c0 rjmp <S> .+18 <S> ; 0x20 <__bad_interrupt <S> > <S> e: <S> 08 c0 rjmp .+16 ; 0x20 <__bad_interrupt> 10: 07 c0 rjmp <S> .+14 ; 0x20 <__bad_interrupt> 12 <S> : <S> 06 c0 rjmp <S> .+12 <S> ; 0x20 <__bad_interrupt <S> > <S> 20 bytes interrupt vector table (at least some of the entries could be omitted if you insisted and promised you would never enable the corresponding interrupts). <S> 00000014 <S> <__ctors_end <S> >: 14: <S> 11 24 <S> eor r1, r1 16: <S> 1f be out 0x3f, r1 ; 63 18: <S> cf e9 ldi r28, 0x9F ; 159 1a: <S> cd bf out 0x3d, r28 ; 61 1c: 02 d0 rcall .+4 ; <S> 0x22 <main> 1e: <S> 05 c0 rjmp <S> .+10 <S> ; 0x2a <_exit> Clears SREG <S> (I am not sure this is really needed), writes 0x9f (RAMEND) to SPL (the stack pointer) and jumps to main. <S> The last rjmp is kind of redundant. <S> (you could promise never to return from main) <S> 00000020 <__bad_interrupt <S> >: 20: <S> ef cf <S> rjmp .-34 ; 0x0 <__vectors> Default interrupt procedure for those interrupts than do not have one overwritten in C. ( <S> same rules as for __vectors) 00000022 <main <S> >: 22: <S> bb 9a <S> sbi 0x17, 3 ; 23 24: <S> c3 9a <S> sbi 0x18, 3 ; 24 26: <S> c3 98 <S> cbi 0x18, 3 ; 24 <S> 28: <S> fd <S> cf rjmp .-6 ; <S> 0x24 <main+0x2> <S> Your main proc. <S> Tight. <S> 0000002a <S> <_exit <S> >: 2a: <S> f8 94 <S> cli0000002c <__stop_program <S> >: <S> 2c: <S> ff cf <S> rjmp .-2 <S> ; 0x2c <__stop_program> <S> This two are not very useful. <S> _exit is probably required by the C standard and __stop_program is needed for it to work as it should. <A> What is your eventual application? <S> An ATtiny13 has 1kB of flash <S> and you can do a lot with that in C. <S> It contains things like stack handling so you can use functions with arguments and return values. <S> 100 bytes for embedded C setup isn't too bad, and it's constant size. <S> Doubling the lines of program logic won't necessarily make it 200 bytes. <S> What optimization level are you compiling at? <S> You should be at "-Os". <S> And how are you compiling this? <S> The Makefiles in the demo projects available from the avr-libc site are pretty good and comprehensive. <S> The simple LED on/off program below takes 62 bytes on an ATtiny13 with "-Os" on the avr-gcc 4.3.3. <S> from CrossPack-AVR: <S> #include <S> <avr/io.h>#include <avr/delay.h <S> > <S> int <S> main(void){ <S> DDRB <S> |= <S> _BV( PB3 ); while( 1 ) { <S> PORTB <S> |= _BV( PB3 ); _delay_ms(200); PORTB & <S> =~ _BV( PB3 ); _delay_ms(200); }} Removing the _delay_ms() calls makes it 46 bytes. <S> A larger example on the ATtiny13 are my Smart LED prototypes . <S> This code contains a 3-channel software PWM, an HSV-to-RGB color conversion, a state machine, and reads two buttons. <S> It's not written particularly well and comes in at 864 bytes. <S> Under avr-gcc 3.x <S> it was even smaller. <S> (for some reason avr-gcc 4 has made almost all programs grow by a few bytes) <A> crt0 is the startup routine for the uC. <S> The routines performs the setup of the registersand also the initialization of data. <S> Does the 100 bytes include the interrupt vector table? <S> I am not sure about the ATtiny13 <S> but the ATtiny25/45/85 has 15 interrupts vectors. <S> This would take up30 bytes. <S> gcc has an option to link in your crt0. <S> You could take the AVR crt0.S file and modifyit. <S> It is not very long so it should not be difficult to do. <A> If you're short on space, try IAR's Embedded workbench - <S> their free 'kickstart' version has a 4K word code size limit, so plenty for ATTiny's, and probably better optimisation than gcc <A> Devices like that are often programmed in assembler, resulting in smaller executables. <S> It's worth making the effort and learning to use it.
|
The crt0 is the avr-libc C runtime.
|
SMD solder now or later? I'm soldering up some boards with smd parts, using a hot plate to reflow, and I'm (inevitably) realizing that I got some of the wrong parts. Now, is it better to leave the boards with smd components stuck on them (sitting in wet solder paste) until I can get the other parts, and then do the reflow all at once, or to reflow now, and then paste and heatgun (or just solder iron) the other parts in later? I only have a few parts for which I need to do this, and I can stick the boards in a quiet refrigerator until I get the parts. I might not have ready access to a heat gun later, which is why this isn't a no-brainer (I'm imagining soldering iron+paste isn't the best way to do things, since I can't get to pads under the parts). Personally, I think the real question is whether reflowing twice negatively affects smd components, but context might prove it otherwise. <Q> I've left wet paste on a board overnight in cool weather without problems, but I'd be worried it would dry out over a few days - especially if left uncovered in a refrigerator (although I'm not sure if this would adversely effect the reflowing). <S> If there are pads under the parts, then soldering with an iron is out of the question, but a hot air rework gun should work fine. <S> Depending on the complexity and the number of missing parts, I would either: <S> Flow now and solder the additional parts later <S> (you can place a cube of metal under specific parts of the board to reflow individual parts on the hotplate). <S> Clean the board and restart when you've got the new parts <A> Solder paste drying out is not the problem. <S> It's the fact that the flux is hygroscopic! <S> Now, this may not apply to all solderpaste, But I have left some unsoldered boards with paste on them lying about for varying amounts of time, and they become progressively more difficult to solder as time passes. <S> Basically, what happens is apparently the water flash-vaporizes, and literally causes the parts to go flying. <S> I wound up having to use an old (dry) sponge to hold the parts down as they reflowed (this was the hot-plate reflow method). <S> I'm a bit mystified by the whole affair, as I would imagine the water would gradually boil off, not create a percussive effect powerful to actually launch 1206 parts about, but it is what happened. <S> This is with kester paste (variety is from digikey, don't know which specifically (not at my workstation at the moment). <S> Edit - <S> It looks like I'm currently using Kester R500 . <S> I prefer a more aggressive flux because I'm often doing unusual things to prototypes, and the boards are often a bit abused (the place I work has a terrible feature-creep problem). <S> Other fluxes may behave differently. <S> Don't forget to wash your boards if you use a stronger flux. <A> The paste might dry out. <A> To the best of my knowledge, solder paste is kept chilled not because the flux dries out quickly, but to help keep the very fine bits of solder in suspension. <S> You're probably okay waiting a few days to solder. <A> I recall reading on some paste datasheet that the shelf-life of stenciled boards was about 12-18 hours, but the life of boards with placed parts was significantly longer, about 2-3 days. <S> I would surmise this <S> is due to the parts physically containing the paste's flux, reducing dry-out where it matters most, between the part and the board.
|
Personally, I'd solder all the parts now and add the missing parts when they arrive.
|
Deciphering a DC jack schematic I am trying to include a DC jack on one of my PCBs. I am just setting up the footprints now, and I am not quite sure which pin is which. What do the symbols on the drawing mean? I have included a snap of the schematic below, it has been taken directly from the datasheet . <Q> It's a visual representation of how the socket works. <S> Pin 3 represents the pin that mates with the center of the plug (typically V+) <S> Pin 2 contacts to Pin 1 (Gnd) but breaks contact when the plug is inserted (as the Pin 1 contact springs away) <A> Pin 3 is the center pin, pin one connects to the barrel and pin 2 <S> is usedto detect if there is a plug inserted. <S> The lower left drawing shows the physicalpins looking at the bottom side. <A> While this is resurrected due to Endolith's retagging, I want to clarify the reason that Pin 2 connects to the shield of the jack, but only when there's no plug inserted. <S> You can do one of three things to wire this correctly: Only connect to pin 1. <S> Connect pins 1 and 2 together. <S> Connect pin 1 to your circuit's ground node, and connect pin 2 to another power connector (Black binding post for a banana jack, or battery ground terminal, for example.) <S> Then, you can connect pin 3 to a red binding post or battery positive terminal, and have 2 power supplies without worrying about output contention. <S> Method 3 is the reason that these plugs are designed the way they are. <A>
|
I generally connect pins 1 and 2 together. Pin 1 is the sprung contact that connects to the outside of the plug (typically Gnd)
|
Best shunt resistor for power meter application? Looking for a shunt resistor for measuring power usage and was wondering if anyone had any experience with these. It should be capable of handling 110V/20A in-home circuit. EDIT: Energy monitors are the rage these days and I was thinking about putting a simple circuit together to try out. This would be used to measure a typical appliance or electronic device such as stereo or television. Similar to a Kill-a-watt or multimeter. I haven't really thought about accuracy as much as getting something to work well. I haven't thought this all the way through just thought maybe some here may have already "been there done that". <Q> The key is finding one with low enough resistance that it doesn't have to dissipate much power. <S> Two of these in parallel would do the job: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=TMC5-.10-ND <S> With two in parallel, the resistance will be 0.05 ohms, <S> so at 20 A, you'll have to dissipate 20 * 20 <S> * 0.05 = 20 W. <S> They're rated for 5 W continuous, or 10 W for the two of them. <S> As long as you don't have to maintain 20 A, they'd work fine. <S> I'll see if I can dig up something better. <S> -- <S> Edit: here's a better solution. <S> Try one of these: <S> http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=MR50.01FTR-ND <S> The resistance is 0.01 ohms, so at 20 A, you'll dissipate 20 * 20 <S> * 0.01 = 4 W. <S> The part is rated for 5 W continuous, so you're safe. <A> You haven't stated the accuracy you require or the range of currents you wantto want to measure. <S> If you are looking for a 5% measurement you may want to look at a current transformeror a hall effect device. <S> The nice thing about these is they give you isolationfrom the line. <S> Take a look at the various power meter application notes onthe TI, Microchip and ADI sites. <S> They will probably have some specificrecommendations. <S> For a resistor be careful of the power dissipation. <S> You need to derate for dissipationand you may need to look at the temperature coefficient for accuracy. <S> Also some powerresistors have very specific mounting recommendations -- <S> height off the PCB, the amount ofpower being dissipated by adjacent components. <S> If you need an accurate measurementyou will want a resistor with Kelvin connections (four terminal). <A> Ah, you actually want to build a power meter-- <S> take a look at the STPM01. <S> It's an IC designed to be the core of a residential power meter. <S> http://www.st.com/stonline/products/families/analog_and_mixed_signal/interface_ics/related_info/stpm01.htm <S> Digikey has them in stock for $9.94 in qty. <S> 1. <S> You'd need to connect it to a microcontroller of some sort via SPI. <S> I suspect that there are also other ICs like <S> this available-- maybe check Analog Devices, Linear Technology, and TI. <A> For higher current ranges, such as the one you're looking at, it is probably better to use an inductive pickup. <S> This allows you to measure high currents accurately, without having to dissipate lots of heat from shunt resistors. <S> An example would be the Digi-Key 398-1081-ND , which gives a DC voltage out proportional to the AC current in the system. <A> If you're just measuring AC, use a current-sensing transformer, such as this EPCOS one from Digikey (or flip through some others ). <S> It offers much lower resistance than a shunt resistor (0.8 mΩ nominally) and provides the added benefit of isolating your sensing circuitry from the mains line. <S> Digi-Key carries most of their product offering as well. <A> The ACS714 from Allegro comes in a common SOIC package and has an internal shunt resistor, so no worries about parasitic resistances in measurement. <S> The ACS714 measures bidirectional currents up to 30A , and outputs 66 to 185 mV/A. <A> Shunt resistors supposed to be used for DC, for AC suppose to use amper clamps which is the same current transformer.
|
Hall-effect current sensors also offer similar performance, such as these from Allegro , but work with DC as well as AC. If you needa wide range of currents you may also need an instrumentation amplifier.
|
Are Common Mode Choke Coils needed on USB? I was looking over the schematic for the GumStix Palo 43 and noticed they used a common mode choke coil on the data lines coming in from USB. I understand how this design can help remove noise coming in on the USB lines, but I wonder if it is actually something I should start doing on my designs. The datasheet for the FT232R has no mention of adding common mode choke coils, and I have used this chip before with out one. So, would you recommend I change my USB design or keep it the way it is? <Q> The USB signal is not entirely differential, so it's not a great idea. <S> (The end-of-packet (EOP) signal is both pins pulled low, which, I believe, is why there's always noise at 1 kHz and harmonics in USB systems, since it's sending common-mode signals every 1 ms.) <S> A common mode (CM) choke should be used to terminate the high speed <S> USBbus <S> if they are need to pass EMItesting. <S> Place the CM choke as closeas possible to the connector pins. <S> SeeSection 5.1 for details. <S> Note: <S> Commonmode chokes degrade signal quality,thus they should only be used if EMIis a known problem. <S> Common mode chokes distort full speedand high-speed signal quality. <S> The eyediagram above shows full speed signalquality distortion of the end ofpacket, but still within thespecification. <S> As the common modeimpedance increases, this distortionwill increase, so you should test theeffects of the common mode choke onfull speed and high-speed signalquality. <S> High Speed USB Platform DesignGuidelines Note <S> :additional filtering may be achieved by winding the 4 wires through the ferrite bead an additional turn. <S> Aswith the use of ferrite beads in signal paths, care should be taken to insure that the signaling meets riseand fall times, especially the EOP signaling. <S> EOP signaling is single ended and may be strongly affectedby a single bead, which acts as a common mode only filter. <S> Intel EMI Design Guidelines for USB Components <A> There's a good chance that the choke is included on the Gumstix board because they have to pass <S> FCC Title 47 CFR Part 15 <S> emissions testing for unintentional radiators to sell their device. <S> You might not care about that, but if it's for a commercial product I think it's cheaper to add the choke now and then remove it if you discover it's not needed. <A> If your product sits "floating" on the USB cable, the common-mode choke is probably not necessary. <S> At that point, you will need the choke. <A> Yes, I would recommend using a common mode choke. <S> It helps with EMI but as everyone has said, you will have a degraded signal. <S> If you don't need the choke, just add jumper wires.
|
However, if your device is electrically attached through any other paths that could form a loop back to where your USB cable originates, you will have a potential for inductively picking up or generating noise that can affect the performance of your product, or other product attached to it.
|
Is it possible to drive TTL inputs from 3.3v microcontroller I need a quick heads up on a problem I am trying to solve at work. I'm trying to connect to a parallel data port on an interface module we use to access smart cards. The port has an 8bit input and an 8 bit output with associated strobe/ready pins. I have a microcontroller board with an ARM cortex (mbed.org) which would be perfect to interface to these ports to my PC for test purposes. The ARM board has loads of i/o but its a 3.3v part. I have used it with your typical 2 line LCD display (5v part) with no problem (I know the ARM i/o is 5v tolerant) and I can control the LCD no problem. What I'm wondering is, is it ok to assume that I can drive any 5v TTL level input from a 3.3v output pin ? I'm happy that I can read the 5v ttl levels as I said the ARM Cortex chip's documentation says it 5v tolerent. The connection will be very short (<10cm). <Q> The datasheets should tell you the minimum voltage required to register as a digital high for your receiver, and the minimum voltage guaranteed at the output for a high from your sender. <S> Just make sure they're within each other's limits. <S> A TTL input signal is defined as "low" when between 0 V and 0.8 V with respect to the ground terminal, and "high" when between 2.2 V and 5 V (precise logic levels vary slightly between sub-types). <S> TTL outputs are typically restricted to narrower limits of between 0 V and 0.4 V for a "low" and between 2.6 V and 5 V for a "high", providing 0.4V of noise immunity. <S> http://en.wikipedia.org/wiki/Transistor-transistor_logic#Interfacing_problems <A> "is it ok to assume" your number of assumptions should be inversely proportional to the amount of money invested in your work. <S> I am not sure how much is in this project <S> but I always try to keep that in mind. <S> As for the device: are you reading, writing or both? <S> If reading, should be ok since you said your device is 5V tolerant. <S> If you are writing then I would still stick with some sort of level shifter like this . <S> You really can't know what will happen if you use a device out of spec (could get lucky <S> but you could also get really really unlucky). <S> I have used one of the level converters and they work great! <A> Pericom AN66 is a useful application note on logic family interfacing. <S> It covers driving TTL from 3.3V CMOS. <A> The problem with the term "TTL" is it's often used rather loosely. <S> People often say "TTL" when they really mean 5V CMOS. <S> Real 5V TTL (74LS and similar) has 3.3V compatible input thresholds but has much higher input current requirements than any CMOS device does. <S> So you need to make sure your 3.3V device can deliver enough current for the TTL inputs. <S> This is probablly not a problem for driving a single gate but could become troublesome at high fanouts. <S> 5V <S> 5V "traditional CMOS" ( <S> HEF4000 74HC and similar <S> ) inputs will usually be out of spec with 3.3V signals but in practice will often work despite this. <S> 5V "CMOS schmitt trigger" inputs are very likely to fail to respond to 3.3V signals. <S> Be aware that different pins on the same device may have different specs. <S> I've got caught out with this on PICs where many of the pins have TTL compatible input buffers but some have schmitt trigger input buffers.
|
"TTL compatible CMOS" (74HCT and similar) inputs are fine to drive from 3.3V signals.
|
Passive listening to USB communication Is it possible to passively listen on low speed USB communication? Suppose I connect a logic analyzer to D+ or D- line, will I see a valid data? <Q> This means that the bits are encoded by whether the bus level changes or not. <S> Change (in either direction) means 0 and no change (for one bit-time) means 1. <S> I believe there are also CRCs and other signaling bytes at the beginning and end of packets. <A> This is what you need http://www.totalphase.com/products/beagle_usb480/ , it is a USB 2.0 protocol analyzer, comes with software that will parse out USB traffic, and will be much easier to use than a logic analyzer. <S> I have one of these for I2C/SPI and it works well, <S> plus, Bunnie uses it http://andrew.huang.usesthis.com/ <A> Yes, it should work. <S> Ideally you'd use a logic analyzer that can capture & decode USB traffic, otherwise you will have trouble finding the data you are interested in.
|
I'm not certain about this, but I believe that if you look at the differential voltage between the two lines, you will see data, but it will be NRZI encoded.
|
Prototype Options For Medium Current Application I'm looking for the best option to develop a medium current (approx 1-2 amps) prototype board. Should I be using perfboard, Vero/stripboard or etching a custom board? Or are there any other options available? Thanks <Q> 1 or 2A is not that much. <S> If you are worried you can solder some moderately thick wire on the parts carrying larger currents. <A> How complex is your circuit? <S> How much voltage drop can you toleratealong the current carrying wires? <S> If the circuit is not complex you can keep the wire length short and use perf-board or strip board. <S> 22AWG works <S> well theVector <S> T42-1 and K2A pins. <S> You could also use vectorboard with the copper plane on it. <S> Remove strips of copper to form traces and planes. <S> A lotmore work to build (especially with a complex circuit). <A> This can be the case even in the 0.5A-1A range. <S> There are other applications where you may need to keep voltage drops low, so plan carefully. <S> We had a "smart" battery charger that used charging currents of 1.25A. <S> The voltage drop along our charger cable was only about 0.1V, but we had SMBus (= <S> I2C more or less) signals referenced to the ground return, and with a 0.1V difference between the ground return potential at either end of the cable, it ate into the SMBus voltage level margin, which isn't that much. <S> Voltage drop along the positive power input wasn't a significant issue, but drops along the ground return had a big effect. <S> Bottom line: it depends. <S> You need to study your system and decide what kind of voltage drops along the supply lines can be problematic. <S> Then design your system around it. <S> (e.g. star grounds rather than daisy chains in some circuits) <S> Measure the drops in the final system to make sure you are doing OK. <S> Otherwise, what the other answers said.
|
If there's significant power conversion / switching electronics, you may have to use a "real" (custom etched) PCB to get good ground planes and keep the parasitic inductances down.
|
How to Determine a PCB's Power Requirements? Disclaimer : I have very little (almost none, really) electronics experience. I purchased a set of IR illuminator boards off of eBay. The only information that the seller provided was that the board had an operating voltage of 12 VDC and that the board has a built-in auto protection circuit that prevents damage from high voltage. I have two questions. One directly related to this PCB, and one general: How can I figure out how much current these boards will draw? Suppose the seller omitted the required voltage information. How would I go about figuring out how much juice a certain board needs without frying it? The board in question is sold by a lot of eBay sellers. Here's one listing with decent pictures. EDIT : Thanks for your answers everyone; you were all helpful. <Q> You can measure the amount of current the board draws using the current measurement capability of a multimeter. <S> If your multimeter does not have a fuse on the current input you should put one in series. <S> You place the multimeter in series with either the positive or negative line of your power supply. <S> I would use the negative line. <S> When first powering a device I would use a supply with a current limit. <S> This limitsthe current if there is a fault or if the vendor really meant 5V and not 12V, etc. <S> Did the vendor mention if the device has an internal current limit? <S> It is not clear what the "high voltage" protection is. <S> It could be a transient protectiondevice that will not protect the device if you apply a continuous voltage that isbeyond the input voltage range. <S> It is not really practical to determine the input voltage specification unless youhave a reasonable idea what it is before you start. <S> You will not be able to determinethe maximum input voltage reliably. <A> For the specific case of IR LEDs, you could count the number of LEDs wired in a series string. <S> (Google "series versus parallel wiring" for details on what "series" means.) <S> IR LEDs can tolerate a voltage in the range of 1.3-1.7 V per LED. <S> For a 5-LED string, you could start with 5 * 1.3 = 6.5 V and increase from there. <S> They'll get brighter as you increase the voltage <S> *. <S> Eventually the LEDs will overheat and burn out. <S> If you're willing to buy a few and risk burning them, you should be able to figure out the peak voltage a PCB can tolerate. <S> *(I'm eliding some details here-- <S> the LEDs brightness is actually more linearly related to current than voltage, but you said you were new to electronics, so don't worry about that. <S> I'm also presuming you have some sort of IR camera that can see the IR output.) <A> 1) Use an ammeter in series with the power supply to measure how much current the device uses. <S> You will have to break the circuit in order for this to work. <S> Breaking the circuit is not always easy. <S> You may need to cut the power supply wires in order to break the circuit. <S> Since you're a novice, I would be very, very, very careful with cutting the power supply wires. <S> 2) <S> If you do not know what voltage a device takes, try to follow the circuit from the DC power plug to the nearest regulator (it should be in close proximity to the DC power plug). <S> Google the part number, find the datasheet, and see what the minimum input voltage requirement is for the regulator. <S> Linear regulators require some extra room, so a 9V regulator might require 10V or more, which is why they would suggest a 12V supply. <A> Looking at the board there is not much there besides the LEDs and a couple of parts which I am guessing are resistors. <S> It look like there are two groups of 9 LEDs and then a current limiting resistor. <S> Each group should not pull more than around 50mA <S> so I am guessing the board in total will be less than 100mA. <S> Looking at a data sheet for an IR led for 100% on you <S> should not exceed 20mA or you will be damaging the LEDs. <A> You can hook it up to any 12V power supply, but it might not work. <S> It won’t work if the board draws more current than the power supply can source. <S> This might burn out your power supply, but not your board. <S> Additionally most power supplies have over current protection that will shut down the supply if a short or over-current is detected. <S> If you have a multi-meter and know the max current of your power supply you can measure the current draw of the board and if it is approaching or exceeds the max current of the supply <S> then chances are you are going to need a bigger power supply. <S> Try one with a higher maximum current, but make sure to keep the voltage at 12V
|
So measure the voltage across the resistors and use ohms law to work out the current.
|
How to clean a potentiometer? I have a couple of potentiometers that haven't been touched in quite some time. In fact, probably not in 15 years. So now they produce noisy output, presumably from oxides or some other crud that has built up on the contact surfaces. Outright replacement might be an option, but these are quite large relative by current standards, they are in fact about the diameter of a quarter and are probably 1/4" inch thick, real 1970's technology. Might be hard to get the same form factor. Certain retailers used to carry this stuff that came in a can like wd-40, complete with a little red tube for injecting the stuff into exactly this kind of part. You'd squirt a tiny amount into the noisy pot, wiggle the knob 2-3 times, and no more noisy output. So there's the proof of concept that it can be done, but this magic stuff seems to have vanished from the shelves. It had to just be some kind of solvent, like xylene or something. Any ideas on what would clean the corrosion (dust? dirt? fungus ?) off a potentiometer, without damaging it? <Q> Just spray contact cleaner on it and wiggle it back and forth. <S> :) <S> It hasn't vanished: <S> DeoxIT http://www.google.com/products?q=contact+cleaner <A> I have used CRC Electronic Contact Cleaner, to just plain old Windex to clean potentiometers. <S> It doesn't really matter that much what cleaner you use, <S> provided that it doesn't leave behind any film. <S> So I wouldn't use WD40 or anything that says that it lubricates. <S> Soak it by spraying it with your favorite cleaner. <S> Rotate it several times. <S> Spray it some more to get anything that broke loose out. <S> Repeat steps 2. <S> & 3. <S> as necessary. <S> Let it dry completely . <S> After you have cleaned it you should put in some dielectric grease. <A> Isopropyl alcohol works well too - You can submerge the pot and give it a good soaking, then just turn the wiper backward and forward a few times to make sure <S> it's well worked in. <S> Then just leave it to dry before turning the electrical equipment back on. <A> I don't know if I'd say it's vanished... in the US, at least, I've seen DeoxIT at Radioshack and Fry's Electronics <S> carries a couple of types of electronics cleaner. <S> I picked up some stuff (not DeoxIT) that did a cleaning, but it didn't last very long (maybe a couple of months). <S> Deoxit is better, I hear. <S> I was cleaning potentiometers in a 1970s Marantz amplifier. <A> I picked up a can of Control/Contact Cleaner and Lubricant at Radio Shack tonight. <S> It was a 4.5 oz. <S> can for around $11.00, a bit pricey, <S> but it should do the trick. <A> By all means, clean and lubricate the potentiometer. <S> However, a pot in an audio circuit should not make any significant scratching noise. <S> Scratching noise is a sign of a possible design neglect in the circuit: namely, a DC potential across the wiper contact. <S> Quiet operation is ensured by allowing only AC signal through the pot. <S> Even a brand new pot, especially a cheap carbon one, will make scratching noises if DC is flowing through it. <A> In my case, I used a mixture of 91% isopropyl alcohol and acetone (2:1 alcohol to acetone ratio) which I got from my supermarket (totaling 48 fl oz for about US $6.) <S> This originally was to make flux remover, but I discovered it also makes a GREAT contact cleaner! <S> I bought an old 70's era cassette deck for parts, which had a very nice dual concentric pot (recording level), but was no longer usable since it was horribly scratchy. <S> After soaking overnight (use a jar with tight lid), it was in perfect like-new condition! <S> I wouldn't try to say this cleaner is BETTER than a particular commercial contact cleaner, but for a convenient high performance/low cost option it's hard to beat. <A> You can just clean it with WD40 <S> and then, find a hole on the body (usually it has one!) <S> , so put some silicone grease inside, it´s a good lubricating and it´s clean. <A> A little 96% alcohol dripped into the pot, twisting the shaft a few times, then drying the excess with a hairdryer - worked wonders for me. <A> the nephew doesn't blow on the open container,get in the eyes & irritates.the <S> conducting surfaces ,,copper,,silver ought to look polished & clean. <A> Came across this post looking for appropriate solutions to clean a scratchy potentiometer I had on a high-powered home amplifier. <S> I used a alcohol based screen cleaner spray <S> I had set aside since I couldn't find anything reasonably cheap or adequate to use around the house. <S> After using this screen cleaner over the past year, since it's alcohol based it evaporates at a reasonably fast rate which is quite suitable. <S> I sprayed the pot a couple times without opening it, gave it a couple turns to loosen any dust and dirt, let it dry <S> and it's working like a charm. <S> Would recommend it over other solutions, Windex can be a little tricky to use and it will leave some chemicals behind which might influence the life span of your pot. <S> (But hey, if you want some lavender scented variable resistors, I'm not one to judge) <A> it's pure carbon thin layer on phenolic resin substrate, gee take a bad POTapart once and see that. <S> its not a commode pot, its not to go potty in, as other posted.clean it with pure alcohol. <S> never use acetone on most plastics for sure <S> this one.if <S> you read the specs on phenolic resins <S> it says that exactly and why damage happens.rubbing alcohol has oil in it, The pro grade does ! <S> , avoid oil ! <S> avoid grease except the shaft <S> bushing.the pure carbon does not oxidize. <S> it just does 2 things.wears out (no cure there) once the carbon path of the gold wiper hits resin ! <S> and gets dirty, clean it with alcohol is best. <S> pure, as near as possiblecheap alcohol has 1% water while ok delays drying a long time. <S> (can)retired long time tech, 1965 to 2009, and mil trained, on this. <S> Pots can be bought new if not too complex. <S> 3 lug easy, even 6 lug dual.no switches. <S> they come on linear and Log types. <S> volume controls are log.end school. <S> be happy if it works 1 year.
|
suggestion for cleaning corrosion off pot contacts,glaziers have used pumice,,extremely fine powder used to clean tiny dirt specks from pitted new & old glass,using a bit of the powder ( also termed 'rubbing compound' on a q-tip, moistened with isopropyl alchohol,,cannedair to blow out residue after drying,,watch I'd like to throw my support behind the answers which recommend isopropyl alcohol, as I have had excellent results.
|
Piggy-backing off power amplifier outputs My motor-scooter has a built in radio, with a small speak either side of the front panel, below the handlebars. It's a JonWay, i.e. cheap Chinese, so I suspect the radio is more suited to developing countries where helmets are not yet mandatory. For me to listen while wearing a helmet, I need zero traffic, or a headphone jack, and I'd like to do the jack myself. I may not find the radio board without too much dismantling, but the speakers are very accessible, so I may have to grab my input signal directly from them. My electronics knowledge has all but evaporated after 15 years of non-use, so all I can start with is that I'll need a high impedance input, to make the increased load on the amp negligible, and my own power amp stage. Where do I go from here? I would like to do a rough design myself, maybe make the amp component a kit, but nothing ready made. <Q> Don't worry about the input impedance of the stage. <S> Even a low 1 kΩ impedance will only decrease the load from 8 Ω to 7.94 Ω. <S> A more typical 10 kΩ will be invisible to the power amplifier. <S> Power amp for driving headphones is pretty easy. <S> In fact, you could just do it all in one stage. <S> See the CMoy amp for a popular and simple design: http://tangentsoft.net/audio/cmoy-tutorial/ <S> http://gilmore2.chem.northwestern.edu/projects/cmoy2_prj.htm <S> If your headphone amp will be battery-powered and mono, just connect the input of this schematic to the red wire of the speaker, and the ground to the black wire. <S> If you want to run stereo, or power it from the same supply so you don't need batteries, then you need to check whether the speakers are driven bridged or not. <S> With a signal coming through them, you should always see an AC voltage between the two terminals of a speaker (to make sure you're measuring right). <S> Then check if there's also a voltage between each terminal and ground. <S> If there is, then it's bridged. <S> If one wire has zero volts to ground, then it's ground. <S> You can make sure with a resistance check. <S> If it's not bridged, then you can just do the same thing with two amps. <S> If it is bridged, you can't use that circuit. <S> You don't want to short the active speaker outputs to ground or short the left and right outputs to each other. <S> So you'd need to build a diff amp for each input stage, and connect ground to ground, V1 to one speaker wire (red), and V2 to the other (black): <S> Then Vout of this circuit connects to Vin of the previous headphone amplifier circuit. <S> If the speakers are driven class D , you might need additional filtering, but probably not. <A> You can grab the input signal off of the speaker or replace the speaker with a power resistor. <S> The radio is designed to drive a low-impedance so you want to keep a low impedance on the output and amplify from there. <S> I did this with a car radio/cassette deck so that I could listento some old cassettes on my home stereo. <S> For the amplifier you could use an amplifier IC like the TDA7056A from Phillips (and IIRCothers). <S> There may be single package audio amp ICs from Nationaland TI that could. <S> The TDA7056A is a large through-hole packagewith a metal-tab for heatsinking. <A> What you actually want is to reduce or attenuate the voltage down to headphone levels. <S> A voltage divider(or L-Pad as audiophiles call them) will do that just fine, and only needs two resistors. <S> The only downside is that the resistors might get a little warm so use ones that are rated for 10 watts or so. <S> I'd say a use a ten ohm and a one ohm and put the headphone out across the one ohm. <S> Lots of people are making "L pad headphone attenuators", <S> I'm sure the audio nerds know more than I do about them. <S> I've also heard of transformers being used.
|
You may be better-off using a small portable radio or ipod like gadgetand coming off of the headphone jack.
|
Arduino hooking up LCD without POT I am using this LCD : Plus I am using an Arduino. I am trying to hook this up but without a 10K pot. How is this possible? Every tutorial I found involved the 10K potentiometer <Q> You could start by using the variable resistor to find the sweet spot for the screen contrast, then use a multimeter to measure the resistance at that point, that should give you a good value for a fixed resistor. <A> Just PWM something to make a contrast that suit your needs. <S> hook up the pot pin of the LCD to a PWM pin of the arduino, sending a stable 0-127 signal. <S> Just try. <A> Just do a voltage divider between GND and Vcc with two 4.7kOhm, and connect the divider center with the LCD contrast pin. <S> Every LCD I've used works perfectly and with the right contrast. <A> I have tried various solutions, those work: Solution 1) <S> You can connect V0 pin to GND using just a resistor 2k-3k works fine for all LCDs <S> I tested. <S> Solution 2) <S> You can also control the contrast from your arduino PWM, just connect PWM pin directly to V0 pin and set PWM to between 60 to 120, to prevent flickering you need to change timer prescaler from default 64 to 1 or 8. <S> If you are using pin 3 (timer 2) using this command: <S> TCCR2B = TCCR2B & 0b11111000 <S> | 0b01; No other components are necessary. <S> Solution 3) <S> If you can't change the prescaler and don't like he flickering you can build a low pass filter using a capacitor and a resistor. <S> Connect 10uF capacitor to GND and V0, then connect 470 ohm resistor between PWM pin and V0. <S> Set PWM between 60 and 120 Solution 4) <S> Use potenciometer, you don't need 10k, Just anything above 5k will work fine, Even 1M will work. <A> Is there any reason why you don't want to use the 10k pot? <S> It really is needed for the screen contrast control. <S> If you don't have a 10k, you could experiment with a variety of fixed resistors to get the required contrast level. <A> My experiences: <S> If you don't connect that LCD terminal (V0), you don't see anything. <S> If you connect V0 to GND, you still will be able to see if it works and discern characters (they would be very blurry though, looking from an angle helps). <S> If you connect V0 to +5V, you don't see anything. <S> Connecting V0 to GND via 1-1.5K resistor, as mentioned above, gives pretty good contrast. <S> If you use 5K, you get "inverted" effect (when characters are darker than background, contrast is not ideal in this case though). <S> I also get the same effect when powering my (enhanced) Arduino and LCD from 3.3V (and putting V0 directly to GND). <S> My LCD is marked J1602A and is few-bucks from eBay. <A> Connect 470.. <S> 1K from Vo to GND and 3K.. <S> 5.1K from Vo to VCC.For most LCDs works perfect. <A> I run mine with a single 1k5 resistor to ground. <S> Seems to be good. <S> Play around with different sizes if you have. <A> The same as leppie's answer , but a 1K resistor to ground. <S> Something in that range should do the trick, depends on the lighting of the environment where you're using it. <A> I used a 3.9K resistor between V0 and GND. <S> And the LCD was clearly visible.
|
Otherwise you could look at using a digital potentiometer chip that could set the screen contrast and could be controlled by the Arduino I see good reasons for wanting to connect LCD without potentiometer or even fixed resistors at all: when you just want to test a new piece; when you're in hurry, in place lacking anything but wires, or when you just don't want to bother with the question how to connect that resistor so it wasn't fragile, ugly, etc.
|
How can I tell how much juice a LiPo battery still has in it? Suppose I have a circuit that draws its power from a LiPo Battery.I would like to know how much power the battery still has in it.Ideally a circuit of power level to voltage will be best .. this way I can connect the output of that circuit to a ADC input in my Arduino. <Q> To be honest, if you manage to find a way to do this reliably, just measuring the voltage, and patent it, then you will never have to work again. <S> The available energy left in a battery is loosely related to the terminal voltage but also depends on the battery temperature. <S> A common method of determining the battery charge state is to use a coulomb counter to count the charge going into and out of the cell. <S> This gives a better estimate of the charge state of the battery, although the actual energy available is still temperature dependant. <S> At low temperatures the battery capacity can be less than 50% of the nominal. <S> An example device is the ST STC3100 . <S> This uses an I2C interface to communicate with the processor. <S> The coulomb counting is performed by integrating the current in and out of the cell over the charge/discharge cycle. <A> The big problem is that the output voltage stays fairly flat for most of the time. <S> So, unless you have a really good A/D, you can't monitor it directly. <S> That is why laptops and such tend to use clocks to measure the remaining power. <S> It's pretty easy to find the graphs if you search for "battery discharge curve" http://shdesigns.org/batts/battcyc.html <A> What I am doing right now on a big battery consisting of a lot of Lipo cells is the following. <S> I first charge it up (see datasheet of the cells for maximum voltage). <S> Next I will drain the battery with a big resistor whilst using a current clamp connected to a scope as well as measuring the battery voltage. <S> There is a power supply in parallel with the battery rated at the cutoff voltage for the battery <S> so I can leave the setup to drain the battery right up till the point where it is not recommended to go further. <S> With the scope(some Fluke, don't know the model) I can record the current over time, and thus determine the capacity. <S> When the capacity is determined I am going to log the current and voltage constantly when it is in use, and thus I can more accurately find the charge left. <S> But this setup will be monitored by a fancy industrial computer <S> so I am not sure if that is the best way to go about at home. <A> These answers are too good . <S> I discover commercial solution are cheaper. <S> At your lab, if you can measure the load of the device, you don't need to put any charge meter inside it. <S> For example : a simple power load schema state load--------------------standy <S> 0.1 Afull on 1 <S> A <S> If the Arduino commands the two states - or can read them, a digital data - bingo. <S> Arduino times them and add to these two counters : time in standby, time full on. <S> Easy math to calculate how much juice your device had suck form the battery.
|
If you know when the battery is full then you can estimate the amount of charge that has been used.
|
I don't get the Arduino concept I have been struggling with making an Arduino for a while (was successful in making a breadboard version using an ISP programmer cable). They say that the Arduino bootloader is made so that no external circuitry is required to program the ATmega8 . But when I looked into the schematics there is the normal circuit required for the serial connection. Then what does the bootloader actually do? <Q> The bootloader is a small program in the AVR's flash which is never overwritten and runs on powerup. <S> The job of the bootloader is to read program data from the UART and write it to the internal flash. <S> Without a bootloader, the only way to load code is using ISP. <S> The AVR ATMega8 comes with no code in the flash. <S> Code can be uploaded via the ISP (in-system-programming) pins, using an AVR ISP programmer (or even another Arduino). <S> For Arduino, the ISP is used only once (at manufacture) - to upload a small bootloader. <S> On powerup, the bootloader runs and communicates with the serial UART (TX + RX pins). <S> Now, Arduino can be programmed via the serial pins using the STK500 protocol. <S> As the serial pins are (typically) connected to an FTDI USB to serial chip, the Arduino can also be programmed over USB. <A> You can buy ATmega328 chips with the boot-loader on them here . <A> They probably mean that if you buy a pre-built, assembled Arduino Uno, you don't also need to buy a programmer. <S> Like with a lot of other electronics starterkits. <S> You can program the Arduino Uno board with just a usb (A > B) cable. <S> However if you are going to build an Arduino of your own, you of course will need an external circuit (for example an AVR ISP programmer) or the Max232 or FTDI kind of stuff. <A> The idea behind the Arduino bootloader is that you don't need any specialty hardware or circuits to re-program them, compared to the initial programming of it, or older microcontroller, which often need a dedicated programmer (like PicKit2 for PIC MCUs). <S> Of course, at the time, you needed the serial link, typically a rs232 converter from TTL to RS232. <S> Then serial ports being phased out, usb to serial became ubiquitous, allowing for that to replace a max232 or similar. <S> And now, the use of USB enabled Atmel microcontroller allow even that to be unnecessary, so a single ic with minimal passive parts could provide the Arduino functions and USB to Serial. <S> Now you only need a usb cable and a few passive to upload a sketch. <S> The initial programming of the bootloader still requires traditional ICSP programming.
|
The bootloader allows programming over a basic serial connection.
|
How do I detect open-source licence violations by companies? Let's say I have an open source project with a license that prohibits commercial uses. Then comes along a commercial product with striking similarities in functionality/hardware. How would I go about inspecting the commercial product to see if they are using parts of my source code? I realize I could do an image dump, but is that really useful, or easily obfuscated? Are there any simple tricks I could use, such as adding strange corner case behaviors, that would allow me to easily detect if anyone has copied the source verbatim, and are not overly obvious? Bonus legal question: can I somehow subpoena the source code, if so what do I need to have to present 'reasonable doubt'? <Q> Often running strings on the two binaries and comparing the results can yield telling results: strings <filename> From the strings man page: strings - find the printable strings in a object, or other binary, file <S> The results may not be identical, but it may show key similarities between the files. <A> Perhaps try this: http://www.binaryanalysis.org/en/home <S> For the legal question, I would try emailing the Software Freedom Law Center: http://www.softwarefreedom.org/ <A> Here is a nice article by Multimedia Mike (ffmpeg/mplayer) about the second trick you mentioned (exploring corner cases). <S> There are no GPL violations on YouTube side, but it is fun nevertheless. <A> How about a poker bluff inspired by Apple? <S> (Their lawyers sends a lot of papermail, even if their cases are bogus :) <S> Maybe mentioned that the case will be handed over to someone like the EFF within XX days if they don't replay. <S> And if you are lucky they will contact you <S> and you can get some money out of this situation.
|
You simply write them a letter where you claim that they are doing copyright violation on your code, and then offer them a deal to settle "out of court".
|
Desoldering an SON package I have recently discovered that my AVR Dragon has a busted voltage regulator (see this ). I am trying to remove the voltage regulator IC so I can perform the mod specified on that page, however it is a SON package with what looks like all of the pins under the chip. Is there any way I can desolder this with a (very good) temp controlled iron? I have given it a whirl with some extra solder + braid with no luck. <Q> Sounds like a job for hot air. <S> I've had success with removing components using a cheap craft tool such as a dual speed heat gun. <S> You can also find some that you can make such as Hot air pencil for under $20 . <A> If it has these "exposed metalized features" shown in the PDF then you can probably get it off just by heating those up. <S> I just put big solder globs all around the chip so that I can keep the entire glob heated at once, and when it comes loose, push it off. <S> You might knock off nearby parts in the process, and if the PCB quality is poor, you might overheat and remove the protective mask? <S> layer, but these can be dealt with. <S> Actually, if you don't care about the chip, just destroy it. <S> :) <S> When I blew up an IC with a solder pad under it, for instance, I cut off all the regular leads first to make the job easier. <A> Then slip the tip of a dental pick under the side of the chip and gently pry up while heating the chip with a hair dryer. <S> You might make a heat shield for the rest of the board by loosely covering it in aluminum foil with a cutout slightly bigger than the chip you're removing. <S> If it helps, solder melts around 218 C. <S> It starts to melt below that, but it's fully liquid (above the "liquidus point") at 218. <A> Removing leadless packages is easy with a good hot air station. <S> To speed removal up, it helps to set the temperature high - I work around 420 to 480 deg C. <S> Don't worry about overheating it: You're not often bothered with saving a dead part and a voltage regulator is cheap, anyway. <S> Also, I set airflow rate to near maximum. <S> I choose a nozzle which covers the chip entirely. <S> If such a nozzle does not exist (i.e. the chip is too big <S> - I had to remove a 208 pin TQFP once) <S> I work around the edges of the chip until it shows signs of moving. <S> If the nozzle does cover the chip, I just put it over, wait a few seconds and the chip will usually come off when you remove the nozzle. <S> Remove it quickly or the solder may solidify and stick to the board. <S> Be careful with hot air, as it will often remove other components. <S> 0603's don't stand a chance if exposed for more than a few seconds <S> and then you'll have to solder more. <S> My hot air station is built into my soldering station, an Aoyue 968. <S> But you can get a cheaper hot air only station. <S> Dave Jones of EEVBlog did a review of one recently .
|
I've had good success using solder wick to draw off as much solder as possible. If the chip is already bad, you don't need to worry about ruining it.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.