Wednesday, 7 September 2016

pcb fabrication - Methods of sliding PCB in straight line on drill press


I use a drill press like the first one in the linked answer at home for drilling my PCBs. If there was a way of sliding a PCB along a straight line left-to-right (or front-to-back) it would make drilling holes which are in a straight line much faster.


Do such slider systems exist without big costs? Or is there a design someone can share for making one? If there could be a system which also has ratchet-type stops every 0.1 inch, and which is equipped with a "latch" to switch between left-right and forward-back, that would really help.



Answer



A cross-slide will work for you as well. I have one on my christmas list. :-)


Tuesday, 6 September 2016

For a small Vin-Vout difference, is it worth using an LDO vs a buck regulator?


I want to step down 5V to 3.3V at around 250mA.


As far as I see it, there are two options to consider:



  • Buck: more space, higher cost

  • LDO: less space, lower cost, more difficult to remove heat(?), less efficient(?)


What I am wondering is will the LDO be more efficient and better at doing this job? I've heard things like 6V to 5V solutions usually use LDO's instead of buck regulators because they are more efficient, but I'm wondering if this works for 5V to 3.3V?



Answer




Dropping 5 to 3.3 V at 250 mA will mean having to lose 0.425 Watt in the LDO, you will need a massive heat sink to make that work.


An LDO will never be more efficient than a buck converter, unless you need so little current that the power used by the regulator itself becomes an issue.


I have a mis-designed PCB right now where I tried doing exactly what you are proposing to turn 5 V into 3.3V at 200 mA and even though I have a large'ish copper plane as a heatsink the LDO still reaches 80 deg C in a few seconds.


I'm currently redesigning my power supply to use a MC34063A converter in stead.


flipflop - What is wrong with my D flip-flop toggle switch?


Until a few weeks ago, I had never drawn a circuit diagram in my life, so bear with me. I am currently trying to design (in Logisim) a circuit that acts like a toggle switch, using only basic logic gates and no clock. Basically, I want the LED output to turn on when the SINGLE button is pressed and off when it is pressed again, and I have been experimenting with all manner of SR latch/D latch/other combinations to no avail.


I am trying to do it now by making a D flip-flop from scratch, with the button serving as the "clock" and the final Q' output looping right back around as the D input in the first latch, as shown in the picture:



I've looked over this flip-flop very carefully, and I thought I had the master and slave lined up correctly, with the inverters in the correct places, etc., but according to Logisim, it is not correct and doesn't work. What am I missing here?




Answer



I duplicated your circuit in Logisim (as an opportunity to do something in Logisim). There's nothing wrong with your circuit. There is something about Logisim I don't understand.


First off, the red lines are not lines in a high state; they are errors. One would expect this sort of error if two outputs were tied together. I did a bunch of breaking the circuit and tying lines high or low, and eventually, all the errors were "flushed out" and reconnecting the circuit normally produced the toggling it was designed to do.


Specifically, break the upper leftmost wire, the one that connects Q' to D, then connect D to a high or low source ("pull resistor" works well here), and toggle it until it's all green. Then, reconnect the feedback, and it will all work. Note that high and low are represented by green and dark green (?).


Pressing "Reset Simulation" will bring all the errors back. My guess is, that somewhere in the logic of the program, it has an "undefined state". These undefined states propagate through the gates to the extent that they don't "sort themselves out" the way real electronics do. Undef AND 0 should result in 0, not Undef. Same goes for 1 OR Undef.


Just in case this has been addressed in a later version, I'll note this Logisim is 2.7.1




Update: I "fixed" the problem (within the scope of this simulator, anyway) by inserting a NOR gate in the feedback path. Then connect a pushbutton to the other input. I replaced the original button with a clock signal (found under "wiring"). Now, pressing the button clears the error. (Resetting the logic brings the error back).


Monday, 5 September 2016

Measuring an Arduino's power source voltage using Analog In


I am powering an Arduino using a 5v battery (3.7v to a step-up module), and I need to measure the voltage. Let's say the battery delivers high current, is it safe to measure the voltage via Analog In? As in this:


enter image description here


The reason I'm asking is that I don't know much about the Arduino's ADC architecture and limitations. So normally, I'd do so for safety:


enter image description here


Are the connections in the first diagram safe for the ADC? Thanks in advance!


Note: A similar question was asked here: (Monitor DC Power Usage), but it doesn't answer the question of high current loads on the battery.



Answer




Check the datasheet for the input current on a I/O pin It depens on the exact type of controller on your Arduino. It is probably called Input Leakage Current I/O pin and will be near 1μA.


Here is a typical ATmega datasheet used on Uno / Duemilanove / ... , you can find the parameter on page 304. Check the datasheet for your specific controller for accurate details.


If you use a 3.7V battery and a step up converter to supply 5V to the controller, you can connect the battery directly to your controller analog input. However when the output voltage of the step up converter drops below the voltage of the battery (for whatever reason) then your entire Arduino will be fed through the analog input pin and that is what you don't want. All input pins have protection against overvoltage which enables this behaviour, but the diodes are not rated for continuous currents. In conclusion: it is best to include a series resistor between battery and input pin.


But now your measurement relies on the accuracy of the 5V power supply. Depending on which exact controller you have, there are various internal reference voltages available which are far more accurate than the power supply voltage. If you add an extra resistor to ground (R2) you can use such a reference to accurately measure the input voltage. This is called a (resistive) voltage divider. With the given ratio, the voltaga on the input pin will be 1V when the battery voltage is 3.7V:


\$V_{measurement} = \dfrac{R2×V_{BATT}}{R1+R2}\$


schematic


simulate this circuit – Schematic created using CircuitLab


Simple Audio amplifier Using Transistors


I would like to build a simple audio amplifier using transistors. I know there are IC designs specifically for the task. But i want to use transistors so i can learn how to use them for amplification.


How would I go about designing an audio amplifier from just discrete components.




arduino - How to charge Polymer Lithium Ion Battery that comes with the Lilypad Development Board


There is a Lithium Polymer Ion Battery that comes with the Lilypad Development Board from Sparfun. Does anyone know if the battery charges if we plug in the battery to the Lilypad Arduino and connect the Lilypad Arduino using the FTDI at the same time. The battery specifications are in the URL below: http://www.sparkfun.com/products/731


Here is the link to the Arduino Board which takes power via the 6pin FTDI or via a LiPo battery connected to it: http://www.sparkfun.com/products/10274



Answer



Yes, it will charge the battery. It has a MCP73831 Li-Ion charge controller IC for this purpose.


Note this refers to the Lilypad Arduino Simple board only (the one you link to) - the "Lilypad Arduino Main board" does not appear (from a quick look at a pic) to have anything in place for charging a battery.


integrated circuit - Analog function generator ICs?



Does anyone know of any old-school function generator ICs (similar to the ICL8038 or XR2206) that are still on the market? (i.e. not obsolete / NFFD - I'm not interested in scouring the globe for old inventory)


I'm aware of digitally-programmable parts that use I2C / SPI, but am looking for something that won't involve adding a micro to a legacy design.


I'm looking primarily for an IC that will output a triangular waveform at low frequency (640Hz). The XR2206 was the original part in the application which is now obsolete. The frequency can be adjusted a small amount from an external input (+/- 50Hz or so).


Exar has obsoleted most (all?) of their function generator parts:


enter image description here



update:
The product has passed into obsolescence and the assigned engineer is no longer with the company. The question is now moot.




arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...