texts: Wear leveling on a microcontroller's EEPROM

texts:
For example: The datasheet for ATtiny2313 (as do most Atmel AVR datasheets) states:

  128 Bytes In-System Programmable EEPROM Endurance: 100,000 Write/Erase
  Cycles

Imagine a program only requires two bytes to store some configuration, the other 126 bytes are effectively wasted. What concerns me is that regular updates of the two configuration bytes may wear out the device's EEPROM and render it useless. The whole device would become unreliable, because at a certain moment you just can't keep track of which bytes in EEPROM are unreliable.

Is there a smart way to do wear leveling on a microcontroller's EEPROM when you effectively use only one or two bytes out of available 128?


texts: In a Full Adder what's wrong with [c.(a+b) + a.b] as the expression of the Carry-Out? I checked it with truth table and gives correct output. But in all books the expression is [c.(a XOR b) + a.b].


texts: Turns 12 volts DC to 60 volts DC with 2mA

texts: I need help to design a circuit that turns 12 VDC input to 60 VDC output while supplying 2mA of current. I tried a boost converter but i keep getting microamps of current and I'm having difficulty lowering the voltage. Also, the voltage and current keep fluctuating, it needs to be stable.  It is currently at 125V and 5.96uA. I'm thinking that I may need another transistor or change one of the components values. I have increased and decreased every component's value but it causes other problems such as the voltage going down the 11V, the current being too high, etc.


texts: Output impedance refers to open circuit o/p impedance or short circuit o/p impedance?

texts:
When we specify output impedance of a two port network, does it imply open circuit output impedance or short circuit output impedance? Wikipedia: output impedance ; Wikipedia: two-port network

g22 (Short-circuit output impedance) = $$\dfrac{V_2}{I_2}|_{V_1=0}$$
z22 (Open-circuit output impedance) =  $$\dfrac{V_2}{I_2}|_{I_1=0}$$

For eg: When we say an ideal amplifier should have low output impedance, does it imply g22 or z22?


texts:
After completing many basic circuits on stripboard and premade PCB I've decided to try my hand at making my own PCB. Following some other forum posts this seems do-able but will likely take some trial and error to get right.

As a side note, it is impractical for me to send my designs off and have them professionally made because I live in Perth, Australia and the few local manufacturers only handle large quantity orders. Overseas is a potential option but the shipping costs are not ideal and more importantly they can take weeks to arrive.

I have decided to go with a photoresist method rather than the 'press n peel' toner transfer and have found a few (what I think are good) guides:

http://www.electricstuff.co.uk/pcbs.html
http://www.foxhunt.com.au/misc/pcb/making_pcbs.htm

As informative as it has been to scour the wealth of knowledge in this area thats all over the internet it has inevitably lead to many differences of opinions and many different methods depending on whats available to the user. The big disgusting blob of text that follows this is how i am currently planning to undertake my first PCB build. Although ive phrased it more like a plan than a question i would greatly appreciate it if anyone experienced in this area could weigh in, hopefully save me from any big mistakes and tell me if ive forgotten anything.

Presensitised PCB

I have locally available "Kinsten Positive Resist PCB's" along with its developer solution and this is what lead me to the second link (a guide centred around the use of this brand of PCB). This site also suggests an Espon inkjet printer for best result, lucky for me as this is all i have :)

Developer

A Kinsten brand developer that can be bought with the PCB, this is largely the reason for my choice as they they should work well together. The second link also states that the developer is sodium metasilicate which the first link seems to shower with praise, most appealing to a first timer is that it is apparently very hard to overdevelop.

I have a few spare fluro lights and plenty of guides so i will be building my own exposure unit. From what i understand i will be best using a piece of paper to judge the optimal spacing of the lights to give an even coverage. Then i will need to remove the outer tubes which block the UV light but ensure the box is completely sealed for skin and eye safety.

Transparencies

This is my biggest area of uncertainty, from what i can gather the transparency of the material only really has an impact on the exposure time, the hardest part seems to be finding a material that prints well with a specific printer. Unfortunately this may warrant a bit of trial and error, I have an Epson Stylus Photo TX710W, if anyone has any specific information in this area that could save me time/money I'd be glad to hear it. Otherwise my first try will be with some 90gsm tracing paper.

Etching

Available as an etchant I have easy access to Ferric Chloride (premixed 500ml no directions on reusability but i have read elsewhere it is reusable). Or ammonium persulphate (600g with directions to mix 1:5 with 70C water. used solution must be discarded)

I dont really want to splash out $120 for an etching tank on my first attempt but I've read a plastic/ceramic container + regular agitation is sufficient.

Drilling

The internet seems pretty one sided on Tungsten Carbide drill bits to have any sort of decent lifespan, i can get a set of these for ~$10 from EBAY but i was wondering if anyone could vouch for their quality? or put me onto a better supplier altogether.

I already have a drill press, however i am doubting that its up to the job, its quite a large 5 speed one capable to 600, 900, 1250, 1750 and 2500RPM but the second link suggests this is far too slow. If this is so what is my best option? Ive seen some people use a dremel + vertical dremel stand?

Im a newbie so all suggestions are welcome and thank you for helping!!!


texts:
I am a hobbyist, and lately I've been reading up on N2 TEA lasers.
Here is the article I've been reading so far:
The TEA Nitrogen Gas Laser
In the introduction, the author uses the E/p ratio. Which, as he explains, is the ratio of electric field to pressure and discharge length.
In the following excerpt from the site, he derives a gap distance of 0.6mm for the electrodes based on the input voltage and his chosen E/P value. However, I'm having trouble following him here:

Assuming a value of 200 V/cm-torr (an "accepted" value), an applied voltage of 7500 volts, and a partial-pressure of nitrogen of 608 torr (80% of 760 torr), the electrode spacing would be only 0.6 mm!

Can someone please explain what the E/P ratio is exactly and help me understand how I would exercise this principle myself? I've tried googling it and the results either lead me to more articles that use the E/P ratio without explaining it, or to the price/earnings ratio which is something completely different.
Thank you very much for giving my your very valuable time!


texts:
I was looking for related questions here, and the closest one I could find was this one: Industry Practices for Schematic Design?

However, it does not address my specific question, so here goes: I am not an EE and am just trying to learn Eagle so I can break my reliance on ExpressPCB, which I have found to be okay for simple projects, but being stuck with their proprietary format, tool, and fab no longer appeals to me.

In my past, limited experience with making schematics, I lay out the pins in numerical order, which is typically pin 1 to (N/2) from top to bottom on the left, then pin (N/2+1) to N from bottom to top on the right.

While that's fine and all, I'm now laying out a board for the MCP73123 to test a LiFePO4 charger (because of my other post here) and noticed that in Microchip's datasheet, they lay out their schematic like this:

Personally, I would think this is the way to do it, since CAD/CAE tools know what the correct pin assignments are anyway, and this looks a heck of a lot cleaner in the schematic since related pins are within close proximity of each other.

So my question is simply, do you experienced PCB designers typically do this, or do you go with the numerical-order approach?  What do you consider to be the pros / cons of each approach.  Also, is there another methodology?


texts: How to mux 10 sensor units with 4-pin that must communicate with a single unit with 3 programmable input

texts:
I have 10 sensor units, each unit has 4 pin Vcc, Gnd, Digital out and analog out.

The main control unit that must receive the outputs has 2 pin for Vcc and Gnd and the others 3 pins are freely configurable for both digital and analog I\O operations.

I want to connect all the 10 sensor units at main control unit, but isn't strictly needed that the output of all the 10 units is received exactly at the same time (so eventually they could be alternated with some little delay each other).

How should I accomplish this?

Notes:

It's enough just analog output of each sensor for values, the digital isn't strictly needed

The output voltage of each sensor is in the range 0.1 - 5 Vc


texts:
What are the directions of the rotor conductor, stator magnetic field, and rotor magnetic field?
DOo they all have the same direction of rotation?
How are they related to each other?
Is the relative speed between the rotor conductor and stator magnetic field the same as the relative speed between the rotor conductor and rotor magnetic field?


texts: How to convert an AC volatge to DC using TRIAC?

texts:
I have just performed a phase angle control using triac and in which i want that ac voltage to be converted to DC.
 I have used rectifier with triac and the output seems well.

But if i add a filter capacitor, the situation is not good. The voltage becomes high enough.

Phase angle controlled ac voltage - 83 voltsAC
Dc rectified voltage with capacitor - 300 volts


texts: Would a small hole in a Faraday cage drastically reduce its effectiveness at blocking interference?

texts:
I'm shielding the pickup cavity of a guitar to minimize interference. I'm doing this with copper tape that has conductive adhesive, and I'm connecting this tape to ground.

Without getting into too much detail, let's say there's a small spot I miss or purposely leave uncovered because it's difficult to reach, so that the Faraday cage is not completely "sealed" all the way around. Would this drastically reduce the effectiveness of the cage, or would it simply reduce it proportionally to the size of the hole?

I ask because I'm fine if it's just slightly less effective, but if it ruins the whole thing, then I'll put in the extra effort.


texts: Convert Metronome circuit to Visual Metronome (LED blinker)

texts:
I'm trying to make a Visual Metronome, i have a prebuilt one already (bicycle light) but it has a very high frequency of lighting up (2 flashes in 1 second).

I have a circuit for metronome, to which i added an LED, alongside the speaker, and it works fine, both the sound and light work as expected, giving 60 BPM output. (with change in C from 22 uf to 10 uf)

Orignal Metronome Circuit:

Visual and Sound Metronome, by Adding an LED:

Now, i am trying to make just a visual metronome from this, without the sound... That is, only with a blinking light, at 60 Blinks per minute...

The problem i am facing is that, if i remove the piezo speaker, i get a constant glow of LED, or get a blink in many minutes, and it only starts to blink correctly when i add the speaker back. I have tried adding a resistor across the LED, but that did not help.

I did see this question on EE, SE, and tried the circuit suggested by Jasen, but it didn't work for me... ( 3V LED Pulse Circuit )

So, i am wondering what alteration i need to make to the circuit, for the LED to blink, without the speaker added, to make it just a Visual Metronome, maybe with a couple of LEDs at a later stage.

This does not blink or blinks in minutes:

I do not have simulation experience, so i am unable to troubleshoot this with a program.

Thank you.


texts: Can the skin / copper oxide / copper junction of an old exposed mains conductor produce a safety-significant DC component to a shock?

texts:
Copper oxide diodes are not common now but were a standard item along with selenium oxide for early power rectifiers (think old radios and those components with stacks of fins).
Can the oxide layer on an old, exposed copper mains conductor provide any significant amount of (pulsed) DC component to an individual who accidentally touches it and is sufficiently grounded that they draw an AC current sufficient to be dangerous?
AC and DC currents have different physiological effects on nerves and muscles so a question about the distinction may be relevant, but here I'm only asking if the skin / copper oxide / copper junction would provide enough rectification to have to be considered separately from a pure AC scenario.

Background on copper oxide rectifiers:

The Copper Oxide Rectifier
Applications and Characteristics of Copper-Oxide Rectifiers July 1933 Radio-Craft
The Copper Oxide Rectifier (1936, paywalled)

YouTube:

(#0062) Selenium & Copper Oxide Rectifiers - Different Types & I-V Curves
Antique Tech: Copper Diodes, Solenoids, Shading Coils, and Lionel Trains


texts:
I need 12V 2A power supply for DC motor. Can someone suggest me schematic? I found few schematics on web but I want suggestion of professionals here. I don't want to burn my house :)

Thanks in advance


texts: Use Raspberry Pi to power a low noise inverting amplifier with negative voltage input

texts:
I am looking to use a Raspberry Pi to power and read the current from a current-to-voltage converter. I am currently using two batteries to power the operational amplifier, as shown in the schematic below. Please ignore the potentiometer, it is an attempt at mimicing a sensor and is for illistrative purposes only. I would like to measure the current going through the sensor.

However, I am finding that the 9V batteries I'm using to give the op-amp a negative voltage are running low pretty quickly, so I would like to power the op amp through the Raspberry Pi.

The sensor has a constant voltage input of 50 mV and a variation in output voltage from the op amp of 1 mV (even with the gain). The sensor is similar to a thermocouple or resistance temperature detector in terms of its small changes in current.

I am unsure if using a resistance divider or similar (as shown here: http://tangentsoft.net/elec/vgrounds.html) will wash out the signal. E.g. Voltage division with 2.5 V going into the op amp when I'm looking for mV changes.

Is there a way to redesign the circuit to operate from a single supply voltage source? Thanks!


texts: Using Enable to switch between two Decoders

texts:
I am trying to put an enable input in a 4-to-16 decoder so I can select between two decoder. Here is a schematic:

I am using two decoders to select two different addresses in a 16x16 SRAM. I am thinking about using an enable input to switch between the two decoders. For example, if enable is high, the top decoder selects an address. If enable is low, the bottom decoder selects an address.

This is the decoder vhdl but when I try putting an input enable in, and do if enable ='1' then , it doesn't work.

library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity decode4to16 is
    port(
        enable: in std_logic;
        oct : in std_logic_vector(3 downto 0);
        dec : out std_logic_vector(15 downto 0));
end decode4to16;

architecture arch of decode4to16 is
begin
if enable = '1' then
with oct select
dec <=
"0000000000000001" when "0000",
"0000000000000010" when "0001",
"0000000000000100" when "0010",
"0000000000001000" when "0011",
"0000000000010000" when "0100",
"0000000000100000" when "0101",
"0000000001000000" when "0110",
"0000000010000000" when "0111",
"0000000100000000" when "1000",
"0000001000000000" when "1001",
"0000010000000000" when "1010",
"0000100000000000" when "1011",
"0001000000000000" when "1100",
"0010000000000000" when "1101",
"0100000000000000" when "1110",
"1000000000000000" when "1111",
"0000000000000000" when others;

end arch;

Someone suggested:

library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity decode4to16 is
port(
oct : in std_logic_vector(3 downto 0);
e : in std_logic;
dec : out std_logic_vector(15 downto 0));
end decode4to16;
architecture arch of decode4to16 is
BEGIN
process(e, oct)
begin
if e = '1' then
case oct is
when "0000" => dec <= "0000000000000001";
when "0001" => dec <= "0000000000000010";
when "0010" => dec <= "0000000000000100";
when "0011" => dec <= "0000000000001000";
when "0100" => dec <= "0000000000010000";
when "0101" => dec <= "0000000000100000";
when "0110" => dec <= "0000000001000000";
when "0111" => dec <= "0000000010000000";
when "1000" => dec <= "0000000100000000";
when "1001" => dec <= "0000001000000000";
when "1010" => dec <= "0000010000000000";
when "1011" => dec <= "0000100000000000";
when "1100" => dec <= "0001000000000000";
when "1101" => dec <= "0010000000000000";
when "1110" => dec <= "0100000000000000";
when "1111" => dec <= "1000000000000000";
when others => dec <= "0000000000000000";
end case;
else null;
end if;
end process;
end arch;

But when I tested it, the output remains when e = '0', this will conflict with the other decoder if they share the same bus wire. Is there a way (like a else case) where if e ='0' then, output nothing?


texts: Detect this FPGA board, where to find Schemantics?

texts:
Google image search returns birds and balls with this image but, as far as I see, it has nothing to do with them.

Google image search returns clothes, cotton and some odd small people with this but, as far as I can see, it has nothing to do with them.

I bought the board from Chinese site "www.21eda.com" but it is now closed. I have tried to find information in Chinese, more here, but I am unable to spot the right specs, I had them so I have some sense what they look like. How can I find schemantics (showing the logic/IOs/etc in the board)?

Specs

Cyclone II EP2C5T144C8N K BBD9Y0931A
Some chip: AM29LV160DB - 90EF 0929FBA D 1998 AMD
Some chip: Hynix 002F A HY57V641620FTP-6 KOR
Board ID: SN:21EDA0811577 (at the back of the board like here)
Probably the board here, now have to find the schematics/getting-started material.


texts: PIC's MSSP SPI = oddity, but bit-banging works?

texts:
I'm trying to get a PIC16LF1825 master to communicate with an ADXL362 slave over SPI at 1.8v.

First I tried the MSSP (PIC's serial port) configured for hardware SPI @4MHz FOSC, 1MHz SPI rate (minimum the ADXL recommended) at 3.2v. It sort-of worked, producing the following SCK and MOSI to the ADXL:

Note that the MOSI is being held high between bytes. The first sent byte is 0x0B (read register command), followed by a 0x00 (Device ID). So the third byte should be the returned data...

What the ADXL sent back however, was incorrect. It should be 0xAD, but instead I was getting all manner of incorrect values, 0x90 is shown. I tried all of the CPOL and CPHA modes to no avail. Is the MOSI being held high between bytes causing corruption of the interpreted data by the ADXL? Wouldn't think so... The oddest thing is that this returned value would change, seemingly randomly, even though nothing visibly was happening to SCK or the other pins. I checked for a pattern against possible returned values (was it displaying actual register contents?) but found no correlation. Disconnecting the 'scope probes (parasitic capacitance) had no effect. The XC8 code I initially tried looked like this:

/* Routine to fully exchange a byte with the ADXL362 - requires MSSP */
extern uint8_t ExchangeADXL(uint8_t txCommand, uint8_t txAddress, uint8_t txData) {
    SS_ADXL_SetLow();           // SS low
    SSP1CON1bits.WCOL = 0;      // clear any write collision flag

    SSPBUF = txCommand;         // send read/write/fifo byte
    while (!SSP1STATbits.BF);   // wait for exchange

    SSPBUF = txAddress;         // send address byte
    while (!SSP1STATbits.BF);   // wait for exchange

    SSPBUF = txData;            // send byte or dummy byte
    while (!SSP1STATbits.BF);   // wait for exchange (read result)

    SS_ADXL_SetHigh();          // SS high
    return (SSPBUF);            // return result
}

This is using the Microchip Code Configurator (MCC) to generate some baseline configuration for the device (time is of the essence of course.)

So then I attempted bit-banging. So I wrote a really hairy-looking piece of code, specifically to let MOSI go low between bytes, and lo-and-behold, it worked! (The FOSC was reduced to 250kHz and Vdd to 1.8v here.)

However, note the "noise" on the MISO line. This is new and wasn't there before. Double-checked all bypass caps, grounds, Vdd's, crosstalk, scope probes, etc. No idea what is causing it other than the ADXL.

Anyways, I switched the code back to using the MSSP instead of bit-banging, to see if the hardware would work at a much reduced speed. The commands are being sent very clearly to the ADXL, but the only thing it returns is the following:

Would anyone have any idea what is going on here? The noise isn't a huge concern... the lack of a reply is. It did reply (erroneously) before at 62.5hHz SPI rate and 1.8v, now it's not doing anything and noise is visible. I'd much rather use the hardware driver for SPI if at all possible.

(Not shown), SS is behaving as it should for all instances. As far as I can tell, all of the timings are within spec of the fairly demanding ADXL datasheet. Thanks for your assistance!


texts: I can't reach the correct current with a BJT in LTSpice

texts:
The diagram above is what was given to me. I have to make:

  Vce = 1V
  Ib = 30uA

I have two variable components, namely, Vcc (Voltage source from the collector), and Rin(supposed to be a pentiometer in practical applications). I was tasked to find Ic, but I'm having trouble because I'm only going with a trial and error approach to the circuit so that I can achieve the requirements above with the Vce and Ib, but I can't seem to find the correct values.


texts: Raspbery Pi GPIO + 7400 on a keyboard matrix. Source or sink?

texts:
I want to run a large switch matrix from a Raspberry Pi GPIO with the usual diode setup. I'm planning to chain some 74HC595 shift registers for the rows and read the columns from the Raspberry Pi GPIO.

If it makes any difference I might use 8 GPIOs and 2 shift registers, i.e. 128 buttons.

Knowing the current source / sink characteristics of both components, is it better to shift a high along the shift registers or a low? If it's high, the GPIO will have to sink. If it's high, the GPIO will have to source.

Does it make a difference either way? Can I do this without extra components or is a buffer advisable?


texts:
Is it possible to force a relay to toggle without changing the input to the coil? i.e. if the relay (a sealed SPDT, say) has 0V on the coil such that NC is connected, it is theoretically possible that a REALLY HUGE magnetic field could force the contact to the NO position.

How likely is this is a typical environment? Are there any relays which quote this theoretical value?

Are there any other ways this condition could be forced (or reversed)?


texts: how many bits a random-access memory's cell contains?

texts:
this question has something to do with programming but since it masters the hardware layer I created a new account here to avoid being out-of-scope on stack overflow.

I'm quite novice in the hardware field, I'd like to know how many bits a RAM's cell contains.

For example :

  I define a var (int)

  Knowing that an integer is 32 bits, if the
  location of var is let say 0x125 :

is the system reminding var as the value contained from 0x125 to 0x158 (32 bits allocated)

  or

is it just reminding the location 0x125 of the cell that contains a
particular number of capacitors (regarding the technology of the
memory card) ?

  in other words :
  is the address pointing to a set of bits or is the
  address pointing just one bit (the number of bits to read from that
  position would be determined by the system) ?

Any reviews would be much appreciated.


texts:
From a battery bank of 48VDC I would like to power 3 230vAC 3ph 10hp motors to power a large vessel.
Would 2 10kW inverters work for this?
Below is the what I envision.  VFDs would feed into motors with heater disconnects## Heading ##

simulate this circuit – Schematic created using CircuitLab


texts: Are I2C High Speed devices compatible with Fast Mode Plus?

texts:
I keep finding many I2C devices that specify Normal (100 KHz), Fast Mode (400 KHz) and High Speed (3.4 MHz) operation, but make no mention of Fast Mode Plus (1 MHz).
Would you expect these to support it nonetheless?
Here's one example: MCP4728 although I'm mostly looking for an answer that's not device-specific.
Things I'm wondering:

Is the same circuitry typically used for all I2C modes (and therefore intrinsically capable of MHz range operation), or is there usually a separate HS circuit on the device that kicks in when the host sends the HS command?

Do some manufacturers just not recognise Fast Mode Plus as a standard?


texts: AC zero Crossing detection with transformer

texts:
I am working on a circuit that requires zero crossing detection. I detected the zero crossings of the 230 Volt AC sine with the help of a full bridge rectifier and a 4N25 optocoupler with a pull up resistor as shown in the figure. .
I got this to work and with software I could determine the middle point of the pulse and accurately determine the zero crossing. However, the power loss over the Resistor R7 is a bit high. I used a 2 Watt resistor for this. I do have a transformer already used in my circuit. I use it in order to get an isolated 5 Volt DC to power my Arduino.
Which is this one: https://nl.rs-online.com/web/p/products/7320528/.
I could use the transformer output for the zero crossing instead of the 230 Volt. By doing that I could use a lower resistor value and therefore have a much lower power dissipation. The question that I have is about using the transformer. Are the zero crossings of the secondary output of the transformer at the exact same time as the primary (230 V) side? Or can their be a phase shift between the primary and secondary side?
thank you!
Edit:
The circuit would look something like this. The Isolated 5V goes to power my Arduino which will controls some opto-coupled outputs (low power).


texts: Step response and time constant of RC circuit with multiple capacitors

texts:
I need to find the step response and the time constant of the given RC circuit: :

Can anybody please share the method to solve this circuit?

Also, if R1=R2=R and C1=C2=C; then is the step response a step function( with Vmax= Vi/2) ?
I tried solving it using frequency domain analysis;

Vo(s)/Vin(s) = (R||1/Cs)/( R|| 1/Cs + R|| 1/Cs)

         = 1/2

since transfer function is a constant and the step input can be modeled byout Vmax/s;

Vout(s) = Vmax/2s;
Vout(t) = Vmax/2 * u(t)

which shows that the voltage across capacitor increases immediately.
Is this correct?
If so, how do we justify the immediate rise in the voltage across capacitor?


texts: AC Signal Conditioning for ADC (Design Choices)

texts:
I have a low frequency (50Hz) signal which can be positive or negative (centered around system ground) depending on the mode selected.  The signal has a maximum amplitude of +/- 12V.  So, just to be clear, when one mode is selected, the signal is positive from 0 to 12V and when the other mode is selected, the signal is negative from 0 to -12V.

Now, I would like to digitize this signal using a 12bit ADC (MCP3208 - datasheet) and it's fine (preferable perhaps) if the signal is rectified so that it is always positive.

So, I have two main choices: I can rectify and scale my signal, which will give me more digital precision or I can DC bias and scale the signal with the obvious loss of digital precision (converting 0-12V, as opposed to converting 0-24V).  Option #1 would seem the obvious choice, but my concern is with the precision rectifier circuit.

The question then is: which option will distort the signal the least and (in essence) how precise are precision rectifier circuits when compared to a simple buffered voltage divider?

I should add that in this application maintaining the shape of the signal is important, more important than resolution, I think.


texts:
I'm trying to get a SIM800L module working with a USB-to-serial adapter using this circuit:

simulate this circuit – Schematic created using CircuitLab

(All of those resistors are 1000 ohm.)

I have a 5V 3A supply (connected to a plug socket), which I'm converting to ~3.8V with an LM317. This is then being used to power the SIM800L module.

I also have a USB-to-serial adapter (connected to a USB hub on my PC), where I've connected its serial lines to the SIM800L's serial lines, and also connected its ground to the power supply's ground.

When this is turned on, the SIM800L blinks its light every second (which I believe means it's on but hasn't connected to a network.)

If I open screen or an Arduino serial monitor (at 9600 baud) and send the AT command, it usually doesn't respond with anything. At best, it'll respond to AT a couple of times with OK but then stop responding entirely.

I'm aware that the SIM800L can require quite a lot of current, hence why I've chosen to use an external USB supply. I measure roughly the expected 3.8V across the SIM800L module, and a draw of about 55mA when first powered on, setting to 14mA after a few seconds.

Why is my SIM800L not responding to commands properly?


texts: Powering an L298N's IC and an Arduino Uno R3 using an LM7805

texts:
Before i start i would just like to say that i am an absolute beginner at this, and this question might be a little silly.

I'm trying to make a shield that'll go on top of an arduino uno. The shield has an L298N IC that will drive 2 12VDC motor. I'm using a LiPo 3S Battery to power the shield. The shield uses an LM7805. The output of the LM7805 will power the Arduino Uno R3 through the 5V pin, an L298N's IC through the VSS pin, and a couple of line sensors.

Is it okay for me to power the arduino uno through the 5v pin, even if its connected to other components? I've heard that powering through the 5v pin is dangerous.

Here is an image of my schematic.


texts: How to calculate the value of compensation network of DC DC converter

texts:
I am designing a circuit to boost voltage from 5V to 9V.I came across various kind of Switch regulator from TI. I don't know how to calculate the R-C value of compensation network.

Thanks in Advance.


texts:
I'm trying to record heartbeats and breathing (movment of the chest) using the pc sound card. I've seen alot of application where they record heartbeats, but none discuss the breathing. I know that most sound cards block low frequencies to eliminate breathing noise, is there a way to disable this feature? I'm using DELL  latitude E5470 windwos 8.1, 64 bits with "HDAUDIO\FUNC_01&VEN_10EC&DEV_0293&SUBSYS_1" sound card. Any idea as to how to modify the sound card to disable the highpass filter?

Edit: Based on your feedback, I performed AM modulation on a simple 2 Hz sine wave with a carrier of 200 Hz then recorded it. I firstly connected only oscilloscope to the output and I got an AM modulated signal as the following (I increased the amplitude of both signals to 3 Vpk-pk for clearer view):

Then I connected an AUX cable to the output, again nothing changed, but as soon as I connect the other end of the AUX to the PC to record I get the follwoing signal on the oscilloscope.

This is clearly not an AM signal, and when I use the demodulation block in matlab, I get the following weird signals:

and finally after demodulation

note: I tried to only apply a low pass filter to the recorded input and I got my 2 Hz sine wave msg clearly. but then again, that's not modulation and I can't combine multiple channels if their frequencies do not change. What am I missing now?

thanks


texts: Logic gates. BCD Multiplication. Karnaugh maps (I think)

texts: I have to draw minimum combination of logic gates that multiply any BCD number with a 7. Output is also in BCD. It probably has something to do with Karnaugh maps, that's how we do this sort of problems in class. I don't even know how to start.


texts: Creating a DC input ATX power supply using buck converter

texts: I am working on a project which requires me to use a battery to run a computer. I planned to work with a 24V battery connected to a DC input (24V,1000W) ATX power supply and connect it to the PC. But now that the ATX power supply is very bulky and more concerning is its efficiency (around just 75%). Since buck has very good efficiency i can do some work around and get the voltages 12V, 5V & 3.3V. But i am not sure how to design on the power good and power ON signals(For instance i know both signals operate at 5V but not more than that). As for the protection circuit, we can have a fuse installed or i can install a circuit breaker in the buck converter.


texts: Why is 45 degrees considered minimum phase margin. Is it just for stability considerations or some other reasons too? Thanks.


texts: Can I add a battery to some camera device?

texts:
Let's take Kodak Playfull HD camera, inside it has such battery with 3 wires:
video
Fully charged it works for about 2 hours, and I need more, so I want to add external source. I think I can connect batteries in parallel, it means just connecting to these wires (2 of them, and third works for charging probably). Is it right?


texts:
Today I investigated a cable which is around 900m long. I used a TDR that injects a needle pulse into the system with a width of around 40ns. The needle pulse had an amplitude of around 2V. A reflection never came back. I wonder why there wasn't a reflection visible. I used a pulse with a width of around 30µs and also 2V amplitude and could see the two pulses overlapping like that:

But the reflection of the needle pulse couldn't be seen. I have two assumptions:

the amplitude of the signal was too small, but then why could I see the wide pulse?
The energy of the needle pulse got somehow fully absorbed by the cable.

Do you guys know why I couldn't see the short needle pulse?


texts: Does electricity always flow in a closed loop and why does current flow to ground?

texts:
I have been taught that current flows in a closed loop back to the source. And with electrical distribution, current flows to ground because the whole grid is effectively grounded back to the source. Therefore if you were to touch a hot lead, current will flow from your hand through you body and out your foot to ground and back to the source.

My question is what if the source is not grounded to earth? For example, let's say you have a mobile generator that runs off a diesel engine and powers an alternator. The whole generator is insulated from earth because the rubber tires and the alternator is not grounded. In theory, you cannot get shocked and current will not go to ground if you touch one of the leads because the ground is not connected to the source which is the alternator. Is this logic correct? Please Help!


texts: VHDL: difference between using "+" or writing our own adder

texts:
I would like to know what would be the difference between between using "+" or writing an adder for adding two numbers:

library ieee;
using ieee.std_logic_1164.all

architecture one of my_adder is
       component f_a  -- suppose we have a full adder
       port ....
       end component;

       FA: for i in 0 to n generate     -- suppose we just carry chain the full adders
            FA_i: f_a PORT MAP ...
       end generate;
end;

VS

library ieee;
using ieee.std_logic_1164.all
using ieee.numeric_std.all

architecture two of my_adder is
       out <= A + B;
end;

What would be the difference? What would happen during synthesis? What would be the consequences on a FPGA?

Thank you.


texts: HTTP Post error using ESP8266 from Arduino

texts:
Using Arduino on an STM32F103C Blue Pill to drive an ESP8266 ESP-01 as shown below, and this tutorial: Arduino Forum

I am attempting to do an HTTP POST with the following code:

String ssid = "MySSID";
String password = "MyPassword";
String server = "192.168.1.134"; // IP hosting API (Flask w/ Python)
String uri = "/api/create/current/"; // API Route
String payload = "?outlet_id=1&voltage=2&vrms=3&amps_rms=4"; // Sample sensor payload

void httppost() {
  Serial2.println("AT+CIPSTART=\"TCP\",\"" + server + "\",80"); //start a TCP connection.
  if (Serial2.find("OK")) {
    Serial.println("TCP connection ready");
  }
  delay(1000);
  String postRequest =
    "POST " + uri + " HTTP/1.0\r\n" +
    "Host: " + server + "\r\n" +
    "Accept: *" + "/" + "*\r\n" +
    "Content-Length: " + payload.length() + "\r\n" +
    "Content-Type: application/json\r\n" +
    "\r\n" + payload;
  String sendCmd = "AT+CIPSEND="; //determine the number of characters to be sent.
  Serial2.print(sendCmd);
  Serial2.println(postRequest.length());
  delay(5000);

  if (Serial2.find(">")) {
    Serial.println("Sending..");
    Serial2.print(postRequest);

    if (Serial2.find("SEND OK")) {
      Serial.println("Packet sent");

      while (Serial2.available()) {
        String tmpResp = Serial2.readString();
        Serial.println(tmpResp);
      }
      // close the connection
      Serial2.println("AT+CIPCLOSE");
    }
  }

The post request is failing on the server-side with the following error:

Unexpected Error: malformed JSON in post request, check key/value pair at:

Nothing is else contained the error message or Flask server logs to indicate how/why the JSON is malformed. Using Postman, I'm able to perform a successful post with the following:

192.168.1.134/api/create/current/?outlet_id=1&voltage=2&vrms=3&amps_rms=4

Does anyone see anything obvious? FWIW, using the Blue Pill to power the ESP8266, or alternatively using an external power source produce the same results. It seems to be a syntactic problem but I'm not seeing it. Any help is much appreciated!


texts: Are there any SD cards optimized for single block read/writes?

texts: I have used SD cards for several embedded applications over the years.  However, as cards have gotten larger, the single block read and write speeds have dropped.  I suspect this is largely because the page sizes are larger and larger.  Most SD stacks do not perform multiple block read/writes and so therefore in embedded applications we can never get megabytes per second like you can using a PC.  Part of this is due to the clock rates we can use, but most of it is due to the time it takes to do single block read and writes.  Does anybody know of any SD cards which are 'optimized' to do this?  If there are any other suggestions for getting around this limit, I'm all ears.  However, it would be VERY difficult in my application to implement multiple block requests for various reasons.


texts:
I working on an LED lighting project where I will be installing 20 boxes in a space, each containing 4 LEDs (RGB and IR.)  I want to connect all of these boxes to central board which will drive all of the LED's using PWM signals.

----- Generic Questions:

Can I utilize all of the wires in the twisted pairs to send PWM signals, or should I only send one signal per twisted pair?

How badly will the PWM signal degrade over distance if 4 or 8 different signals are sent?

Will increasing the current (to 200ma or 400ma) hurt the signal (I am considering driving the LEDs with the signal, directly out of the cable)?

Should I send the same signal down both wires in a twisted pair, or should I pull one of the wires high (5v) or low (0v)?

----- Bonus Question and project specifics:

I will not be filtering the signal. Regarding precision, cost is a major concern for this project (we have a shoe string budget, so complexity will limit the number of boxes we can install.)  10% variance in LED output between the boxes is ideal (that will allow us to almost display #fff hex style colors.)

I will be using transistor arrays receive the PWM signal and supply power to the LEDs. Can I avoid he need for a circuit within the individual boxes by placing my transistor arrays on the central board, 20 feet away?


texts:
I am trying to control a linear actuator using a cheap remote controlled 2 channel relay (it controls a gate for my workshop dust collector). I'm think it's as simple as connecting each relay the same way...

NO: +12v from power supply

Comm: one motor line on relay 1 and the other motor line on relay 2

NC: neutral (ground? Or -12v???) from power supply

This gives me the following voltages on the common lines...

No relays activated = NC / NC = neutral

Relay 1 activated / relay 2 off  = NO / NC = +12v

Relay 1 off / relay 2 activated = NC / NO = -12v

Both relay activated  = NO / NO = 0V

I feel comfortable I got everything above right except that last line. If I put 12v on each side of the motor then I should have no voltage difference and therefore no current running through.

This thing sits around in one of these states all the time in a remot barn so I just want to confirm nothing is dangerous about my setup.

Is there a better way to do this? If above is safe then I have to remember to shut off each relay once the actuators reaches its end position (closed or open). What I need is a circuit tho if I press 1 it closes (+12v) and if I press 2 if opens (-12v). The linear actuator has a switch that opens once it has rich its final position. So trying to press 1 or 2 more times won't do anything until it goes the other way.

Thanks for any feedback or suggestions.


texts: Compact solution for low voltage AC generation from switching power supply

texts:
I have an app which will have a pretty standard flyback switched mode power supply, the design is yet to be chosen but it will be isolated ~6W output, with standard mains input. For example, say something like STEVAL-ISA004V1 or for example TEA172x based solution.

The app will have logic and MCU so 5V and 3.3V will be part of the output, and transformer will have multiple taps.

My question is, whats a good compact way of generating fixed frequency 50/60hz low voltage AC from there, like 16VAC at 0.1A ? Doesnt need to be perfect sinusoidal but close enough.

The obvious way would be to have about 32V DC rectified and then do H-bridge inverter, with the MCU spare PWM channel doing DDS generation of the waveform.

Btw i guess if the load is rated "16VAC" then the DC voltage before inverter has to be 2x16, i.e. thats peak to peak, not RMS?
All the inverter designs i'm finding are for 110V/230V, nothing low voltage, so i guess the best bet is using integrated H-bridges designed for small brushless DC motor drives.


texts: Switchable serial bridge (Bluetooth or USB -> Telemetry)

texts:
So I've got a simple serial bridge (wireless telemetry -> bluetooth).

Now what I would like to do is to be able to use either USB or bluetooth to access the telemetry module (Not at the same time).
Also Ideally when using USB the power would come from USB, and when using bluetooth power will come from the battery.

I guess I'm going to need some way of isolating power from USB so it only powers the telemetry (I've got a switch to turn the whole thing on and off in between the battery and the regulator at the moment). Also stop the serial connection going the 'wrong way' from usb to bluetooth?

Is there a way to do this with just discrete components?

Thanks


texts: How to control charge on a high-voltage capacitor after voltage multiplier?

texts:
Can anyone think of an electronic way to control the charge on a high-voltage capacitor that is fed by a multi-stage voltage multiplier?

I can control the charge on the way up by controlling the input voltage to the multiplier (multiplied voltage output is proportional to DC input voltage on the multiplier). But once the output voltage and load capacitor reach 20-50KV, I can't think of a way to bring the voltage back down under control.

You could think of Van de Graaf generators, Tesla coils, and voltage multipliers as models. I'm trying to think of a way to control the charges produced by all of these devices. (As a thought experiment for now, since I can't figure out how to design or build anything that seems credible for the job.)

Shorting it out physically seems to be the only obvious way, all in one go. But I would rather have an electronic way of control, if possible, so that I control the amount of charge (and therefore voltage) in the load capacitor. The problem is that no transistor (or electronic switch) that I can find can withstand the 20-50KV across its collector-emitter terminals.

If it helps any, my envisioned capacitor is maybe 100pF (by calculation; I haven't built anything for it yet) with tiny current levels of 10-50 microamps and charges of 3-5 micro-Coulombs.

Balancing the multiplier current against a bleeder resistor current doesn't seem like it would be workable (by calculation) because even a tiny bleeder current would require hundreds of 10meg resistors for 50KV. Keep in mind the multiplier only produces 100 microamps.


texts:
I would like to use a 5v active piezo buzzer to beep for a second or two. When the relay is on NO the capacitor will charge from the dc source and when the relay is on NC the capacitor will discharge through the buzzer until the voltage is too low to supply it. Will something like this work? Does anyone knows how to calculate the power on time?
Thank you to anyone interested!!!


texts:
I have a coil that has the following specs:

Coil Resistance: 123 ohms
Coil Current: 97.5 mA
Switching Voltage: 14 VDC

I am trying to use a 5V PWM output from an ECU to switch the relay. I know I need to use a transistor but I am way over my head in regards to how to decide the part and design the ciruit.


texts: Common rectifier (or source) to power testing equipments

texts:
I was thinking of a design of an all-in-one box that contains a DIY Oscilloscope, a DIY frequency generator, a DIY bench-top power supply (by a buck converter), and a multimeter (broken out from the case and used as it is in the box). My current concept involves powering these individual components from a common transformer (to step down source plug voltage) and rectifier (needed for the oscilloscope, frequency generator, multimeter). Will it be a good idea to do that? Since all these components will involve noises in the source, can it affect the readings of the equipment significantly? Are there alternative ideas to achieve the same?

P.S. Since I am at the conceptualisation stage, any ideas for doing this (eg: having a autotransformer etc.) will be highly appreciated.


texts:
How do you know if a transfer function for a RC filter is correct?

For example how would you tell whether or not this is a correct transfer function:
\$\frac{\frac{R_1}{R_1R_2}}{1+j\omega R_1C}\$

Or generally how would you tell if a function is indeed a correct transfer function?

Edit: If I have understood this correctly, then the below function cannot be a transfer function.

\$\frac{1+ \frac{j\omega CR_1R_2}{R_1+R_2}}{1+j\omega R_1C}\$


texts:
What are Kirchnoff's current and voltage laws? I've tried doing some research but most explanations are quite complex.

Also how can I solve the attached question using these laws??


texts: MAC Address as Serial Number in Embedded Systems

texts: Is it ok to use a MAC Address as a serial number in an SoC with BLE? Are there any security threats to this perhaps? Or drawbacks?


texts: LCD backlight connection, K pin connected only

texts:
I have been trying to build the attached schematic, and my issue lies with LCD backlight.

The designer has attached the cathode (K) pin, but not the anode (A) pin. This did not work for me. It is an old schematic, and is designed for an LCD with only 14 pins + A and K, without the newer 15 and 16 pins.

I was wondering how only using the K pin could be possible, and if there was anything I could do to get my newer module to work?


texts: I'm trying to wire an immobilizer bypass for a vehicle remote start, but I have never seen scissors in a diagram before. Anyone know what this means?


texts: audio amplifier without external battery

texts:
I am trying to run a speaker off of my cell phone headphone jack. Currently i have the 0.4 watt speaker (8 ohm) plugged directly into my phone and I am getting audio out. However, i want the speaker to be louder (preferably as loud as my cell phone speakerphone) and want to do that without adding a battery. Is it possible to use the power from the headphone jack line out to amplify the signal in order to get the speaker to be louder? What are my options? I would really rather not have to add an external battery to the project since i am trying to keep it small as possible.

Thank you


texts:
I'm an electronics newbie.  Please don't hate on my question.
I'm wondering if there is a special rule for powering a circuit with many power consumers on it.  For example, if I have a circuit with 10 5v motors...in order to power all the motors do I simply need one 50v power source?


texts: How is a PMOS transistor used as a switch?

texts:
I am trying to understand switching behaviour of PMOS transistor and how exactly it passes a bad 0 value. I'm getting confused with the notation.

More specifically, when the PMOS is on and $$V_(in)=0V $$Why does $$V_(out)= V_(dd)- |V_(tp)| $$
For NMOS , I apply the equations as following when the NMOS is on and the input is high :
$$V_(gs(min))=V_(tn)=V_(dd)-V_(out)$$ which implies
$$V_(out(max)=V_(dd)-V_(tn)$$

For PMOS However, I have

$$V_(gs(max)) = V_(tp)$$
Now when I write LHS as $$V_g - V_s(min) = V_(tp) $$. Since $$V_g=0$$, I get this weird result for $$V_s$$ . Would really appreciate if someone can explain where am I going wrong. How do I relate \$\ V_s\$ to the output ?

Video Link For Reference : https://youtu.be/z2yqmHClVO8?list=PLB3F0FC99B5D89571&t=1457


texts: Why does the crystal cause the doubly-inverted thing to change?

texts:
The Leningrad is a computer from the Soviet Union which needs around 3.5 MHz clock pulse for the CPU, which is a Z80. It uses a 14MHz crystal. Below is the bit that shows how the Leningrad derives 3.5MHz from 14MHz.
We've got these three inverters in a 7404. As everyone knows, the identity function is identical to "not not", so not "not not" is not. That means that what's labelled 5 on here is the same as what's labelled 1.
Then that signal goes through a flip flop, and the output from that goes into another flip flop. I understand that these are each dividing the clock frequency by two, so that together with the 14MHz crystal, the circuit yields the /RAS at 3.5 MHz, the inverse of that, and a few other timing related bits and bobs.
But this is making me feel quizzical because

The first inverter has its input and output pulled together by a 360Ω resistor. Why would you want to do that? Another copy of this schematic shows a 420Ω resistor in this place, so it looks like the value doesn't matter.
The output from the first inverter is inverted another two times.
I assume the crystal is somehow influencing the output of the second inverter, but my brain is too smooth to figure out how that's possible. From what I understand a crystal is normally connected to a voltage rail, but I don't see that here.

What's going on here?
Why does the signal need to be inverted so many times?
Why is the crystal causing the "not not" to sometimes not be "not not"?

I'm going to be building this circuit soon. Just to check I really get a clean clock pulse before hanging a Z80 and everything else off it.


texts: Combining switching and linear regulators

texts:
If we have a 12V DC input voltage and we drop that voltage using a switching regulator (LM2596) to 9V and then use a linear regulator (7805) to drop 9V to 5V, what is the output voltage going to look like?

Is the output going to be like a switching regulator output "noisy/non-linear" or linear?

voltages and part numbers are just for this example...


texts: What is the optimal battery charging speed?

texts:
I have 3.7V 4000mAh Li-ion battery.
I also have 0-30V/6A power supply which can limit output current.
Provided that I charge the battery with voltage limited to 4.2V, I can change the maximum current output of the power supply.

Let's say that have set these parameters on the PSU
-voltage limit = 4.2V
-current limit = 500mA

On the powerIf current is higher than 500mA, then the voltage will drop to a value where the current is 500mA.
Assuming the battery is @5%, I can set the current limit to 4A and charge the battery less than 1 hour.

My questions are >

What is the optimal charging speed at which the battery will be safely charged?
What is the fastest charging speed (safe charge)?What is the fastest charging speed (unsafe charge)?unsafe= can damage battery life or charging cycles
Temperature may and may not be considered in the answer.


texts:
Regarding the concurrency of VHDL statements, I want to know how the following code is explained with concurrency.

entity foo is
   port( a: out bit;
         b: buffer bit;
         c, d, e: in bit);
end;
architecture bar of foo is
begin
   a <= b xor c;
   b <= d and e after 5ns;
end;

Questions are:

Does a take the old value of b?
Is a going to be updated after 5ns due to the change in b?
Aren't these statements sequential?


texts: Why is the + sign commonly used as logic OR operator?

texts:
A few days ago I was asked, why it is pretty common to use the + instead of the v symbol as the boolean OR operator in digital logic.

His argument was, that it is totally counter intuitive to use + for OR, because it is more likely to be interpreted as AND from general usage/context.

  From Wiki: In logic and mathematics, or is a truth-functional operator also known as (inclusive) disjunction and alternation. The logical connective that represents this operator is also known as "or", and typically written as v or +.

I did some research and came up with the origin of the v sign. It comes from the Latin word "vel", which means "or".

One thing that adds up to the confusing nature is, that + means 'and' from a historical standpoint. According to this and this it was invented around 1360 as and abbreviation for Latin "et" ("and") resembling the plus sign.

However, I have no clue who came up with + in the boolean algebra and why it seems to be preferred to the v in digital logic / engineering context.


texts: What to expect by short-circuiting a Zinc-Carbon AA battery?

texts:
I am reading the book "Make: Electronics" by Charles Platt. It follows a fun and very effective approach about learning by doing. Along the way (pretty much at the beginning actually) it invites the reader to short an alkaline 1.5 V AA battery. This has been asked here as well, and answered properly: https://physics.stackexchange.com/questions/30594/short-circuit-an-alkaline-battery.

The book clearly recommends NOT to use any rechargeable batteries for that experiment, by stressing that several times. Lithium batteries, particularly, could explode, but any other rechargeable batteries are dangerous as well.

What it is missing is any word about Zinc-Carbon. Those are not rechargeable, so they do not fall in the category of never-do-it. But they are not explicitly the recommended kind. So, I am really curious about what to expect. Thank you very much!


texts: What is the purpose of Vih and Vil in the comparator's datasheet?

texts:
Looking into the MAX999 datasheet I can not figure out how to utilize information given for the Vih and Vil

Logic-Input High --- Vih --- (Vcc/2 + 0.4) min
Logic-Input Low  --- Vil --- (Vcc/2 - 0.4) max

The rest of datasheet says nothing about inputs' ability to be configured as logic inputs - it is the output which is logic level. What is the purpose of this information then?


texts: How do I vary the range of output of a variable voltage divider

texts: A voltage divider follows a fet in an audio booster. The pot in this divider is 250K and I'm reading a range of 0 to 6vac in my circuit. Because I want to build this into a volume pedal I'd like to be able to raise the lowest possible voltage and reduce the maximum possible voltage of this arrangement. Both of these variations to be on their own pot. Could somebody please help me to work out a solution to this? Thanks.


texts: Meaning of symbols used in ABB contactor circuit

texts:
The picture below is a power circuit for a direct-on-line starter, given in any ABB catalog for contactor. Q1 is a manual motor started with overcurrent protection.
My question is

What is the meaning of the "_F"-like symbol. Does it represent an edge trigger?
What is the square after the "_F"-like symbol. Does it represent the coil of the contactor?
What is the "/>" symbol? Does it represent overcurrent protection?

I presume that the pulse-like symbols are for thermal overload.


texts: XBee + TMP36 temperature sensor - returning inaccurate values

texts:
I have rigged up a basic circuit as follows:

The XBee is a Pro, series 2. It is configured as a Router using the AT firmware. Pin 20 (D0) is configured as an analog input. There is a co-ordinator XBee running the Co-ordinator API firmware.

When I measure the TMP36 using a multimeter, I can see a voltage of 0.752. However, the XBee is returning values of around 30 at the same time. I have a basic Python script (using the XBee Python API) running that grabs the data and outputs it as follows:

packet = xbee.wait_read_frame()
print 'Temp: ' + str(packet['samples'][0]['adc-0'])

This is displaying the value of 30 on screen. Am I missing something obvious?


texts:
I realize that when you short the terminals of a motor, it stops the motor faster than just turning off the voltage.

I was wondering if putting a large diode across the leads so that when the motor is running current can't flow through the diode, but when the current stops, the diode would short the pins. In other words, connect the positive (anode) side of the diode to the negative pin of the motor and the negative (cathode) side of the diode to the positive side.

Would this have the same effect as shorting the leads of the motor?


texts: I want to design a flip flop circuit that effectively has one input and one output, as well as a reset trigger, along with clock and power, using a 74ACT109 JK flip flop. Basically, the output and input would power on low, and when the input goes high, the output goes high and won't go back to low unless the PRE or CLR (whichever is appropriate) pin is brought low, acting as a reset trigger. I tried to wrap my head around the JK flip-flop truth table but I couldn't really think of an appropriate circuit, though I feel that it would involve connecting an output to an input through a resistor. How would I go abaout implementing this?


texts: What affect more the battery time: mA or V?

texts:
I will create a small circuit with a battery and vibration motor. I will use a 3V coin battery with 100 mAh.

So, I can use a motor:

With 3V and 75mA
With 3V and 150mA
With 1.5V and 75mA
With 1.5V and 150mA

What will drain less energy of the battery: 3 < 4 <= 1 < 2? (3 drain less than 4 and drain less or equal to 1 and drain less than 2). Is it correct?


texts: Location of the relay driving transistors array

texts:
I need to drive about twenty realys using ULN2803A. The MCU and the relays can't be locate on merely one PCB. So I separate the relays to another board, and the two boards are connected with wires. The wires may be longer than 30cm, and the relays are rated 24V. Then what about the drivers (ULN2803A), at MCU side or the relay side? Which one is better?

Any suggestions are appreciated.


texts: Need help troubleshooting connection between STM32F103 microcontroller and FE1.1S USB Hub

texts:
I'm working on an embedded system project, utilizing an STM32F103 microcontroller, and an FE1.1S USB hub.
The STM32F103 fails connection to the FE1.1S USB hub (wired to port 4).
Ports 1-3 work on the FE1.1S hub, even when using a "blue pill" STM32 development board.
I've made 3 PCB revisions so far. The STM32 on 2 of the 3 revisions basically never connects, while the microcontroller on the other revision will connect to the hub if I cycle the power just right during the attempted connection with the USB hub.
I know the FE1.1S is far from a premium USB hub, but the blue pill works reliably, so I'm convinced it's up to the task. I'm not doing much data transfer, and am aware it's a single TT device. Expected additional devices are: Wifi N dongle, Bluetooth adapter, and keyboard / other HID device.
The STM32 firmware is working properly, as there's a status LED that blinks when it's running. Regardless of USB hub connection status, the status LED blinks as expected.
The D+ and D- lines between the STM32 and USB hub have 22R series resistors, and the D+ line has a 1K5 resistor pulling it up to 3.3V, per spec.
Troubleshooting already performed:

Source 3.3V from bench power supply instead of pcb power supply
Source 3.3V from LDO connected to 5V on same PCB
Pulled D+ and D- out of circuit, into different USB port on FE1.1S hub
Added 5 and 10 second delays in the firmware before enabling D+/D-
Wired a switch in-line with the D+ 1K5 pull-up resistor to manually pull-up on demand
Monitored the D+/D- lines on an oscilloscope. Observed 1ms spaced pull down pulses in two pulse trains during handshake before flatline on D+ line.

Schematic Notes:

DFU is pulled high using a dip switch located elsewhere on the PCB
Selectable voltage jumper (J27) is a recent addition to troubleshoot the connection
Zener diodes on some inputs are intended to act as crude protection devices against 5.1V and higher
VCC (5V) > LDO > VDDA (3V3) > DIP Switch > FB  > VDD (3V3) - complicated, I know, but I want to be able to disable the microcontroller from a switch
Decoupling capacitors are as close to VDD pins as possible


texts: How am I able to run a small dc motor with just a 9v battery?

texts:
I know this might be a noob question, which I am new to this, but people always told me that you need the correct voltage and amps to power something. In this case, it is a small dc motor I got from radioshack. It can run at 9v,12v, or 18v. It runs at max at 1.9A and the battery supplies only 500mA of power. Am I defying physics here or something? I can't find the answer on google. Here is the dc motor I am using.

https://www.radioshack.com/products/radioshack-super-speed-9-18vdc-hobby-motor

How long will the battery last powering this motor?

Thanks for your time and effort explaining to me.


texts: whats is the difference in these dimensions

texts: I am wondering what's the difference in these both highlighted dimensions.


texts: SMD transistor die vs DIP transistor die

texts:
Is the die of SMD transistors different from die of DIP transistors with a unique part number?

Is the power transmission of a transistor dependent on its package type or chip type ?


texts: Help with basic discretization of a linear system

texts:
With a \$T\$ period discretization on the feedback and a first order hold after it. I believe this is a hybrid system because I imagine it's output to have both discrete and continuous behavior.
How do I figure out the output formula for \$y(t)\$ or \$Y(z)\$?
I have \$G(p)=\frac{1}{s}\$ if that helps. I tried to completely ignore the T block bottom right, do the Laplace of the first order hold block (FOH) and solve for \$y(t)\$ and then discretize it, but what I did seems incorrect.


texts:
There are a large number of opamps in the so-called "rail-to-rail" category: these either have an input common-mode range that approaches or exceeds the power supply rails, or they have an output range that approaches the power supply rails.

I'm aware that selecting the RRI/RRO requirement restricts yourself to a smaller selection of opamps, that will cost somewhat more (but not greatly so).

But are there other reasons to be careful w/r/t RRI/RRO opamps? I had a former coworker who avoided them like the plague and I want to know what to watch out for. In particular, are there any performance specs (gain-bandwidth, slew-rate, etc.) that degrade as the input and/or output approach the supply rails?


texts:
In Verilog, one can conviniently use _ anywhere in binary and hexadecimal literals. For example, 8b0101_0011 and 32'hAEBB_23AF are valid literals.

Is it possible to have $display do a similar thing? I'm trying to display a 64 bit signal in hex, which is 16 characters long, and difficult to parse visually. I would like a _ every four characters to ease reading.


texts: Choose the size of via for shielding and stitching

texts:
How do you choose the size and the parameters related to via stitching and shielding when you need to create a shielding on pcb around a RF micro strip?

OPTION A

OPTION B


texts:
Is it bad practice to route high speed signals (like a SPI bus clocked at 4MHz) through PCB vias?

I've noticed a good bit of noise (+-300mV) on my SPI bus signals with 3.3V levels.  The signals traces are only about 5cm long but they go through about 5 vias each on the way to their destination. The board has only 2 layers which is why there are so many vias on these lines.

What kind of noise can I expect (if any) to be introduced by a PCB layer change via?

Lots of good information in the answers.  It's going to be hard to pick only one.  Given that a PCB via introduces about 1.2nH of inductance and 0.4pF of capacitance the consensus seems to be that the 5 via's wont affect a 4MHz signal in any significant way.


texts: LM2940 low dropout voltage regulator specs?

texts:
I was looking at the LM2940T-5.0 low dropout 5v voltage regulator spec sheet and i'm puzzled!
The dropout voltage is listed at 0.5v for a 1A load, at 0.15v for a 200ma load, and at 0.1v for a 100mA load.
Yet the minimum input voltage is listed as 6.25V for a 5V output!
Why wouldn't the minimum input voltage be 5.5v for a 1A load or 5.15v for a 200mA load?
The reason i'm asking is that i want to use a 6V input to get a 5V output for a load of about 100 or 200mA.  6V is of course < 6.25v, but it is >> 5.15v.  Will this work?  What am i not understanding here?
Also (minor), is there any difference between "dropout voltage" and "input-output differential"?  The reason i'm asking is that there are side-by-side plots on page 8 of the TI spec sheet that use these two different terms, but the values in the plots seem 100% compatible!


texts:
I found a nice old portable CRT TV (model "tele star 4004") without a power cable.

The power socket on the back has six pins:

I've never seen such a design before (and google is coming up short).
I need to replace the power cable but to do this I need to identifying which pin does what. (I realize the hazard of messing with CRT units and I'm taking precautions)

This is the schematic for the power input:

My experience with power supply inputs is simple two-wire positive/negative rails so this is a bit beyond me


texts:
Maybe the title could be better chosen.
I have a 33V 0.8A constant voltage LED driver (see picture below, the item no. is GL-1201C-8 if that can help) which no longer works. I searched online but can't find it for an acceptable price.

I understand the difference between a constant current driver and a constant voltage driver but I can't find out if I can use a driver with slightly different specs like this one
(summary: output 36 W, 36 V DC, 1 A)
Can you help me on that?
Can I use a constant current driver instead of a constant voltage driver? I think I can't in this case, is that correct?


texts:
I have a temperature sensor design that I'm using as a reference. It takes 2  RTD sensors and reads their values with a Dual Channel 16-bit Differential ADC. The ADC interfaces through the SPI bus.

I know for a general ADC you can take the formula:

Voltage on Pin (in mV) = [(ADC Value) * (System Voltage in mV)]/(Max ADC Value)

I'm just not sure how it directly applies to a differential ADC

Here is my reference code (applicable to only one of the channels):

//--------------------------------------------------------------
// Temperature in degrees C
//
// Platinum (3850 ppm/K) RTD sensor
// 0 to 850 degrees C, Rt = R0(1 + A*t + B*t^2)
//   Rt = resistance at temperature (degrees C)
//   R0 = is resistance at 0 degrees C, which is 1,000 ohms
//   A  = 3.9083 * 10^-3
//   B  = -5.775 * 10^-7
//
//   (R0 * B)t^2 + (R0 * A)t + (R0 - Rt) = 0
//
//   Quadradic Equation: ax^2 + bx + c = 0
//     x = (-b +/- SQRT(b^2 - 4ac)) / 2a
//
// therefore:
//       (-(R0 * A) +/- SQRT((R0 * A)^2 - (4 * (R0 * B) * (R0 - Rt))
//   t = -----------------------------------------------------------
//                           2 * (R0 * B)
//
//       (-3.9083 +/- SQRT(15.2748 - ((-2.3104 * 10^-3) * (1,000 - Rt)))
//     = ------------------------------------------------------------------
//                             -1.1552 * 10^-3
{   float Vr, Rt;
    Vr = ((ADC_Meas * 1.25) / 32768.0) + 2.5;
    Rt = (1000.0 * Vr) / (5.0 - Vr);
    t = ((-3.9083) + sqrt(15.2748 - (-0.0023104) * (1000.0 - Rt))) / (-0.0011552);
}
//--------------------------------------------------------------

What I'm trying to understand is how the two formulas for the Vr and Rt were devised?

Also I am still a little bit confused about how the differential ADC works.

I believe in a typical ADC we give the REF+ and REF- voltages and the resulting reading for a given channel is the ratio of how close it is to REF+ starting from REF-.

For example for a regular 16-bit adc a reading of 0 would mean our input is 0 (or equal to REF-) and a reading of 65536 would mean our channel is equal to REF+.

I suppose what I'm confused about is how a differential ADC relates to the standard ADC. based on the standard ADC example I would think that the input value must stay inside the REF-/+ values but from the example circuit I have for a differential ADC it seems that this is not necessarly the case. So how do I know what the ADC is tied to and how to associate it with the REF values?


texts: Pointer Size using eeprom.h with ATmega328p in AVR-GCC

texts:
I am working on a project that randomly reads and writes large blocks of data from EEPROM, based on user input. I have used the EEPROM before, but I never really thought about this. In the operations described in the standard eeprom.h file (documentation), you always have to add a typecast to a known address location. For example:

DATA_BYTE = eeprom_read_byte((uint8_t*)LOCATION);

This makes sense, but what i don't understand is its use for larger data, such as the following:

DATA_DWORD = eeprom_read_dword((uint32_t*)LOCATION);

Is the typecast (unit32_t) describing the pointer size, or the size of data being pointed to? I know the ATmega328p has 1kBytes of EEPROM, meaning it would take a 16 bit pointer to hold the address to a single data byte. So I'm guessing this means the typecast has nothing to do with the pointer size, but the size of the data being written/read... I know it works, I would just like to understand it better.

I hope that makes sense. Thanks in advance!


texts: Can capacitors be damaged by a DMM in continuity mode?

texts:
Some multimeters have a pretty high open circuit voltage in continuity test mode and resistance mode (possibly to improve SNR?), but they are current limited. For example, the Fluke 87V behave like an 1mA constant current source with a maximum output voltage of ~7.3V in continuity mode.

I think it is generally safe to use these multimeters to probe ICs, as most of them have clamping diodes. The question is, will capacitors with a low voltage rating be damaged (with a low limited current)? This is a common scenario when I probe power rails on a board to test for short circuits:

simulate this circuit – Schematic created using CircuitLab


texts:
I have constructed an UV light box using the innards of a commercially available finger nail drying unit consisting of 4* 9w tubes. (should be more than enough). I have had very poor results in exposing both pre coated and DIY board. My question is -
Is 10mm thick polycarbonate too thick to transmit sufficient UV or should I be using Acrylic sheet or glass?


texts: SATA hard drive selection by mechanical switch

texts:
I want to have a toggle switch to toggle between two hard disk drives. Only one should be connected at any given time.
The best possible solution for what I want to achieve is to toggle the power supply to the hard drives. I cant find any 5PDT switches but 4PDT switches are available.
Can I connect both GND wires in a SATA power cable or will that cause problems?
A 5-stacked rotary wafer switch would be an alternative but I would prefer to use a toggle switch. In case you know where to find 5PDT switches, that would help too.

To clarify:
I want two boot drives in my desktop system (so no hotswap, system will be turned off and taking off the side panel to get to the drivebay is no practical solution)
For some reason, it is problematic to get into the BIOS on my system. I usually need 2-3 tries. therefore I want an easier solution with a hardware switch on the outside.
I was thinking about using Molex - Sata adapters, but theres the saying "molex to sata lose your data" so I was worried about that.
I thought the best way to achieve my goal is by disconnecting power to the drive while the system is turned off. Since only one of the drives should be connected at any given time, I thought a switch on the case would solve that problem.
Since I for now will use harddrives I already have, but might upgrade to SSDs, I would prefer a solution that works in general, not only for certain drives.


texts: How do I calculate the regulation of the generator in a Ward-Leonard system?

texts:
I have a DC motor with independent excitation, power by a ward-leonard system. The nominal voltage applied to the motor is 250 V. I have to calculate what regulation(%) to apply to the generator so that the motor rotates at 500 rpm.
I calculated that for the motor to have that speed it needs a voltage of 121.44 V applied at the terminals and that for the generator to supply that voltage it needs EMF of 138.6 V. In my notes, I have that to calculate the regulation I need to following formula, where U0 is the generator's EMF, Un the nominal voltage at the terminals and U the voltage at the terminals:

According to this formula I get a regulation of 6.9%. But I don't really get this formula. Why do I divide the voltage difference by Un and not U0?


texts: The following circuit from a textbook models an inverter implemented by a MOSFET switch. I understand how in the first case Vout is zero, but in the second case(the switch is open), the textbook states that RL is a pullup resistor when it seems to me that the resistor actually decreases the voltage between Vout and ground. The textbook further states that RL provides a logical 1 output when the MOSFET is off but I can't understand how since Vout is not parallel to RL. Am I missing something?


texts: Switching between two sine waves using analog circuitry

texts: I'm trying to do a project entirely using analog circuitry.  The project involves switching between two sine waves at a constant frequency to power a speaker.  I am using a Wien-bridge oscillator to create the sine waves at specific frequencies.  Is there a way to switch the output of the two waves in a clever way?


texts: How to reduce ADC noise through PCB routing?

texts:
I am routing a PCB board with some through hole IR emitters and transistors and I am trying to figure out placement of ICs/Op-Amps, as well as capacitor placement and route placements to reduce the noise as much as possible. I am printing on a two-sided PCB, without any planes.

Should I put power, ground, or analog reading signal lines on their own side to reduce noise? Are there any other precautions I can take to reduce noise of the analog line of the IR transistor?

Thank you!


texts:
I've bought this box for my PCB. There are several holes on it, but the holes are closed at one end. How can I design my PCB to be fixed in this box? Should I add hole for screws on my PCB? I can puncture the box, but it won't look good!

I don't know the application of these holes.


texts: ATTiny45, LED strip, MOSFET, touch interface, but Vcc drops and tiny resets

texts:
I've developed a very little board with the ATTiny45 and mosfet (STD35NF06LT4 -  http://www.farnell.com/datasheets/1689946.pdf ) to drive a high power LED strip at 24V.

I have a 5V dc/dc converter (3A) that provides the Vcc to the tiny and a 24V dc/dc power supply that provides the power to the LED strip.

The 24V power supply is a 100W power supply (24V - 4.2A).

The 5V dc/dc converter takes the 24V from the same power supply used for the LED strip.

The LED strip is 5 meters long and consumes up to 72W at 24V (3A).

The schematic is the one below:

On P3 I connect the Vcc 5V out of the dc/dc converter, on P4 I have common ground.
P1 and P5 are used to connect touch sensors, since the final purpose of the circuit is to dim the LED strip by touch.
On P2 I connect the low side of the LED strip. The 24V to the LED strip is provided by the 24V power supply.

The board is a 4-layers PCB about 9x30mm. Unfortunately, the manufacturer does not included the ground and power supply internal layers (that were provided) into the production of the board, so I had to wire the 5V and GND nets by hand.

If I use a single LED, or a low power load (I don't know which is the limit, for now), everything seems to work fine, the PWM at the mosfet gate is well controlled by the tiny through the touch interface. Also, the 5V line is stable and sound.

When I connect the high power LED strip (the 24V power supply is well suited for that strip), I can see that the attiny resets as soon as I try to do something with the LEDs.

The reason for this reset is a >2.5V drop on the Vcc line, tieing it to something more than 2V.

I've seen from the scope that the gate is correctly driven and it seems that the voltage drop appears when I turn off the LED strip on the first falling edge of the PWM signal that drives the gate.
So, I'm able to turn on the LED, but when I turn them off for the first time, I get the drop on the Vcc.

I've tried to add 100uF between gnd and Vcc, and the voltage drop reduced to 1.5V, but increasing the capacitance to 200uF didn't make any more changes, and the micro still reset.

In addition, I've another board that I've developed along with this one, that is making use of another microprocessor (BlueGiga BLE113 http://www.mouser.com/ds/2/52/BLE113_Datasheet-224874.pdf ) and that has a LDO voltage regulator to supply the micro from 5V to 3.3V. I use the same MOSFETs (with a 3.3Vgs), the same gate series resistances and the same LED strip, but for this application I have no issues and it works very well. It drives 5 LED strips in parallel (with five MOSFETs) and after days of different PWM duty cycles, it got warm just a little.

My hypothesis are:

having wired by hand GND and Vcc connections could have lead to ground bounce issues
insufficient decoupling capacitor at vcc, but to now I've used 200uF between 5V and GND
insufficient gate series resistance, but then, why the other board is working fine with the same value?

And my questions are:

is there something clearly wrong with this circuit?
is there something that I can try before considering remastering the PCB, since it has a not insignificant costs?
maybe the LDO voltage regulator of the circuit that works is taking care of this drop?
maybe the LED strip that I used, that is 5mt long, can be assimilated to an inductor, so that I have to put some sort of free wheeling diode?

Here below I attach also the schematic of the working board. The 24V and 5V DC/DC converters are the same that have been used for the not working board:

It uses the LM1117MP-3.3 (U2, upper right corner) for getting the 3.3V from the 5V DC/DC converter.
The mosfets are the same (Q1-Q5, STD35NF06LT4). The micro is a module by BlueGiga as stated above.
The two capacitor around the LDO are 10uF (C3, C4), the two near the BLE113 are 0.47uF (C1, C2).
Resistors in series with the gates are 10Ohm (R6-R10), pull down resistors are 10k (R1-R5).

Any help would be very appreciated,
Thanks,
ale


texts: Will the PNP and the diode circuit behave differently?

texts:
Need to repair a legacy system that has been discontinued and am considering replacing the PNP based circuit with the diode based circuit.

The input signal (max. freq = 20Khz) is applied at IN and is active low. It's TTL level.

The output is tapped from OUT and 3.3V is applied to this point through a weak pullup.

Given this information, are both the circuits equivalent as far as IN and OUT digital signals are concerned?
Is the PNP based circuit effectively a 3.3V level convertor?
Is the diode based circuit an equally effective 3.3V level convertor?
Why would a company prefer the PNP based circuit over the diode based circuit?


texts: Getting a Bluetooth chip to communicate with Android Smartphone

texts:
I wish to develop an Android application for my phone (nexus 4) which needs to get the device to communicate with a Bluetooth chip/receiver and back at regular intervals. When I say 'chip' I mean any form of device/transmitter which is capable of using Bluetooth to receive and send messages to my phone.

Would anyone be able to tell me the hardware I need to get started?

Apologies if my question is vague but I need pointing in the right direction.


texts: Do I have a ground loop or another problem?

texts:
Okay, I know this is an electronics Q&A site, and this question is mildly computer related. But I've got this problem with my VGA monitor, a graphics card and a computer. The problem is the video output is blurred in one direction quite badly. This looks very similar to a low pass filter - i.e. parasitic capacitance.

The confusing part is - this only occurs with one card, an Nvidia 9800 GT. I have a somewhat broken ATI card (GPU started melting and now all 3D games have misplaced polygons), and this doesn't occur. So I'm thinking something else is up with either the card or some configuration involving it. I've also noticed that there is an odd ripple to the black in the image. Could it be a ground loop? I'm using a cheap DVI to VGA adapter which could also be suspect.

I've attached an image of the problem.


texts: Pros/Cons of different backplane architectures?

texts:
Are there some general resources (other than spec sheets of boards) to compare the differences between computing formats like VPX, VME, IBM bladecenter-h, etc?

I am tasked with doing some legwork what form-factor we should be looking at when buying our processing equipment for a high performance semi-rugged system.

I've read specs on size, connectors, bandwidth density, power usage, etc. Is there anything more I am missing?  I'm having trouble comparing the overall possible bandwidth to each server in each architecture.  Particularly VPX and all of its dot level specifications.

These would run custom software and FPGAs, DACs, ADCs, a linux machine, etc.


texts: Switch voltage output with Zener diodes in series

texts:
I´m trying to produce a power supply that can give an output of both 24V and 12V.
I want to switch between these two voltages with a signal of 5V, when the signal is low i want to get out 24V and then when it´s high i want an output of 12V.

I have been experimenting with two Zener diodes in series and try to bypass one of the diodes to get the lower voltage. I am not sure if this thery will work totally i practice. I got it to lower about 1V, maybe the transistor doesn´t saturate completely? Any ideas how to easy switch between the two voltages?

EDIT

Here is some extra information from the comments surrounding the project and an updated schematic:

So it´s suposed to be a power supply to a sensor that operates at 5V, the sensor sends out a 5V signal that should toggle a relay that operates at 24V. Since I want a low power consumption I want to lower the voltage to 12V when the relay doesn´t need to be on. Hope this clarifies a bit.


texts:
I feel a bit like I'm losing it... I can't seem to find a (modern) i2c counter chip. Something that will take random events, sum them up, and let me poll from a uC a couple times a second. Events can be minutes apart or in the 100khz range.

I'm trying to design a modular board that will interface with the main uC. This modular board is fairly simple but the variants on the end application can make it quite different.

I understand this tends to be done directly on a uC but I'm looking for something that lends itself to production (small-medium scale). I'm trying to avoid extra programming steps (just for a counter) on our production. Oh, and also low power ;P

I've thought about misusing a RTC chip but that doesn't seem sound for production and I really don't need a xtal front end.

Any thoughts?


texts: PCB Edge "via shield" (Faraday Cage) using Altium

texts:
I am trying to add a "via shield" to my PCB edges, which is also called a Faraday cage.

I am trying to add vias using Altium software, but the vias are added outside the PCB edge and not inside.
Any idea how to add vias inside the PCB edge?

Above are the settings that I used for via stitching. Can anyone tell me what settings I need to use, to add the shielding vias inside the PCB edge?


texts:
I am trying to learn VHDL prior to returning to school.
I have been using the text Digital Design with CPLD Applications and VHDL
ISBN-13: 978-1401840303
Other references are: http://www.gmvhdl.com/VHDL.html and http://www.freerangefactory.org/dl/free_range_vhdl.pdf

What I am trying to accomplish is to create a project that will be used to  program a cpld to be a standalone digital clock. The clockin pin of the cpld will be driven be a 2hz timebase from a 32768hz crystal divided down by a cmos 14bit ripple counter (HC4020).
The cpld outputs will drive seven segment displays.

In order to make sure that I am learning important concepts, I am trying to implement this project as multiple entities that are connected together so that the block diagram is essentially identical to the Fig 8-10 in The TTl Cookbook.
I have attempted to start with an example straight out of the Dueck text book and it will not compile:

—— bcd_7seg.vhd
—— BCD-to-seven-segment decoder
ENTITY bcd_7seg IS
PORT(
d3, d2, d1, d0 : IN BIT;
a, b, c, d, e, f, g : OUT BIT);
END bcd_7seg;
ARCHITECTURE seven_segment OF bcd_7seg IS
SIGNAL input : BIT_VECTOR (3 downto 0);
SIGNAL output: BIT_VECTOR (6 DOWNTO 0);
BEGIN
input <= d3 & d2 & d1 & d0;
WITH input SELECT
output <= “0000001” WHEN “0000”,
“1001111” WHEN “0001”,
“0010010” WHEN “0010”,
“0000110” WHEN “0011”,
“1001100” WHEN “0100”,
“0100100” WHEN “0101”,
“1100000” WHEN “0110”,
“0001111” WHEN “0111”,
“0000000” WHEN “1000”,
“0001100” WHEN “1001”,
“1111111” WHEN others;
—— Separate the output vector to make individual pin outputs.
a <= output(6);
b <= output(5);
c <= output(4);
d <= output(3);
e <= output(2);
f <= output(1);
g <= output(0);
END seven_segment;

text comments:
Why not simply define d as a vector? If we wish to create a graphic symbol for the
seven-segment decoder, the above method creates a symbol shown with four separate in-
puts, rather than a single thick line for a 4-bit bus input. The design will work either way.

I am using Altera Quartus II 13.0.1 (an older version) as it supports the EPM7032slc44 which is cheap and plentiful from digikey.
I have a logical devices chipmaster 6000xp to program parts.
I have tried changing project settings in the ide to switch between vhdl 87 and vhdl 93 and this example still has several syntax errors.
It is puzzling to me that the compiler only barks at the first few lines (14-19) of the select statements. I changed the ending commas to semicolons with no effect.

I have three things I wish to get clear on here:
A The correct syntax for defining entity ports
B The correct syntax for making architecture declarations on those ports
C How do I go about making entity and architecture declarations for entity A that can be accessed by entity B regardless whether entity B uses std_logic vector(6 downto 0) or eight discrete lines eg a std_logic, b std_logic etc.

Thank you for your time to read and comment.


texts: Drive MOSFET from LBO output of switching regulator

texts: Is it safe to use a MOSFET with gate connected to the low battery comparator output of this TPS61027 switching regulator in order to disconnect the load once batteries become low? The LBO is open-drain, and recommends a \$1 M \Omega\$ pullup to the 5V boost output line (I'm also wondering whether that resistor is a bit too big to effectively turn on the MOSFET when the open-drain is not active [no low battery condition]).


texts:
I'm studying an SDRAM controller (in Verilog), which uses 4 reg to control a FSM. I couldn't understand why they use 4 regs instead of 2 (state and next_state).

Here's the piece of code:

reg [STATE_SIZE-1:0] state_d, state_q = INIT;
reg [STATE_SIZE-1:0] next_state_d, next_state_q;

And here's the link to the controller: https://github.com/buffis/JammaGrabber/blob/602a47325acaad21340131ce41e283fc3e675a3b/FPGA/MojoJammaGrabber/src/sdram.v

Thanks in advance.


texts:
Is this just a regular D Latch with an inverted clock or is this a D Latch with an inverted clock which becomes active on the negative flank of a signal?

Somehow I suddenly became very unsure of this and I don't know what to think.

This is the full circuit, its a buffer for the I/O pins of PortA on a PIC18F4550

I got a half complete explanation on the working of this circuit written down but I can be sure of it because I don't fully understand the working of the latch.


texts:
I have 4 18650 batteries and I want to make a battery pack of it. If all the batteries were new and had similar voltage/capacity I could easily charge them all together in parallel with my charger. However the batteries have about 10% difference in capacity so I need to charge them using a balance wire on each battery/cell.
My problem is this: I have 2 circuits that I came up on my mind (drawing below) in such a way that one circuit is for charging and the other for discharging. So how do I do the wiring in such a way that I can solder the wires to the batteries (spot weld) and have a DISCHARGE port (+ and -) and a CHARGE port (GND and cell 1, cell 2, cell 3 and cell 4)?


texts: is there a special consideration when chosing a 2 phases or 3 phases control softstart

texts:
softstart for 100 kW AC motor will be used, but with wich type of softstart :

control on 2 phases
control on all three phases


texts: How does one use both half and full adders together?

texts:
I am trying to teach myself the concept of (half and full) adders from Wikipedia and am a bit confused.

Do I need to use both half adders and full adders together for performing multi-bit addition? How do I combine them together?


texts: Use MOSFET as switch enabled by Arduino output

texts:
I have an input from a source at 5V with a maximum current of I believe 2A. I want to drive an output also at 5V but only at certain times. The output should be capable of supplying up to 1A at 5V. The arduino has other sensors and when certain values on these sensors are reached the input source should be passed to output. Initially I was driving the output straight from the digital HIGH output pin of the arduino however that can only handle very small currents.

I realise I need a logic-level MOSFET switch which will be controlled by the arduino HIGH output digital pin. Now, the question is there are so many available I don't know which to choose. Ideally I want something small that's easy to solder onto a custom PCB. Here are the options:

STP55NF06L
STB55NF06LT4 (out of stock)
FQP30N06L
RFP30N06LE (out of stock)
FDC6401N

I'm leaning towards the FDC6401N but I just want to be sure that this will work. Also by the way the same 5V from the source will be powering the arduino. The 5V on both inputs and outputs are coming from USB interfaces(not from a computer)
I would prefer a SMD but all the SMDs I've seen are dual MOSFETs which seems like a waste to me.


texts:
I want to control 3 LEDs with 2 switches. First switch turns first LED on, second switch second LED, and if both switches are on, all three LEDs are ON.
Switches are sharing common input.

This is trivial schematic for first two LEDs, how to connect third one to achieve this goal? Do I need to use transistors for this?

simulate this circuit – Schematic created using CircuitLab


texts: Problem with voltage comparator with relay

texts:
I'm making a circuit to alternate its input, depending on the voltage that's feeding the system. I used a voltage comparator with a transistor and a relay to do this:

The simulation works pretty well, but when doing it in real life, I have already burned 2 op-amps. I noticed the resistance between pins 3 and 4 got pretty low (from like, 1k to 20 ohms after the op-amps were burned).

I was trying to understand what the problem was, and by making some changes in the simulation (image below), I noticed that pin 7 is somehow with the same voltage of the BAT1. Like in the image below, the simulation starts with the relay contact already changed. I don't know if it is the problem, but it might have something to do with it. I can't understand what's happening.

When I tried to change the pin 7 connection to BAT1, it seems like it works. But my idea was to preserve the voltage from V1 (it would be a photovoltaic panel to feed the load, if there is no power, then the load wouldn't be fed).

Thanks in advance.


texts: How do I boost charge a dead 3.7v li-ion battery?

texts: I have a dead Li-ion battery from a Wifi device. Since I didn't use it for a couple of months, Its dead now. I have read somewhere that boost charging is used to charge and bring the battery back to its original capacity. How much volts and current should I supply to bring it back to life?


texts: I've been trying to interface LPDDR2 ram with my SOC but got confused as to how to connect the CA lines. Does anyone have any reference designs of LPDDR2 for me to go off of?


texts: How to figure out which transistor amplifies the signal?

texts:
Suppose I have the following circuit:

How can I determine which transistor amplifies the signal and which transistor is just a simple resistor? Also if is a resistor how can I determine it's resistence?


texts: How can I minimize the variance in voltage drop across transistors - or eliminate transistors from this design?

texts:
I have a fairly simple circuit that I'm using with an arduino to measure the impedance on a very low-resistance circuit. The user plugs in a device at A and B and the arduino can compute the resistance across the user's device by measuring the voltage at A. No resistance on the user device means I read 0V, infinite resistance means I see about 1 volt. The most common user device will register about 1 Ohm. (For the sake of anyone familiar with arduino, I use the internal voltage reference so that 1V reads near the max for analogRead.)

+5V
 |
 z
 z 220 Ohm Resistor (.1% tolerance)
 z
 |
 A----------------------------------------\
 |                                        |
 z                                        |
 z 47 Ohm Resistor (.1% tolerance)        |
 z                                        |
 |                                        |
 |                                        |
GND---------------------------------------B

The trouble is that the circuit has to measure multiple user devices at the same time. I can't just replicate this chunk of circuit 3 times because changes on any one of the user devices will affect the values read on the other arduino input pins.

My solution to this was to put a transistor between 5V and the first resistor and compensate for the voltage drop across the transistor by choosing a smaller resistor. This makes the circuit look like this:

+5V
 |    (Worst ASCII art transistor ever)
 \
  \|   1K Ohm
   |-----NNN---- (To Arduino Pin to select this channel.)
  /|
 /
 v
 |
 |
 z
 z 150 Ohm Resistor (.1% tolerance)
 z
 |
 A----------------------------------------\
 |                                        |
 z                                        |
 z 47 Ohm Resistor (.1% tolerance)        |
 z                                        |
 |                                        |
 |                                        |
GND---------------------------------------B

This circuit gets replicated once for each user input. This works, but my input values are unpredictable because the voltage drops across the transistors isn't consistent. (A measurement of 27 on one channel might equal a 2 Ohm user device, while that same device on a different channel might read 47. A 10% jitter I could tolerate. Greater than 60% renders the project unusable.)

I don't think that I can get transistors that will be in the neighborhood of .1% tolerance without paying a fortune (assuming I can get them at all.)

Because the math is being done on the arduino, I can't easily take 3 measurements (using the transistor-free design) and solve the simultaneous system of equations fast enough. (I'm looking at 500 to 1000 measurements of all three channels every second.)

Is there any way to salvage the project?


texts: Advice on Coplanar Waveguide and Ground layout of Antenna

texts:
I have this antenna model AH316M245001-T.

RF signal will be routed using CPW with ground vias. RF freq. is 2.4Ghz, 50ohm line.

I can't find this information about CPW:

What are the recommended via dimensions and distance between vias at this frequency?
How should I connect CPW grounds, in particular, should I avoid connecting components to this ground? Should I create a via "wall" all around?

Would something like this be correct?

Or should this ground go all around the PCB board?