texts: What length wire and how many devices after which I need a repeater or extender for i2c?

texts:
I am using an ESP32, which has two i2c buses.

I am thinking of adding multiple devices to each bus (a total of 20 devices, 10 devices per bus).

The maximum length of any device on a bus from esp32 will be less than 1 metre.

The connected devices are of two kinds:
1. Sensors - they return data
2. Motor drivers (drv2605L), which are used to make LRAs connected to them vibrate.

Do I need a repeater or extender? Will I have any problems ? Any suggestions?


texts: Interfacing DS1302 - is the schematic I found correct?

texts:
On the following website there is a project of a 7-segment clock, which uses DS1302 as RTC. The DS1302 is connected to the microcontroller in the way that I don't really understand. Can someone please answer a few questions?

Why has the author of the schematic added capacitors C5 and C4? AFAIK there is no need for additional capacitors, if crystal has specified load capacitance of 6pF. Is it because they've used a crystal with different load capacitance?

Why has the author of the schematic added pull-up resistors R13, R14, R15? AFAIK, they're also not needed. Are they driving those lines in open drain manner? If yes, why?

Please find the interfacing schematic:


texts: If negative input ==> 0 V Otherwise, input voltage

texts:
I am struggling, and I would like to know how I can make a circuit that holds the following conditions:

If the input voltage is negative, then the output should be zero volts.
If the input voltage is zero or positive, then the output voltage should be the same as the input voltage.

Thanks in advance.


texts:
In its datasheet there is no indication or explanation which diode to use.
Datasheet page 10 have application circuit.I will use to regulate around 10-15 voltage to fix 5 volts. I chose B230A-13-F Schottky diode which has:

Voltage - DC Reverse (Vr) (Max):30v
Current - Average Rectified (Io) : 2A

Could you inform me if it is okay or not.

Datasheet link


texts: Selecting transformer voltage for lamp drawing 32W and 6.6A

texts:
I have a lamp with the following known specs:

32W
6.6A
AC

Applying p = V x I, I expect the required input voltage to be 4.8V AC.

However, this seems to be an unusual input voltage for a lamp. For context: this is a MR-16 style quartz (possibly halogen) bulb, listed as part number 21127 here.

The only specs given for this lamp are watts and amps, above, so I cannot confirm voltage via their documentation. The typical application of this bulb is part of a significantly more complex circuit involving a constant current regulator.

I have tried looking for a 120V AC --> 4.8V AC 6.6A transformer without success.

My questions:

Is finding a transformer outputting 4.8V AC at 6.6A actually the simplest way to power this bulb? What alternatives exist?
Could the transformer output DC instead of AC without harming the bulb?
What are the consequences to the bulb of using a transformer which outputs a more standard 6V or 12V?
What are the consequences to the bulb of using a transformer which outputs less than 4.8V?

My guess is exceeding 4.8 volts would cause the bulb to burn out faster, whereas less than 4.8 volts would cause the bulb to emit less light (but would this be harmful to the transformer?). I also expect transformers outputting either DC or AC could be used.

Thank you for your guidance.


texts: Severe Voltage Drop When Applying a Load to Opto-Isolator Circuit

texts:
The circuit below uses the Vishay ILD213T optocoupler (datasheet). The load in question is a 5V solenoid valve with a resistance of 46Ω.

The circuit is configured with "IN1" connected to a GPIO pin set to 3.3V, and "OUT1" connected to a USB port on a desktop PC. Input is grounded to the microcontroller, output is grounded to the USB port.

Without a load connected, "OUT1" is ~0V (input LOW) and ~5V (input HIGH). However, with the load connected, the voltage at "OUT1" drops to 0.022V.

Is this simply an issue with the opto's max collector current, or something else?


texts: Should I tie Signal Gnd (pin 5) and Chassis Gnd (Pin 4) together on OBD-II port?

texts: I am building a OBD-II reader and wonder if I should tie these two GND together.  What is the pros and cons of doing that?  My device is powered by car battery and it reads OBD-II protocols through OBD-II ports.  Thanks.


texts:
I've seen both wikipedias of Electro Optics & Optoelectronics but I'm still confused on what the difference is.

I'm currently pursuing a degree in either Physics or Electrical Engineering because optics,photonics etc and the excitement of attempting to replace electrons in computers and such has sparked my interest.

Electro Optics vs Optoelectronics > What's the difference?


texts:
I have the following case:

I need a stable power for esp32 at 3.3V (around 300mA) for at least
10 seconds

Power source is:

not DC, it is irregular
source provides bursts of around 1.0V each second, 42W
it can get more intensive: up to 16V with more frequent intervals (up to 1400W)

I assume I need some capacitors and diodes, but I don't know how to hook it up.


texts: Crossover frequency and resonant frequency

texts:
Physically speaking, what is the difference between crossover frequency and resonant frequency?

As far as I know, the resonant frequency is the frequency at which the system oscillates. And the crossover frequency is just a mathematical description on the bode graph


texts: Can the current value determine the logic value(0 or 1)?

texts:
In case of parallel connection, is the statement "Depending on the current(electric current) value, logic (0 or 1) is determined." True or False? I do not understand why current cannot affect the voltage value in this case. Don't we need another assumption about the resistors having the same value in order for the statement to be false? I am confused.

This is a TF question from my logic design class. The answer provided is false because it is determined by voltage. I marked this as true because I thought current can affect the voltage therefore determine the logic value. But when I mailed my professor he said this is not true in case parallel connection. I am wondering why this is the case.


texts: Understanding inductor and LED ripple current in LM3409

texts:
I am reading the datasheet of the LM3409, specifically section 9 "Application and implementation".
My intent is to understand how to calculate the values of the components needed for my specific application.

I aim to drive a single LED with a maximum constant current of 2.7A, from a 42V PSU, and use the analog dimming feature of the LM3409 to control the brightness (similar to the circuit in section 9.2.2).

Most of what is explained in the datasheet is sufficiently clear to me, except for how to determine the inductor ripple current (ΔiL-PP) and the LED ripple current (ΔiLED-PP).

Chapters 8.3.4 (Inductor Current Ripple) and 9.1.3 (LED Ripple Current) seem to imply that I should be choosing these values, but they give me no clear indication as to how to choose them.

Can anyone help me understand how to choose these values ?


texts: Unserstanding of "Maximum repetitive peak isolation voltage"

texts:
Sometimes optocouplers has only Isolation test voltage parameter. Sometimes it has a bunch of parameters regarding isolation strength, including Maximum repetitive peak isolation voltage.

Strange thing is that this voltage is considerably lower than isolation Isolation test voltage or Maximum withstanding isolation voltage.

I'd say that Maximum withstanding isolation voltage measured in Volts RMS (which is important as sinusoidal amplitude Voltage equal to 1,41 * RMS Voltage) should result in peak Voltage equal to RMS * 1,41.

But it looks like the things are much more complicated than I expected.

Can anyone explain the fine points of the isolation strength terminology?

Why Maximum repetitive peak isolation voltage is about 10 times lower than Isolation test voltage?


texts: simple schematic for 10.7MHz crystal-based marker generator

texts:
For FM tuner alignment purposes I want to build an outboard 10.7MHz marker generator to use in association with a piece of gear (ST1000A) that doesn't have one built in. They used to be available in little battery powered boxes with BNC in and out. Can someone direct me to a schematic? also construction information, e.g. any RF precautions I may need to take. Planning a metal hobby box.

Editing this to make it crystal clear that I am not seeking a product or product recommendation. Frankly it baffles me how anybody thought otherwise, unless they just didn't read it.


texts: How to derive the transfer function for this Texas Instruments Application note narrowband pass filter

texts: I've been trying to derive the transfer function for this filter but I'm absolutely stumped, and none of the functions I've come up with seem to reflect its actual response. (It is taken from here):


texts: Matching mosfets - linear servo amplifier (AB)

texts:
I'm replacing a bunch of burnt mosfets in a linear amplifier for a brushless motor.

3 phases
Each phase: 3 pairs of totem IRFP240 / IRFP9240 in parallell. (no R in series)

My main concern is matching the new triple-pairs.

Which would be the most appropriate matching setup for the purpose. Unit is driving 80V/10A motor. I currently use the following matching rigg, but since MOSFETs isn't my domain I'm abit uncertain of the validity of the matching in accordance with the application.

simulate this circuit – Schematic created using CircuitLab


texts:
I am trying to determine what the best material is for a high temperature conductor. It is for distributing power inside a furnace. I need to run at around 1000 celsius (the furnace is hotter but this is how hot the conductors might get). The lower the resistance, the better. Platinum is not an option for me.

It seems most refractory metals (all besides platinum?) are problematic in the open air with oxidization at these temperatures - even tungsten will rapidly oxidize at 1000C and above. I can coat the wire to protect it, but have not been able to determine what could be reliably used.


texts: Soldering 0.5mm pitch ICs using stencil and reflow oven

texts:
I'm new to SMD soldering, and tried to assemble a couple of boards, using a reflow oven.
I 'm using a stencil (Kapton - mylar) and so far it worked fine except for the LQFP48 devices (pitch 0.5mm). In this case, the pins are bridged (too much paste creating short circuits between the pins). I guess the problem is too much paste in the pads, but I'm using just one pass over the stencil.

Is there any way to do this and avoid this problem? Should I reduce the IC pads area in the solder paste layer?


texts: Why is a resistor divider used on gate of P-channel MOSFET of discrete USB power path circuit?

texts:
I noticed this discrete power path circuit on the design of the ESP32-A1S Wi-Fi+BT Audio Development Kit:

Sorry, but unfortunately none of the designators are numbered and the resistors does not have values. I took the liberty of numbering them D1, Q1, R1 and R2. I have also explicitly indicated the body diode of Q1 (as pointed out by @Damien).

I understand the job of D1, Q1 and R2. When USB is disconnected, current is sourced from VBAT to VCC5V via the body diode of Q1. R2 pulls the gate of Q1 to 0V and Q1 switches on so that there is a much lower voltage drop than the body diode of Q1 (a.k.a. "ideal diode function"). When USB is connected Q1 is switched off and VBUS supplies current to VCC5V via D1 (with a regular diode voltage drop). The preferred current path is via D1, because VBUS >= 4.4V and VBAT <= 4.2V.

Update: Here is the design that I used (I have indicated the normal voltage ranges of +5V_USB and +VBAT; Gate, Source and Drain of MOSFET explicitly shown):

The designs I have seen and used does not have R1 (R1 = 0 Ohm). There must be a good reason why they included R1. Can anyone offer an explanation and what resistor values are good?

Update: Thanks @Cristobol for pointing out voltage spikes (e.g. ESD) on VBUS / +5V_USB. A low value resistor for R1 (e.g. 1k) will offer some protection for Q1 with Vgs_max = +-8V (of course only if Q1 has an internal zener connected between Gate and Source to protect the Gate).

Update: Thanks @Dorian! I think your answer is excellent! A resistor divider prevents a transient dip on VCC5V during the time that USB is disconnected and VBUS (battery) must take over and supply current.


texts: Does the wattage of a resistor factor into the resistance of a resistor?

texts:
Resistors come in a variety of different ratings based on wattage. As a rule, lower wattage resistors are smaller than higher wattage resistors.  I understand the wattage determines roughly how much current it can handle before it burns up.

I am a bit confused, however. Shouldn't the area of resistor also determine its conductivity? If you supplied a 1000 watt resistor with 3.3v and 100ma, for instance, would you get the same reading as you would get if you passed the same current through a 1/8 watt resistor? Furthermore, if you do get the same reading, shouldn't the area of the larger resistor affect the resistance?  If you get a different reading, shouldn't resistors specify a power range instead just a maximum rating?


texts: Accurately detecting distance from current carrying wire

texts:
I am trying to find a way to accurately detect the distance from a stretched wire for alignment purposes (within 10um). I am not concerned with the absolute value of the distance, rather the repeatable indication that the apparatus is centered on the wire.

I came across the following question Arduino robot wire follower + how to position on wire, where @Marko Buršič wrote:

  If wire is located in the middle, signals from both coils are in phase. You could measure the phase difference with phase comparator.

The above implies that if the wire is not located exactly between the coils there will be a phase difference which could be used to detect the offset from the wire. The problem is that I do not understand this statement. Shouldn't the flux generated by the current in the wire affect all coils in equally, i.e. the induced current in both coils have the same phase?

I could use just the amplitude of the induced current to center the apparatus but I am not sure I could get the required accuracy.


texts: What drives the increase in current in LR circuit?

texts: The current in LR circuit increases like this, I could understand the math which produces the graph by making sure the voltage sum is zero. But conceptually, I don't know what actually happens in circuit. Since inductance is caused by change in current, I don't understand why the current would go up by itself and I don't understand why the induced current continue to decrease.


texts: I'm operating a board at cryogenic temperatures (65 degrees Kelvin and higher) and need to monitor the PCB temperature.  All of the standard surface-mount thermistors I've seen have operating ranges down to -80 degrees C for standard thermistors.  There have been several thermistors with leads that are intended to be immersed in liquid that I've managed to find.  Is there some physical limitation to designing thermistors for this temperature range?  Our mechanical setup makes thermocouples and temperature-sensitive diodes a very difficult option to use.  Are there some other temperature measurement methods that I am not aware of?  Price isn't a problem.


texts:
I'm trying to replace the obsolete AN6878 led driver (logarithmic response, used for audio level indicator) with a modern and available solution.
I'd like to keep the same functionality of the original.

datasheet

this is the bit of the circuit that I'm trying to replace

looking at the datasheet, I think I can replace it using an opamp and some comparator IC, but I only get a basic idea and don't know how to procede.
Can anyone help me understand?

Edit: I’m open to software solution, if I only could understand the exact voltage values where the various leds go on


texts: What kind of jumper wires are used with a breadboard?

texts: What kind of jumper wires should I get for electronics and a breadboard?  There are female to female, male to female, female to female with headers.  I don't know what to get.  Just hookup wire?


texts: What is the purpose of this two pin component?

texts:
What is the purpose of this two pin component (circled)?

It looks to me like a jumper, but it seems strange that it would be so complex for just a jumper (that apparently does nothing). Sits between an AC input and a bridge rectifier.


texts:
In my campus i am using a power supply unit, in order to supply 5V and 0.02A, to my analog circuit that interacts with a microcontroller.

I am unable to go to the university because of work, and i want to take the circuit and the microcontroller to my house for programming work.

It's easy to carry the circuit that resides in a breadboard and the microcontroller, but i cannot take the big power supply.

So i want to provide 5V and 0.02 amps to the circuit.

I have never worked with power supplies before.

From a multi transformer i have in my house, i can get the voltage right.
Heck, even USB proved 5V. I could solder some wires and provide supply to my circuit from the USB cable.

What i don't know is the amps.
How will i be able to provide 0.02A to the circut?

Can i buy smoe power supply wit hthis value, or eevn varying amperes?
Can i create a circuit that will amke sure i am supplying 0.02A?


texts: Inaccurate differential voltage measurement

texts:
I tested 3-level PFC voltage initialization event in practice using 1 x single ended probe to measure the output voltage as well as 3 x differential probes to measure the precharge voltage levels of all flying capacitors. All of the voltage waveforms  match (very close) the simulation model results apart from the C1. I measured the capacitor voltage with DMM and found it to be very close to the simulated voltage level of around 19V.

This leads me on to the question, why is the differential probe giving me false reading on the oscilloscope (around 85V same as the voltage of C2)? Is this a loading effect or something else?
NOTE: C2 is a film capacitor of 4.7uF while the remaining C1 and C2 are tiny 47nF ceramic caps. Also in both cases transistors are not switching and the output load is set to around 10W. Input voltage to the system is a rectified 230Vac signal.


texts:
I have to control a device with a C++ application (Windows) via RS-485. I'm wondering, which would be the best way to connect it. Should I use a USB-RS485 adapter (which would be the most flexible solution) or a RS232-RS485 adapter? Any other recommendations?

I am especially concerned about the speed, I used to work with a USB-RS232 adapter, which was very slow (OK, was also cheap).

At the moment, I'm considering buying a NI adapter. Any other recommendations?

Thanks.


texts:
I understand that in "saturation mode", a BJT functions as a simple switch. I've used this before driving LEDs, but I'm not sure I understand clearly how I got the transistor into that state.

Does a BJT become saturated by raising Vbe above a certain threshold? I doubt this, because BJTs, as I understand them, are current-controlled, not voltage-controlled.

Does a BJT become saturated by allowing Ib to go over a certain threshold? If so, does this threshold depend on the "load" that is connected to the collector? Is a transistor saturated simply because Ib is high enough that the beta of the transistor is no longer the limiting factor in Ic?


texts: Can I recharge a battery that I don't know anything about?

texts:
I like electronics but I basically don't know anything about it (electricity is too complex), the thing is that I've opened a battery from an old laptop that reads "10.8 V 4300 mAh Li-ion"

The battery-pack contains other 6 batteries and a circuit inside, I suppose that the circuit is just for showing battery info in the computer, charge indicator and for preventing 'overcharge'. Batteries shows 2x 0.0 V, 2x 3.11 V and 2x 3.17 V (with a tester), but that's just their current charge, there's no info on them more than a serial number so...

There's a way to SAFELY recharge them? I'm not in a hurry so time is not a problem.

I thought about put them 0.5 V higher than they currently have over and over until they don't get any higher voltage, but I'm not sure if that will work nor if that will even recharge them.

PS: I thought that Li-Ion batteries didn't contain a pack of standard batteries inside...


texts: Please help me identify this LED from a Nuevo (HGH0242) / Horizon Lighting 5-pendant light fixture

texts: This is an apparently failed LED from a 5-year-old Nuevo (HGH0242) / Horizon Lighting 5-pendant light fixture in my house.  Only this one has failed - all others still work.  It measures about 11.7 mm wide, 14.5 mm long.  The aluminum (?) coupon it is mounted on is about 1mm thick and the LED protrudes about 0.7mm above that.  Note that it is essentially a lens-less flat disc, not a hemi-sphere.  My guess is that color is about 3000-3500K.  The power supply, which still works (verified by powering other identical pendants), is rated for 350 mA (constant current), 12 W, 21-36Vdc.  This power supply powers two of these pendants in series.  The other (different) power supply powers the other three.  It appears that the number "3713" and "+" and "-" marks are shown in the solder mask.  An ohm meter shows an open circuit across the part.  The series string of two pendants fails when this one was in it and lights when I substitute another identical pendant for this one. I've tried the big-3 suppliers without success and my Google-Fu has failed me.  I'm trying to replace just this one instead of having to perform surgery on all 5 of the pendants in the (expensive) fixture so they all match in color and brightness. TIA for any help.


texts:
I have an arduino board, and I would to turn a different, completely isolated circuit, on and off. Actually, I will be running 230V to another device, and then control whether it is on or off, with the arduino.

http://www.powerswitchtail.com/Pages/default.aspx
I have been looking a bit at these, and it looks interesting. The problem is, shipping to Europe means they become quite expensive.

So how can I make one myself? Do I need to build some kind of relay? What components can actually handle sending 230V through it, but be controlled from arduino's 5V?


texts: Measure wide range of current 800 µA - 1.5 A

texts:
I am having difficulty measuring current into an IoT device that I am making. I need to be able to gather data about power consumption over time, and about the sleep mode current. I was trying to use a shunt resistor to gather the current data, but I am running head first into a problem with Georg Ohm, and all of his laws.

In sleep mode, my device should use about 800 µA of current, my not so accurate PSU is saying that it is outputting about 2 mA, so maybe I have a bit more coding to do. However during sleep mode, at seemingly random intervals the modem will turn back on for a brief moment and transmit, (standard deep sleep modem behavior). This transmit burst can be up to about 1.5 A.

Anyway, I am having a problem using a shunt resistor because a voltage drop that allows me to see any meaningful data on sleep current, drops so much voltage during a transmit burst that my device restarts.

Could anyone recommend a way to measure current such a large current range?

Device specifications:

Sleep mode current: 600 µA - 3 mA
On current: 27-80 mA
Transmit burst: up to 1.5 A
Voltage: 2.6 V - 4.2 V
Charge current: 400 mA


texts:
I posted the same question on StackOverflow  and I was redirected here.

For my project I need to be able to program the eeprom of an Atmega 328p via an USB to PC. I tried to incorporate an USBasp programmer in my circuit but I was unsuccessful. The PC does not recognise the programmer so I am unable to install the drivers.

So my question is:
Does anybody know how can I update the Atmega 328p eeprom via USB. Is there any basic communication I could use?

I know there are boot loaders, but my programming skills are not adequate to make my own and I can not find an appropriate one.

My code for the Atmega 328 is written in Atmel studio 6. Thank you for the help.

EDIT:
I already have a programator for atmel's chip, but I need some sort of programming option directly on USB. That is why I incorporated an USBASP on my board design.
I would like to be able to open a simple program on a PC, set some parameters and than upload to the eeprom of my 328. All that without an additional programator (a simple plug and play device for any other user).


texts: What is a reference oscillator which is used in Costas receiver?

texts: A Costas receiver has a voltage-controlled oscillator, which is sometimes referred to as reference oscillator. What is the input and output of this reference oscillator?


texts: Why does the base-emitter voltage in NPN transistor become constant?

texts:
The setup above shows the experiment that I have been working with. During the experiment, the current \$i_c\$ and the voltage \$V_{be}\$ were measured for increasing \$V_{in}\$. At some point, the current through the collector will be constant, due to the barrier in the forward-biased base-emitter region being lowered as much as possible by \$V_{in}\$, meaning that its maximum value follows Ohm’s law.

As we further increase \$V_{in}\$, we will find that \$V_{be}\$ will go towards a constant value. Why is that? Shouldn’t it increase too? I have great trouble understanding this last part.

I will appreciate any help!

EDIT: The polarity on the \$V_{in}\$ is wrong. My mistake.


texts: STM32 SDIO works only while probing clock signal

texts:
I have a custom board with an STM32F407VGT6 and an SD card slot. I noticed that I can only access the SD card if I have a scope probe attached to the clock signal. Holding a scalpel blade between my fingers and touching the tip to the clock pad works as well.

The data signals have 33k pullups, while the clock signal is connected straight to the CPU. I did not design the board (and cannot show schematics/layout, unfortunately, but I'm happy to answer questions for further details). But I looked around and other SDIO examples don't have anything on the clock line either.

What would be the best way to fix this issue? Do I have to add capacitance?


texts: I salvaged a few parts from an old RC heli. I also took the main circuit which controls the motors and has the built-in remote control. I want to power it but I don't have the original battery any more. I did some research and I found that the battery was a 3.7V 350mAh LiPo. How can I power the circuit with AA battery? I tried to buy the same battery (as the original) but couldn't.


texts: BT136 TRIAC not closing on LOW signal to the MOC3021

texts:
I am trying to make an AC dimmer. I am following this schematics for my circuit,

Circuit Link

as you can see in the below picture that I am able to turn the signal on after a short while of zero voltage

The blue signal is from my micro- controller (I'm using a PIC18f45 instead of an arduino) to the moc3021  and yellow signal is from the 12 V AC (I am trying to control 220V AC but this oscilloscope can't seem to read higher voltage so this is just to show that I am able to send a signal at zero voltage)

I am not able to dim the light buld. Even with that setup the bulb is still very bright. I tried shortening and lengthening the HIGH signal to the MOC but it doesn't seem to affect it

From what I have understood the moc3021 is a random phase triac driver meaning that I should be able to open and close the gate of at any time of the wall AC phase. The triac should have turned off when the signal turned low but instead the bulb is still very bright.

Am I missing a concept here ? what should I do for it to turn off when the signal goes low?


texts: Where does the negative sign come from in this transfer function?

texts:
I have a transfer function that was given to me. It's been a really long time since I've done block diagram math, so sorry if this is a newbie question.

Based on the block diagram below (I forgot to edit the image, but Tin is the output y, that last arrow)

I am give the equations

$$T{_i}{_n} =  T{_d}{_i}_s{} - T{_m}{_o}{_t}$$

$$G{_r}{_e}{_f}{\rightarrow}{_i}{_n}   = \frac{ -C(s)M(s)}{1 - C(s)M(s)}$$

I can't for the life of me figure out where the two negative signs come from in these equations. Can anybody point me in the right direction as to where these come from?


texts: Switch video sync signal using transistor

texts:
I have a circuit that currently outputs either a high or low signal from a pin on a PIC microcontroller. This part is working as expected.
I now want to take that high / low signal and use it to enable / disable a video sync signal.
What is the simplest way of doing this, is it a job for a transistor or is there a more recommended way of doing it?


texts:
I use a NRF24L01+ module configured for receiver, 3-bytes address, 1-byte CRC, 1 Mbit/s, channel 2402 MHz, 2 pipes listening. Addresses are non-trivial (0x525443 and 0x4d4252).

But when transmitter is off, and receiver stay listening, I have often false packet detection: every 5-15 minutes I get a valid packet (with random payload, of course) for a pipe, so address and CRC match. Why?

Just a simple calculation: suppose NRF24 chip constantly demodulate incoming RF signal even if there is no carrier 1). For valid packet it necessary to match 4 bytes: synchro (0xAA/0x55 depending on first address bit), 3 bytes of address (any of 2 pipes), 1 byte CRC, so average time for false detection (suppose uniform distribution) is

  240/(2×106) sec = 152 hours

Moreover, when I configured the chip for 2-bytes CRC, I got false detection after 1.5 hours. This is very amazing, because CRC is uniformly distributed and average time for false detection should be multiplicated by 256, but actually multiplicated by 10 approximately. Why? I'm very confused.

Anybody have this problem? Maybe anyone can repeat my experiment?

P. S. I know that NRF24L01+ supports 5-bytes address, and I can add any number of my own checksum bytes to payload to solve my problem. I have just a theoretic question. Why I have so often false detection, that not agrees with math.

1) The receiver print carrier-detect register (0x09, called RPD for NRF24L01+) when valid packet appears: RPD is 0 when I have an accidental packet, RPD is 1 when I send packet from a transmitter.


texts: Sourcing special-output-gates a.k.a complementary logic gates

texts:
AllAboutCircuits mentions that a suite of logic gates exist that provide both an inverted and non-inverted output from the standard collection of logic gates.

Is anyone aware of such a logic family and/or a place to source these components?


texts: Where does all the inductor stored energy go?

texts:
If I apply a voltage V to an inductor's terminals and wait for all transients to cease it will store an energy given by the formula: \$L \frac {i^2}{2}\$
If i remove both terminals rapidly enough to avoid any arc formation, where does all the inductor stored energy go?


texts: What is the difference between SNR of a wideband system and the SNR for a narrowband system

texts:
I was reading Wireless Communications by Andrea Goldsmith in the book the author has stated that the Noise power for a wideband system with Bandwidth B is (B*N/2).
Could someone help me understand why is how Noise Power is related to bandwidth?
Does this mean that for a Narrowband system there would be negligible noise?

Also in statistics, we usually use the Noise power as the variance of AWGN which is No/2 why don't we include the bandwidth dependency here?


texts: Which Power Management implementation to use and the differences therein

texts:
Upon using an 'RF to DC converter', DC power management is needed. There is a dilemma in the approach as there are a number available.

From the storage capacitor, there is the 'Switched-mode power supply' or more specifically a 'boost converter' that would output the configured power.

Alternatively, there is a 'DC-DC charge pump' connected to a voltage regulator.

The question is the difference between the two approaches and the pros-cons of each. It is my understanding that their function is the same, however I am under the suspicion that there may be naming/wording confusion that I may not be picking up on.

How are boost converters and charge pumps different, and where does the voltage regulator come in?

Thank you


texts: Load resistor value for phototransistor switch

texts:
According to this application note from Fairchild (btw, I find Fairchild's application notes to be of immense value - thanks to all who have taken the time to write one), the load resistor value for a phototransistor in a common emitter configuration, to obtain switch-like performance, can be calculated with:

VCE = VCC – ICE • RL
RL = (VCC - VCE)/ICE

Their example conditions results with a 68kΩ resistor being selected. My question is: is this a minimum value? What affect would increasing this value have on operation? If my values resulted in a 15kΩ RL value, and I used 100kΩ, what behavior might be different?

Background: I'd like to use a GPIO IC that has internal 100kΩ pull-up resistors and am wondering if the pull-ups will work as load resistors. At VCC=3.3V, VCE=0.4V, and ICE probably somewhere around 500µA (LTR-301), my load resistor (according to Fairchild's formula) should be ~15kΩ.


texts: Reading Radio Frequency signal in audacity

texts:
I am wanting to read radio signal I captured with my RTL-SLR, I record it in .wav file using SDR#, The Frequency was at 315MHz. I am what I believe is the preamble of the signal, and I would like feedback if I am reading it correctly.

I also put the wav file into hexviewer, and assuming I read it correctly, I did not find binary pattern based on what I saw in audacity, does that even matter or no?

Also I measure the μs between 1, and 000, for 1 I got 150μs, and for 000, I measured 460μs. I am not sure if I am accurate on that. For some reason I decided to divide 150/460, and got 3.06 (close enough to whole number) that is why I assume its 000.

My question is, To figure out binary of RF signal am I doing it correctly or what do I need to do?


texts: ESC motor calibrated, but still beeping and not responding

texts:
I am using this motor called abcGoodefg RC 2200Kv brushless motor. At first, when we followed the sample code on this website, things went well. But when we changed 1000 and 2000 to 10 and 20, respectively, our motor wouldn’t respond properly.

We then tried to properly follow the calibration procedure (as in, set throttle to high with Arduino connected and battery disconnected). Once we connect our NiMH Tenergy battery, we hear two beeps (one low, then one high), we then set our throttle to 0, but we still keep hearing one beep per one second. The beeps eventually die off, but we never receive confirmation beeps (1-2-3, then 2-2).

Can someone explain what is going on, and how to fix it? Could it be the issue with the battery? Or the motor itself? Please help! We need to get this solved for our final project!

#include <Servo.h>
Servo ESC;     // create servo object to control the ESC
int potValue;  // value from the analog pin
void setup() {
  // Attach the ESC on pin 9
  ESC.attach(9,1000,2000); // (pin, min pulse width, max pulse width in microseconds)
  Serial.begin(9600);
}
void loop() {
  potValue = analogRead(A0);   // reads the value of the potentiometer (value between 0 and 1023)
  Serial.println(potValue);
  potValue = map(potValue, 0, 1023, 0, 180);   // scale it to use it with the servo library (value between 0 and 180)
  ESC.write(potValue);    // Send the signal to the ESC
}


texts: Placing a mounting hole partially outside the board

texts:
I have a board currently 50x30 mm. And I need to have 4 mounting holes on it.

Bad news is that I don't have enough space to place them in regular way. Now I made the following thing: I placed four 3.2 mm holes with centers within the board edges but big part of the holes appears outside the board:

(white circles are washers edges)

If the manufacturer will be able to do this thing I'm sure that those holes can be used for mounting.

Main reason for this question here is that I'm pretty in rush and if in the Monday morning I will find out that it's not possible I will lost one day for rerouting (and probably to expand the board which is not very good actually). As I don't want to lose a day I came here to have an advise: is it common that this kind of holes can be made? Or maybe there is anything else I'm not aware of?

So if your advise will be to avoid this kind of holes I will have Sunday to make needed changes. What is you opinion?


texts: Arduino - Multiple button event with lcd shield

texts:
I'd like to detect two buttons being pressed together with the Arduino LCD shield. Does anyone have example code of handling multiple button events? I need an event when both the Up and Down buttons are pressed together for 2 seconds.

The LCD Shield is the 16*2 HD44780 compatible LCD with WHITE characters & BLUE backlight that has 6 buttons. I got it from www.hotsolder.co.uk.


texts: LVDS comparator re-triggers on falling edge

texts:
I have a problem with a simple comparator circuit. The comparator takes a 1 PPS (pulse-per-second) signal as a single-ended input, and outputs an LVDS signal.
The issue is that the comparator, ADCMP604, consistently re-triggers on my input pulse's falling edge for some unknown reason, so I end up with a glitch directly following the main pulse width.
LVDS OUTPUT (using Keysight N2751A probe)

SCHEMATIC

The PPS is input on an SMA port from a SpectraDynamics pulse distribution amp (which itself takes a pulse from a Rubidium clock for distribution.)
The LVDS output (STOP_0D_P/N) terminates with a 100 Ω resistor just before its receiver. I have tried everything I can think of:

Removed the ferrite bead
Replaced R301 with 33.2 Ω and added 16.9 Ω (2x 8.45 Ω) in series with PPS_IN
Added additional parallel caps to C68
Scaled the R294, R302 voltage divider down - here I left the divider output (ratio) @ 1 V, but scaled the resistors in case I was running into input bias current issues
Changed the 100 Ω termination to 50 Ω + 50 Ω with a cap to ground in-between
Replaced C72 with 1 μF
Increased the trigger level from 1 V to 1.6 V (or so)
A few other things that are slipping my mind

Nothing worked - though increasing the trigger level helped (the glitch reduced, though wasn't eliminated).
If I use the raw Rubidium (Rb) clock output as PPS_IN (as opposed to the output from the distribution amp) it works fine. The Rb output has a much slower rise time and does not undershoot on the falling edge.
So, I suspect it relates to either the freq. content or the undershoot.
This is a view of the falling edge of the input PPS (note the undershoot):

And this is a conglomerate view of the input pulse, trigger level, and LVDS output:

Notes on above:

The input signal is shown in cyan(?)
The trigger level (R294, R302 voltage divider) is shown in brown
The scales of the cyan and brown are the same (as shown at the top of the image)

This is important to note, since the input signal's undershoot never re-crosses the trigger (and hence, in theory, the glitch shouldn't exist)

The LVDS output is shown in yellow, measured using a diff probe, range +/- 400 mV

This is driving me crazy. Any suggestions are welcome.
Appendix:
Below is a view of the layout. I highlighted the relevant path in green. For scale, most components (including R56) are 0603.
R265 leading in from the SMA port is 0 Ω.
R55 and R58 on the diff pair traces are also 0 Ω.
R56 is the 100 Ω termination resistor.


texts: Can this example be used for explaining the effect of lamination on power loss in a power transformer?

texts:
I'm trying to demonstrate to a group of people how a lamination of the transformer core reduces the power loss due to Eddy currents by not using any complex math.

I start with a non-laminated core as the following:

Above, the outer brown rectangle represents the transformer core outline cross-section. The inner green rectangle is a path in the core I have chosen for an Eddy current which loops around the centre of origin of the core. Notice the grey dashed diagonals cross at the centre of the core. Assume the total magnetic flux is Φ passing normally through the green loop. I also assume for simplicity the current is flowing in a rectangle loop instead of a circular loop around the centre of origin of the flux.

Now each square is one unit length call it u.

The total flux across the green Eddy current loop is related to the area of it.

So the flux Φ passes through 7*10 = 70 unit square in this case.
We can also say that the EMF is directly proportional to Φ.

Ant the resistance of the loop is proportional to the length of the loop and in this case is 34 units.

So we can define the relationship for the above case:

V --> 70 unit square

R ---> 34 unit

And the power for this case is \$\frac{V^2}{R} = P\$

Now I divide the core into two pieces as below:

In this case, the area becomes 7*4 = 28 unit square

And the length becomes 22 unit.

Now we focus on the Eddy current loop which passes through |XY| because the dimension change we make is in the horizontal direction.

So relative to the first case we can write the voltage and resistance per loop as:

\$\frac{28}{70} * V\$

\$\frac{22}{4} * R\$

So the total power,

\$2** [(28/70)^2 / 22/34] * P = 0.5*P\$

Similarly I divide the core one more time so this time into equal 4 cells:

Here the area is 7*1 = 7 unit square

The length is = 16 unit

Again relative to the first case we can write the voltage and resistance per loop as:

7/70 * V

16/34 * R

So the total power:

4 * [(7/70)^2 / 16/34] * P

becomes roughly 0.09 * P

So the total power loss in the first case is P, in the second case is 0.5P and in the third case is around 0.1P.

Can this be a used as a simple demonstration for the relation between lamination and the power loss due to Eddy currents? I want to avoid complex math by the trading of more concrete proof. I'm wondering whether there is a fundamental problem in the logic of this example.


texts: Help building a small solar charging kit

texts:
I'm trying to build a cheap light system for an NGO in Kenya, that will allow a family to have light using solar panels. If you're familiar with the new m-kopa service offered by Safaricom the setup I'm trying to achieve is very similar, except that it would use a car battery as the storage unit.

What I have so far for the testing is a 5W/12V solar panel that would charge the battery and afterwards use that power to supply electricity for a few led lightbulbs, phone charging, a so forth.

I thought of car batteries because they're readily available in the area and I think (I have no electronic or electrical knowledge) that with the use of an inverter or convertor for expanding the setup in the future to power hungrier devices.

Please excuse me if I'm saying things wrong, I'm just the project creator and would like to understand if it's viable and what the cost of this setup would be, I'm not asking about the prices here, just what the setup would look like.

Connecting the solar panel to the battery would charge it, that's something I've seen on DIY videos and so forth, but I'm worried about overcharging and the dangers it carries.

Thanks in advance to any that may answer


texts: How can I measure phase shift in Multisim using Tektronix oscilloscope?

texts:
I have to measure the phase shift between input and output of amplifiers.
Below is an example circut with voltage charts (yellow is input, blue is output.)
How do I measure phase shift between them?
I mean I can do it by looking at the charts but I heavily doubt that teacher will accept it.


texts: Help - Battery discharge protection circuit

texts:
I am working on a LED (3 V/20 mA) torch circuit powered by 3.7 V/1000 mAh Lithium battery. Am planning to add discharge protection feature to this circuit. If  battery voltage go down to 3.3 V the torch should cease operation. However I can not figure out how to do that. I have come across some circuits where they have used a 3.3 V zener diode and a transistor to turn the intended load on. However I couldn't validate the working of this circuit.

I tried simulations using circuit lab but voltage across zener is dropping after connecting to transistor base. Need help in figuring out this circuit. I have added a lamp with resistance of 25 ohms to simulate 7 LED's connecting in parallel in the below circuit. Any help will be much appreciated?


texts: Confusion of terminology for control systems

texts:
I am confused about the following definitions (if there are any):

Reference input
reference signal
setpoint
reference

I don't understand specifically what they are referring to.

Do they refer to an external environmental variable, or the value we have assigned to that environmental variable?

For example, for a heating system, does "reference input" or "setpoint" refer to 20 degrees or to the voltage that corresponds to 20 degrees?

I have looked and I haven't found any clear definitions and most seem to be pretty vague.


texts: circuit breaker for 1/4 HP 115V AC motor?

texts:
I'm building a machine to help me manufacture some optical components more quickly. The machine will be powered by a plain old, "boring" 1/4 HP motor, like the ones used for various household appliances. I actually bought this one:

http://www.amazon.com/gp/product/B006P1RUOM/

The product description says: "split phase motor, 5.4 amps, 60 hertz, auto protector". The page title in case the link is dead: "A.O. Smith GF2024 1/4 hp, 1725 RPM, 115 volts, 48/56 Frame, ODP, Sleeve Bearing Belt Drive Blower Motor".

How would you choose the circuit breaker for this thing? I assume it will have to support a current larger than the stated 5.4 amps, because there's an initial shock when you power it on.

For extra safety I would prefer a 2 pole breaker. The optical items are coated with some water-based fluid during processing and, while there's no chance for the fluid to reach the inside of the box, where the motor is, I am very much in favor of taking additional safety measures whenever it's reasonably possible.


texts:
I am trying to solve a circuit with two current sources.

I1, I2, V1, V2 are known.
R1, R2, R3 are unknown.

I've tried node analysis, but I can only come up with two equations

\$\dfrac{V_2}{R_1} + \dfrac{V_2-V_1}{R_2} = I_1 \tag{1}\$

\$\dfrac{V_1-V_2}{R_2} + \dfrac{V_1}{R_3} = I_2 \tag{2}\$

so I have two equations and three unknowns.. How can I get the third equations?


texts: What's an alternate pin function on a microcontroller?

texts:
I'd like to know what "Alternative Function" refers to in the context of the IO ports of a microcontroller.

I don't need to know how to activate it when connecting to a peripherial, but I'd like to know what it exactly is and why we'd need it.


texts:
The Circuit Below is a "Short Circuit Protection", and Circuit Detail is :

Voltage Regulator: LM2576
Maxixmum Load Current (i): 3A
Output Voltage: 5,12 and 15 Volts

The Original Circuit is Low Current and Uses "SK100" as Q1.

My Question Is "Can I Use TIP42 as a Replacement for SK100"

This is My Circuit:

and This is the Absolute Maximum Ratings for TIP42


texts:
I wrote the following code to display a blinking text on an lcd. The code works properly on the simulator but the real lcd doesn't display anything. I attached the circuit diagram I used to connect the lcd. I would really appreciate it if someone could tell me what did I do wrong.

[![// LCD module connections
sbit LCD_RS at PORTD.B2;
sbit LCD_EN at PORTD.B3;
sbit LCD_D4 at PORTD.B4;
sbit LCD_D5 at PORTD.B5;
sbit LCD_D6 at PORTD.B6;
sbit LCD_D7 at PORTD.B7;

sbit LCD_RS_Direction at TRISD.B2;
sbit LCD_EN_Direction at TRISD.B3;
sbit LCD_D4_Direction at TRISD.B4;
sbit LCD_D5_Direction at TRISD.B5;
sbit LCD_D6_Direction at TRISD.B6;
sbit LCD_D7_Direction at TRISD.B7;
// End LCD module connections][1]][1]

char MyFirstText[] = "Hello ";

void main(){
Lcd_Init();

  Lcd_Cmd(_LCD_CURSOR_OFF);
       while(1)
       {
  Lcd_Cmd(_LCD_CLEAR);
  Lcd_Out(1,6,"Hello ");
  Lcd_Out(2,6,"World");
  Delay_ms(100);
                  }
  }

P.S: I don't have a 10k potentiometer so I connected a 5k instead.


texts:
I am working on a design with a processor which has I2C SCL line & SDHC_CD(Card Detect) pins multiplexed. I need to use I2C line. I am giving SD Card for boot code of processor. I have below doubts :-

Is it mandatory to connect Card Detect pin to the Host?
If I dont use SDHC_CD, Will the Processor be able to read from SD Card?
If I need to use CD pin, Is there any way to use both functionalities?

Can anyone please share the link for SDHC protocol?


texts:
A three-phase Y circuit with positive sequence (abc),now if \$V_{ab}=220∠120°\$,then what is\$V_{bc}\$,and \$V_{ca}\$ ?

i thought Y circuit with positive sequence means \$V_{ao}=220∠0°, V_{bo}=220∠-120°,V_{co}=220∠-240°=220∠120°\$,so \$V_{ab}=220∠0°-(-120°)=220∠120°\$,so obviously

\$V_{bc}=220∠-120°-(120°)=220∠-240°\$

\$V_{ca}=220∠120°-(0°)=220∠120°\$

However,the solution for this problem is

\$V_{bc}=220∠120°-120°=220∠0°\$

\$V_{ca}=220∠120°+120°=220∠240°\$

So it seems that my answer are all wrong,so i want to ask where am i wrong in my calculation?


texts: Using a counter to count how many clock cycles a signal is high using Verilog

texts:
I want to use a counter to count how many clock cycles an input signal is high. The issue I am running into is that once the input signal returns back to zero, my counter resets which causes my output to also reset since my counter and output are set equal to one another.
In other words, you can see in my simulation that my output is set to 5 for only one clock cycle before it is reset back to zero. What I would like to happen is my output signal to remain equal to my last clock cycle until a new count is finished.
I've posted my code and simulation below.
///////////// HDL Code //////////////
module counter    (
out     ,  // Output of the counter
in_1  ,  // input signal
clk     ,  // clock Input
reset   ,     // reset Input
);

  output [7:0] out;
  input in_1, clk, reset;

  reg [7:0] out;
  reg [7:0] counter;

always @(posedge clk)
if (reset)
  counter <= 8'b0;
else if (in_1)
  counter <= counter + 1;
else if (in_1 == 8'b0)
begin
  out = counter;
  counter = 8'b0;
end
endmodule

///////////// Test bench Code //////////////

`timescale 1ns/100ps

module counter_tb;

//parameter SYSCLK_PERIOD = 20;// 50MHZ

reg clk_1;
reg in_11;
reg reset_1;

wire [7:0] out_1;

initial
begin
    clk_1 = 1'b0;
    in_11 = 1'b0;
    reset_1 = 1'b1;

    #20;

    in_11 = 1'b1;
    reset_1 = 1'b0;

    #50;

    in_11 = 1'b0;

    #100;

    in_11 = 1'b1;

    #100;

    in_11 = 1'b0;

    #50;

    $stop;
end

//////////////////////////////////////////////////////////////////////
// Clock Driver
//////////////////////////////////////////////////////////////////////
always
    #5 clk_1 = ~clk_1;

//////////////////////////////////////////////////////////////////////
// Instantiate Unit Under Test:  counter
//////////////////////////////////////////////////////////////////////
counter counter_0 (
    // Inputs
    .in_1(in_11),
    .clk(clk_1),
    .reset(reset_1),

    // Outputs
    .out( out_1 ),


texts: Need help with this feedback circuit (bjt amp)

texts:
Could someone help me out with finding the feedback resistor of this circuit.
I know for sure RB2 and RL' are feedback resistors but what about RB1/3?

Kind regards.


texts: Value of resistor to limit current to 1 ampere in 12 volts circuit

texts: I want to connect my modem directly to a 12volt battery so that I dont need a adapter. My modem’s specs says that it need 12 volt 1 ampere as input.Now the voltage of 12 volts can be directly given by the battery and I think its not an issue to connect it directly.Still I want to use a resistor to limit current supply to 1 ampere.What value of resistor should I use.


texts:
I'm trying to route a new VHF RF receiver (LO is 151MHz, RF is 162MHz). There's a pair of LC filters on this board, as well as a Si5351 oscillator and a crystal. From what I've read, an uninterrupted ground plane becomes especially important when designing boards like these, and I'd like to make sure that's what I build here.

The problem is, my 3v3 VCC is on the left side of the board and it's needed by the Si5135 on the far right. I'm not able to move components around to bring these two closer together (I'm constrained by the microcontroller board I'm using and by the placement of the LC filters.)

Is routing power using jumpers -- say, 22AWG -- a viable solution here? A simple piece of wire would save me from routing the VCC line all the way across the board, cutting the ground plane in half, and it'd save me the cost of a four layer board. What are the up and down sides of using them?

Edited to add this layout: (with corrected uFL connector and unblocked references)

Bottom right: RF section with LC band pass filter and uFL connector
Top right: LO section with low pass filter, Si5351 and crystal (far right)
Just left of center: NXP SA636
Far left: IF section with two MuRata filters
Top left: Demodulator section

Ground planes aren't shown, but will be on both sides of the board. Red traces are front side, green are back. The pinout is for Adafruit's "Feather" boards: Feather

Update, Feb. 6th:
I rerouted the board along the lines of AnalogKid's suggestions and added vias as a'la TimWescott. (I had meant to add these but figured it'd just be confusing in the original post.) Here's the updated board:

I made sure that U1's decoupling capacitor is between the power supply and U1's pin 5 (the power supply line.) Is the trace there a little long? Either way, I think this layout is significantly improved.

I also added guard vias between the LO, RF, IF and demodulator sections. The pitch should be well under what's required for ~151/162MHz. I also added vias to stitch the front and back ground planes near just about anything marked 'ground', and added some on the "far" side of the 3v3 line on the rear.

Always looking for more info, but even if there isn't this was a huge help. Thanks!


texts: What is the relationship between the length of a wire, its AWG, and its amperage rating?

texts:
The more amperage a given appliance or device draws on a circuit, the thicker the wire needs to be, correct?
And this is to prevent the wire itself from becoming a heating element.
I understand that a 15A circuit needs a specific minimum gauge of wire, but how does the length of that gauge wire affect the situation?
If the wire is longer, despite the amperage rating of the circuit, would the wire need to be larger gauge?


texts:
What's the best PIC to start learning with? I want a PIC with 8 pins and with analog inputs.

I have an 16F628A, but I think that the 16F684 could be better. What is the difference between PIC16F648 and 684A?

Which would be best?


texts: What is the best way to go about high-quality wireless communication between two microcontrollers?

texts: I want to sample a wave from a record player with a very high-bitrate using an analog to digital converter which gets sent to a microcontroller. That microcontroller then sends the wave at a high-bitrate to another microcontroller via a wireless communication at a short distance. The signal then gets sent through a digital to analog converter and then to a stereo and respective speakers. I am looking for guidance as to where to start researching for a high-quality wireless transmission, because some of the wireless protocols ( like bluetooth ) I was looking at have limitations that degrade a sound wave too much. Thank you


texts: Step up converter problem PAM2423AECADJR

texts:
I have problem with a step up converter made with the PAM2423AECADJR.
I have an input to the converter 3-3.7 VDC and regulated the output to be 5 VDC.
I am driving a DC motor (1.5A max) with the 5 VDC, using in between an ATTINY85 that drives a motor driver with PWM.
The problem happens when I force the motor and exceeds 300 mA. Then everything becomes unstable and nothing works correctly, the motor starts to vibrate like crazy.
I am thinking that a problem could be with the fixed inductor.
Can anyone help me out?
This is the link for the IC.
This is the BOM :


texts: Can anyone identify the microcontroller on an HC-SR04

texts:
The HC-SR04 is a popular, and very inexpensive, ultrasonic ranging device and I'd like to modify one to change its functionality. If I can identify the controller I might be able to reprogram it, or at least replace it with one I can program myself.

The controller is a 14 pin SOIC and has pin 4 Vcc, pin 11 Gnd, Xtal between pins 5 and 6, and I think pin 7 might be a Reset. It has no markings at all on it, so the manufacturer obviously doesn't want me to know what it is.

The pinout doesn't seem to match any 14 pin PIC, or Atmel chip that I can find.

Is anyone familiar with this device or care to make an educated guess as to what the microcontroller might be?


texts: I am trying to detect the zero crossing point of back emf in a bldc motor in order to control it sensorless. Do you have any idea what detection circuit should I use. I am thinking about a network resistor and 3 comparators on each phases. Thank you !


texts:
Okay guys, I'm in a bit of a pickle here. I have the following circuit:

As you can see, pin 3 is my only output. I've actually already had this board printed, so there's not much room for modification. I'm taking a reading from an analog pressure sensor, doing an A/D conversion and then I want to send that value to an Arduino. Is there ANY way I can send this over just pin 3? If so, how? If not, can someone give me a quick SPI or Bit Bang code example? I'm using a PIC12F675.

Edit: Here's a link to the full size image.


texts:
I come here because I am struggling to understand the signals coming from my 3 phase BLDC motor current.
I am using a BLDC motor with a DRV8323RS driver in 1xPWM mode with Hall sensors. I measure the current A, B and C using low sense resistor R_sense of 2mOhm as described in the typical application of the datasheet (cf schematics below).

The gain amplifier G_csa of the DRV8323RS chip is set to 20V/V. The current measurement is set as bidirectional. The voltage of the sense resistor is outputed on SOA, SOB and SOC and routed to the ADCs of my µC. I sample these 3 ADC channels of my µ-controller and I send the current via UART to my computer.
I do the conversion from voltage to current with the following equation with SOx on 16-bits resolution :

Regarding the following pictures I can see several problem :

Picture 1 shows the currents with the motor being moved by hand and no voltage applied. We can see an offset of approximately -2A when there is nothing happening. Then we see the resulting current of the Back EMF which looks OK

Picture 2 shows the currents when the motor has 2V (10% duty cycle) applied with no load on it. Difficult to interprete but OK the offset is still there.

Picture 3 shows the currents when the motor has 2V applied with a load by hand to slow down the commutation. Here we see that the shape of the signal looks correct for the green BUT not so much for the blue and red ones. Why the red has a bigger magnitude that the others ? And why the blue signal does not go to negative ? Also, the currents measured seem to not have the correct order of magnitude as I could see on my power supply screen 0.5A. What can be wrong electrically or in my computation ?

Picture 4 shows the currents with 6V (30% duty cycle) applied and a load by hand. Here the signals are not going negative except some spikes. What is happening ? I thought about aliasing but does not look like.

Update after progression :
I did some improvements on the measurements and partially solved the problem.

I measured with an external tool the static voltage out of the driver when there is no current flowing and I saw that the voltage was fluctuating between 1.61V and 1.65V where it is supposed to be static at 1.65V. This shows fluctuation but it is not big enough to explain a big offset of -2A shown in the original picture. This must come from an offset on the ADC channels. For the moment I compensated it by software.

I did a simple averaging filter for the noise.

The problem of some channels not going negative have been solved by increasing the sampling time of the ADC channels. The following picture shows the improvement on the motor running under 10% PWM.

However, when the motor speed increases under 30% of PWM, I cannot get a good measurement even when I tried different ADC sampling times. It looks like the capacitive effect of the ADCs is too big to adapt with the changing voltage of the 3 channels.

My remaining questions are :

How do you deal with this ADC limitation ? I was thinking about changing the gain of the amplifier to reduce the magnitude but I will loose in resolution.
I still don't know why one of the channel has a bigger amplitude than the others, any idea ?
How can I explain the difference between current consumption displayed on my DC power supply and the current measured with my ADCs (0.5A vs 4A) ? It is related with RMS ?

Thank you all for your help :)


texts: RAM device / timings for small VGA project

texts:
For a personal hobby project I'm looking to make a small vga display using an fpga. I was thinking of making the display  640x480 pixels with one byte colour per pixel at 60hz (I believe those timings should work on any monitor?)

By my calculation that means I need to read 640*480*60 bytes from the ram every second which is 18432000 bytes per second giving a time per byte of a little over 54ns per pixel.

I'm looking at a device something like this for my memory.

http://uk.farnell.com/cypress-semiconductor/cy62128ell-45sxi/ic-sram-1mb-128kx8-5v-soic32/dp/1650060

The datasheet indicates that it has an access time of 45ns so by my understanding it should be fast enough for my fpga to read the data from it. But I'd have to update it during the period when no data is being displayed as it's not fast enough to complete a read and write in that time.

Are my calculations correct, and would such a device be suitable for using in this way? Or did I miss something?


texts: Relay module and Arduino Isolation; How to acheive?

texts:
I'm going to control a 3phase motor with an Arduino Pro mini and and a 1 Ch.  relay module. In numerous articles it's been advised to separate Arduino and relay module's Vcc. For sure, the second method is preferred, but does the first method also fulfills this goal?

UPDATE:

I changed the diagrams to better illustrate the circuits.


texts: Why are most consumer electronics power supply boards single sided and made of FR2 (Phenolic resin)

texts:
Most consumer appliances/power adapters that I open up have an SMPS providing the power. This SMPS is layed out on a phenolic resin (FR2) board and is usually a one-sided layout. Can anyone explain why power supply boards are designed as such?

My guess is that this board mostly contains through hole components, and is easier to wave solder when laid out on a single side. Since FR4 is used for multilayer boards/through hole plating and vias, it is cheaper to lay the power supply out on this type of board.


texts: How to get translation and roation data using 6DOF MPU6150

texts:
I am trying to get the position data from an IMU 6 Degrees of Freedom (MPU-6150) board using an Arduino Uno. I am trying Jeff Rowberg’s example MPU6050_DMP6.ino that may be found here.

This is the first time I've worked with an IMU. I have no idea whether it's possible to get the position data using the using quaternions and yaw, pitch and roll data? It would be great if someone can explain how to find the position of the sensor (translation in cm or mm and rotation in degrees) using that sketch.


texts: Can you pair a compass or magnetometer with an induction circuit to create a form of metal detector?

texts:
A compass or magnetometer by themselves can only detect/measure magnetic fields, and thus would normally only be able to detect ferrous metals and (possibly) some active electrical circuits in addition to the earth's magnetic field.  That in itself can be useful at times.  However, if you had a circuit with an induction coil on it (any size or shape), meant only to induce current in nearby metals, could you

a. Get a baseline measurement of the reaction of the compass or magnetometer to the induction circuit.

b. Move an assembly of the magnetometer/compass with the induction circuit around to

c. detect non-ferrous metals by the different reaction the compass/magnetometer has from its baseline when the induction circuit and sensors get near non-ferrous metals?


texts: Designing 2-stage BJT CE class-A voltage pre-amplifier with specified goals and without global NFB

texts:
BJT CE Class-A Voltage Pre-Amplifier
Suppose a design requirement limits the selection choices to the following class-A BJT common emitter stage topologies. No global NFB is permitted. Only local NFB via the emitter leg with passive components as shown below:

simulate this circuit – Schematic created using CircuitLab
Two, and only two, stages must be used to meet the requirements. A single stage doesn't qualify. And three stages cannot be used, either. It must be exactly two.
Excluded topologies include any stage requiring more than one BJT, bootstrapped topologies designed to increase the input impedance, and any use of global NFB for the two stage system. All NFB must be local and via emitter degeneration, as shown in the above example cases.
End-to-End Amplifier System Specifications

Two class-A BJT common emitter stages per the above topology choices.
Bandwidth: \$20\:\text{Hz} - 20\:\text{kHz}\$.
Input impedance: \$R_{_\text{IN}}\ge 5\:\text{k}\Omega\$.
Output impedance: \$R_{_\text{OUT}}\le 1\:\text{k}\Omega\$.
Maximum Input Signal: \$v_{_\text{IN}}\le 316\:\text{mV}_{_\text{RMS}}\$.
Maximum Output Signal: \$v_{_\text{OUT}}\ge 5.66\:\text{V}_{_\text{RMS}}\$.
Dual supply with ground: \$\pm 12\:\text{V}\$.
THD \$\lt 1\%\$
Assume the operating temperature for all components is \$27\:^\circ\text{C}\$. (If the system performs well over a wide temperature range, that answer will be preferred over others.)

It follows from the above that:

\$\mid\, A_{v}\mid\quad\ge\quad\frac{5.66\:\text{V}_{_\text{RMS}}}{316\:\text{mV}_{_\text{RMS}}}\approx 18\$.

Stage 1 Specifications

Voltage gain: \$\mid\, A_{v_{_1}}\mid\:\,\ge\: 8\$.
Input impedance: \$R_{_{\text{IN}_1}}\ge 5\:\text{k}\Omega\$. (Per \$R_{_\text{IN}}\$.)
Output impedance: \$R_{_{\text{OUT}_1}}\le 1\:\text{k}\Omega\$.
THD \$\lt 1\%\$

Stage 2 Specifications

Voltage gain: \$\mid\, A_{v_{_2}}\mid\$ -- not specified. (Adapt per end-to-end system requirements.)
Input impedance: \$R_{_{\text{IN}_2}}\ge 1\:\text{k}\Omega\$.
Output impedance: \$R_{_{\text{OUT}_2}}\le 1\:\text{k}\Omega\$. (Per \$R_{_\text{OUT}}\$.)
THD -- not specified. (Adapt per end-to-end system requirements.)

Problem Summary
Given the above specifications and limitations, what might a completed design process look like? What caveats or notes should be discussed?
The above specifications do require some thoughtful care with respect to the transition between the first stage and the second stage. It's non-trivial.
I will provide my own approach below. But I will much prefer to select any sufficiently detailed answer over mine.
(Please feel free to ask any additional questions that might help clarify the question.)


texts: Designing a DC stage for a mixed signal board

texts:
I am working on a board that contains a DC stage, an SBC module, mechanical relays (smd) and communication modules.
The power supply is a cheap 24v AC-DC converter. It is a COTS product. The DC stage needs to provide a 12v, 5v and 3.3v.
I need to supply different kinds of systems simultaneously: communication modules (wifi, ethernet, cell, usb), an external tablet, an SBC, multiple ATtinys, RS422 drivers, sensors and other peripherals.
As I see it, the DC design is key both from power requirements of the board and also from EMI and noise suppression.
The previous version of the board was designed poorly in terms of schematic and layout.
My plan:

Design a converter for the 24V to 12V drop.
Use a linear regulator (non LDO) to step the 12V to 5V.
Use an LDO to regulate the 5v to 3.3V.

My design guidelines are, of course, open for input.
My questions are:

what kind of converter should I choose? will a flyback be sufficient?
Can I trust a switched converter to supply communication modules and controllers?

If I use a non-isolated converter (24V to 12V), will separating the grounds (analog, digital) help me suppress interferences on my PCB? Are there other methods I should implement?

Should I place the DC stage on one small area on the board or put the regulators as close as I can to their relevant consumers?

If I don't have size constraints, is it better to lay out in two layers or four?

I'd welcome other inputs and reading references (links, pdfs...) :)
Many thanks for your help!


texts: Why would you put multiple resistors in line vs one resistor of the same value?

texts: Why would you put multiple resistors in line instead of one resistor that is the same value? In this case, I have a PCB with three 1k ohm resistors. What could be the reason for this instead of just one 3k ohm resistor? Thanks in advance!


texts:
I want to define 19, 16-bit parameter in a way that I can call them like b[0], b[1], b[2], ...
this is my code:

    module optimizedSourceFIRfilter(aclk, s_axis_data_tvalid, s_axis_data_tdata,
                        s_axis_data_tready, m_axis_data_tvalid, m_axis_data_tdata);

        input aclk, s_axis_data_tvalid;
        input [15:0] s_axis_data_tdata;
        output s_axis_data_tready, m_axis_data_tvalid;
        output [15:0] m_axis_data_tdata;

        parameter signed [15:0] b [18:0];
        b[0] = 26;
        b[1] = 270;
        b[2] = 963;
        b[3] = 2424;
        b[4] = 4869;
        b[5] = 8259;
        b[6] = 12194;
        b[7] = 15948;
        b[8] = 18666;
        b[9] = 19660;
        b[10] = 18666;
        b[11] = 15948;
        b[12] = 12194;
        b[13] = 8259;
        b[14] = 4869;
        b[15] = 2424;
        b[16] = 963;
        b[17] = 270;
        b[18] = 26;
    end module

however, this is not working and I got these errors:

near "[": syntax error, unexpected '['.

and this one

vlog-13205) Syntax error found in the scope following 'b'. Is there a missing '::'?

how can I solve that??

EDIT:
I also changed parameter to reg, but I got the same error messages


texts: Matching S22 with a metal plate at the output

texts:
So assume we have a highfrequency device which has a missmatch at S22. Some of my colleagues solder a little round metal plate, placed on top of the signalpath it self (shortly before the SMA Connector) to improve S22 by 5 to 10dB.

My question is, why is this improving the signal that much?
Is it behaving like a capacitor? Does it depend on the resonance frequency?


texts:
Arduino digital pin in OUTPUT mode have low impedance, is it safe to limit current through two leds (connected to two output pins) with one resistor, not two (knowing that leds will go dim and current will decrease when both diodes will be on (I'm not going to turn them on at the same time anyway)). Does led diode protect pin from sinking current (when pin is LOW)?

There's two circuits on simulation, right is right way to limit current, and left is "wrong" way to do it, center switch closes first circuit and opens second and vice versa. Left and right switch changes level of second pin from HIGH to LOW. Resistor near current source simulates low impedance of power source.

simulation


texts:
I've been learning about different constant current circuit designs and just recently stumbled upon this one. All I know is that the highlighted resistor is the load resistor and when varied, like a potentiometer, the current running through the load resistor stays the same. Also, adjusting   the other two resistors will change the current through the load.
I think this makes some sense, for creating a path of less resistance either through the diodes or transistor will cause more current to flow in that direction. Yet, I don't understand why the current through the load is unaffected by the loads resistance. Is it because the current above the transistor cannot sense the loads resistance below? Therefore, once passing through the transistor you will have the same amount of current due to the fact that the current only has one path to ground? Maybe that's total nonsense.
Lastly, not sure why the diodes either.


texts: Voltage Difference in Superposition Theorem

texts:
I have to find voltage across R5 using superposition theorem but the problem is that I have a voltage difference of 4.16V,

Solution:-
Shorting battery VS1

R34 =8/3Ω =2.67Ω (Solved R3 & R4 in parallel)
R234 =41/3Ω =13.67Ω (Solved R34 & R2 in series)
R1234 =205/56Ω =3.66Ω (Solved R234 & R1 in parallel)
Using Voltage Divider Formula on R5
(1)V5= 6.56V (Voltage when VS1 is shorted)
Shorting Battery VS2

R34 =8/3Ω =2.67Ω (Solved R3 & R4 in parallel)
R234 =41/3Ω =13.67Ω (Solved R34 & R2 in series)
R2345 =287/62Ω =4.62Ω (Solved R234 & R5 in parallel)
Using Voltage Divider Formula on R2345
Therefore, (2)V5=V2345= 2.40V(Voltage when VS2 is shorted)
 Since the flow of voltage is opposite on R5 the resultant voltage(V5) can be obtained by taking the difference of the voltages obtained by shorting the batteries.
Resultant V5 =(1)V5 - (2)V5
Resultant V5 = 6.56 - 2.40
Resultant V5 = 4.16V
x------------------------------------------------------------x--------------------------------------------------------------------x
According to my solution after taking the difference at the end I'm obtaining a value of 4.16V of V5 but according to the given answer it says that the answer is 2.40V. I want to know that if there is something wrong with my solution or the answer provided is wrong?.


texts: Is it okay to run a mercury vapor lamp of lower wattage (100/150/175W) on a 400W MHL/MVL ballast? Also can a 60Hz ballast be used on 50Hz?

texts:
I have this RAB BMHH400PSQ metal halide pulse start ballast 400W, M135/M155 MULTI TAP 120-277V. Since the MVL are being phased out it has become quite difficult to get a ballast for one of these and the prices are like $30- $40 easily, but still okay.
My question is can I use this 400W ballast with the 100/150/175W mercury lamps that I have? Is it like the lamp would draw only the required wattage from the ballast,or is it like the ballast would pump 400 watts into the bulb and go boom?
Also this ballast is for 60Hz. If I were to run it (240V/277V wiring) on a European 230V 50Hz supply will it damage the ballast or lamp?
Update: Picture with specs added.


texts: In Altium Designer how do I navigate to the component editor from the PCB layout screen?

texts: I am teaching myself Altium Designer 2017 coming from EAGLE.  If I want to edit a component in EAGLE I can right click on it in the board view and then click "open footprint".  Is there a similar function in Altium?  I would prefer not to look at the library location in the properties and then navigate to that location manually because I feel like that could become prone to error in larger designs.  Thanks.


texts: Efficiency of charging a lithium ion battery with a lithium ion battery

texts:
Should I need to charge one lithium ion battery with another, what sort of loss would be typical?

If I had a 65wh battery, can I calculate how big a battery I need to charge it taking into account the loss?


texts: Cascade shift registers driven by single-cycle microcontroller

texts:
I'm trying to make a unit in which 4 digits can be updated in a small amount of time from a single-cycle microcontroller (preferably all digits updated within 5uS)

My circuit is setup in the following way, (I excluded 7 segment displays and resistors for simplicity). The shift registers are 74HC595 and the multivibrator on left is the CD4538 but I think I need to upgrade that to 74HC4538 (someone confirm this?)

I have a multivibrator because the shift registers need the register clock toggled to display the new data that is shifted in, so by adding one, I eliminated a need of a 3rd wire from the micro that only updates the value.

The resistor is 10K and the capacitor is 1nF.

If I use a lower speed micro like the AT89S52 that can only update GPIO pins at best of 1/2 a microsecond (with 22Mhz crystal), then this circuit has no problem. But if I start to use the high speed single-cycle microcontroller, then GPIO pins could update as fast as 20nS.

What can I do to improve this circuit without rearranging parts? Should I just upgrade the multivibrator and lower capacitor value?


texts: Why are lead-acid batteries preferable for submarines?

texts:
According to Wikipedia article lead-acid batteries are used for running submarines propulsion engines. Submarines are used by the military and the military can afford very expensive toys. Lead-acid batteries are cheaper, but have much worse energy density than say Li-Ion batteries (here goes a table with characteristics and energy density is a very important factor for a submarine battery - there's so little extra space that even people taller than certain height are not selected to serve on submarines.

What's so good in lead-acid batteries that they are preferable for submarines even with their lower energy density?


texts: Should the pointer datatype be always same as the data type of variable it points in embedded C?

texts:
Im wondering if there is a convention or rule about pointer datatype and the stored variable's data type.
If x is an integer which stored in a uC's memory, should the pointer that points x be an int* type pointer?
Would the compiler give error otherwise?


texts: Is it ok to use an old phone as an universal battery charger?

texts:
We know that a charger is just an adapter that supplies a constant voltage (5 volts usually). The actual charging circuit is in the phone itself. With a bit of soldering and wiring, can I use my old phone as an Universal Li-ion battery charger to charge other phone batteries? Does this have any downsides?

(My old phone uses a 3.7V Li-ion battery and the battery I intend to charge is also a 3.7V Li-ion battery with a different capacity.)


texts: The direction of the bias current of LM311

texts:
I thought the conventional method to denote the direction of the bias current is to precede the IIB parameters with the '+' or '-' flag in the 'electrical characteristic' table, '+' indicate the bias current flows into the terminal, and '-' indicate the bias current flows out the terminal. Just like the Op amp LM358.

But recently i find the datasheet of comparator LM311 is difference. I note it have PNP input stage, but the IIB has no '-' flag.

I want to know:

LM311's input bias current does flow out of the terminal, am i right ?
If i am right, why LM311's datasheet is different from Op amp's ? If it means the 'conventional method' doesn't apply to comparator ?

The schematic from LM311's datasheet:


texts: What is the effect of brown out detection on frequency?

texts:
I want to use ATMega16 microcontroller to strobe a flash for an industrial camera. So timing is important.
I enable BOD (brown out detection).

Does BOD affect frequency or timing?
If yes, is there any way or any micro or any external chip to avoid it?


texts: Role of Inductor in power supply section..?

texts:
I'm interfacing a TFT display with MCU which requires 450mA current & 3.3V.

In power supply section I have used regulator ICs to get 5V & by using two diodes I'm getting 3.3V. For filtering in power supply I have used inductor.

but the display requires a 450 mA current which is not provided. & my display was getting reset because of not enough supply current. It led me to remove inductor & shorting it. now section is working & display is stable. But it will led to noise in power.

One remedy to this scenario I heard ( NOTE - I don't know exactly about it & I'm not sure Whether i'm saying it right. If it's wrong then please correct it)
- we can use winding around an Inductor & then we can use it to provide enough current supply to display.

If any alternate solution is available with this please let me know.

NOTE - I'm not asking about how to regulate supply to 5V or 3.3V. I'm talking about the inductor which is used in filtering of power supply. How it is related to current if it is.


texts: Can you identify these SMD Electrolytic capacitors?

texts:
I'm fairly sure I need to replace the capacitors in this LCD panel from 1993, but I'm not 100% sure I'm reading them correctly.

I'm guessing that the large ones are 47uF 16V, the medium ones are 10uF 25V and those really small ones are 10uF 16V. I'm not sure what the letter and number combinations at the top are, though.


texts: What is this symbol on the ground connection?

texts:
I've come across the following symbol, boxed in red, in a single line diagram for a switchboard. From looking at it, I'm interpreting it as some sort of ground connector, but I want to confirm.

I have tried my best to search for it online but I've had no luck. I have tried the following and combinations of the following: ground connection ground symbols ground bus connection ground link ground disconnect electrical bus connection symbol

What is this symbol?


texts: How do coupling capacitors in transistor not affect biasing?

texts:
I understand the usefulness of the capacitors in an amplifier circuit but i dont understand why we use one at the input? and how does this not affect the biasing if it removes the dc voltage?

Thanks.


texts: Driving stepper motor with H-Bridge, how many Volts?

texts:
I know that stepper motors are usually driven with current-limiting chopper drivers and hence the applied voltage doesn't really matter (or does it?) and that's why specs of stepper motors don't state a max voltage but a max current instead.

However, I'd like to drive a Nema23 with a SparkFun Monster Moto Shield and an Arduino Uno.

This is the info I have about the motor

How do I calculate the DC voltage I can apply to the VMOT of the motor driver shield without frying the motor?


texts: Why is B-H curve preferred to B-B_vac curve?

texts:
Can someone please tell me why we use H in the \$B-H\$ curve?
I initially thought

\$H\$ was the field strength of the field developed in a vacuum when a current is passed through a coil (placed in vacuum), and
\$B\$ is the corresponding field strength in the core (when the coil is wound around something) for the same current,

If that were the case \$H\$ and \$B\$ would've been equal in a vacuum, but that's not the case, then what is the actual definition of \$H\$? (I understand that \$H\$ is current times turns divided by path length, but is there a physical intuitive meaning for it?
)
Here's why I think \$B_{vac}\$-\$B\$ makes sense. In class, we were taught what \$B\$ is, in vacuum(\$B_{vac}\$) and did a bunch of exercises. Then a material was introduced and we added relative permeability to account for its addition. When we got to the hysteresis curve part, the professor got rid of the constant term in \$B_{vac}\$ and used the term \$H\$. Why couldn't we continue with \$B\$? If we did continue with \$B\$, the x-axis would be \$B_{vac}\$ and y-axis remains \$B\$ with relative permeability as the slope. Why is this not preferred to \$B\$-\$H\$ curve?  \$B_{vac}\$ - \$B\$ seems to be intuitive for the comparison with \$B_{core}\$.
On retrospection, the question narrows down to What's the purpose of \$B\$-\$H\$ curve? It's to find the \$B\$ in core for a particular current supplied, correct? If yes, what advantage does \$H\$ hold over using \$B_{vac}\$ in the magnetization curve.


texts: Does 802.3af compliance require support for both Alternative A and Alternative B?

texts:
I am looking to purchase some PoE cameras.  The camera description specifically states that they require power to be delivered on the data pairs (1,2,3,6), which indicates PoE standard 802.3af Alternative A.  (see https://en.wikipedia.org/wiki/Power_over_Ethernet for description of A vs. B)

Shopping for PoE injectors, most of them state "802.3af compliant".  However, very few state whether power is provided on the unused pairs or on the data pairs.

Is it safe to assume that if the device is 802.3af compliant, it will support either Alternative?

Otherwise, how can I be sure an injector will work with these devices unless I specifically ask the mfgr?

For example, this injector specifically states that data are on 1,2,3,6 and power are on 4,5,7,8, so I assume it will NOT work.

But I've found none which state that power is sent on 1,2,3,6, or which can do both.

So should I assume if it's 802.3af compliant, it will "just work"?


texts:
I've got a PIC18F with MSSP that I'm interfacing with a 24AA1025.  I'm using MPLAB 8 and the functions from C18 to make my life easier.  The only problem is that I've (supposedly) written a byte to the 24AA1025, but when I read it back, I get 0xFF instead of the byte I wrote.

Here's how I have the EEPROM wired up:

A0 - GND
A1 - GND
A2 - Vcc
Vss - GND
SDA - pulled up to +5 via 2.2k resistor, and connected to SDA on PIC
SCL - pulled up to +5 via 2.2k resistor, and connected to SCL on PIC
WP - Vss
Vcc - 5V

Here's my write function (now edited with working code):

bool I2CWriteByte( long address, unsigned char data)
{
    unsigned char ret;
    unsigned char control_byte;
    unsigned char high_address_byte;
    unsigned char low_address_byte;

    control_byte = (address >= 65536) ? 0b10101000 : 0b10100000;
    high_address_byte = (char)((address & 0x0000FF00) >> 8);
    low_address_byte = (char)(address & 0x000000FF);

    IdleI2C();

    // perform ack polling around control byte sending every time
    ret = SendControlByte( control_byte);
    if( ret == -1)
        return false;

    ret = WriteI2C( high_address_byte);
    if( ret == -1)
        return false;
    ret = WriteI2C( low_address_byte);
    if( ret == -1)
        return false;
    ret = WriteI2C( data);
    if( ret == -1)
        return false;

    StopI2C();
    return true;
}

Here's my read function (now edited with working code):

bool I2CReadByte( long address, unsigned char* data)
{
    unsigned char ret;
    // to do a read, first do part of a write but don't send the data byte, then send a new control byte with bit 0 set to 1 for read.
    // see 24AA1025 datasheet page 12
    unsigned char control_byte;
    unsigned char high_address_byte;
    unsigned char low_address_byte;

    control_byte = (address >= 65536) ? 0b10101000 : 0b10100000;
    high_address_byte = (char)((address & 0x0000FF00) >> 8);
    low_address_byte = (char)(address & 0x000000FF);

    IdleI2C();
    ret = SendControlByte( control_byte);
    if( ret == -1)
        return false;

    ret = WriteI2C( high_address_byte);
    if( ret == -1)
        return false;
    ret = WriteI2C( low_address_byte);
    if( ret == -1)
        return false;

    control_byte = (address >= 65536) ? 0b10101001 : 0b10100001;
    ret = SendControlByte( control_byte);
    if( ret == -1)
        return false;

    // now return value
    *data = ReadI2C();
    StopI2C();
    return true;
}

EDIT -- The all-important SendControlByte() function, which does the requisite ack polling:

bool SendControlByte( unsigned char control_byte)
{
    bool nack;
    bool ret;

    nack = true;

    while( nack) {
        StartI2C();
        ret = WriteI2C( control_byte);
        if( ret == -1)
            return false;
        if( SSPCON2bits.ACKSTAT == 0)
            nack = false;
    }
}

WriteI2C never returns an error, so I assume that it actually worked...

I used my logic sniffer's I2C protocol analysis tool, and it sure looks like all of the data is being sent/received properly:

Can anyone suggest something to do next for debugging?  The control byte looks correct, as it is 0b1010 after START, followed by the block identifier, A0, A1, and R/!W.  I have tested >64KB addresses and confirmed that B1 is set properly.  My EEPROM has A0 and A1 grounded, so that looks correct as well.  R/!W is low for writes and high just before the read.  The only thing I haven't done yet is added a delay after the write, but I will give that a shot tomorrow.

EDIT -- The I2C analysis option does show what you guys have been saying:


texts: Switching between battery and USB using diode OR logic

texts:
I have a Raspberry Pi that is powered by a USB cable from a Samsung charger. Now since my college has frequent power cuts, I designed a basic switch to automatically switch between a portable mobile battery and the USB power using a diode OR gate.
The circuit has been taken from here and looks like this:

simulate this circuit – Schematic created using CircuitLab

So now, considering this is a very simple way of achieving my purpose, what I'd like to know is which power source is being used up when both are connected. Maybe via some LED indicator or something. The main basis for this circuit is the fact that my input V1 has a higher voltage than that coming from BAT. However, the difference between the two input sources is marginal. For example, my 2.1 A Samsung charger outputs around 5.3 V while my portable battery outputs around 5.1 V. However, this difference seems to be working fine with the circuit given here. But, to be sure, I'd like some indicator to check which input is active currently.


texts: What is the effect on propagation delay when we have a CMOS circuit with multiple transistors connected in series?

texts:
How does the fact that in a series connection of two or more transistors only one is connected directly to gnd (in case of nmos transistors) or vdd (in case of pmos transistors) effect the change of the output?

I am trying to simulate a CMOS OR circuit and need to make the propagation delay of the falling and rising edge equal and am getting different results even though the input signals are not different other than their names. So i guess it has something to do with the fact that one of the input signals is connected to the transistor connected directly to vdd or gnd and the other ones connected in series are not.

Could someone explain why that is?


texts: Stereo volume control in headphone amplifier

texts:
I have a headphone amplifier schematic and I want to make it in stereo. My questions are:

Is there any way to realize the volume control with one potentiometer,
or should I use some kind of dual gang type?
Do I have to use a logarithmic or linear one?
If you have time I'd appreciate a short summary of the operation of the circuit.

Thanks, Tamas

Amplifier:

Power supply:


texts: Mixing two or more AC sources to handle overload

texts:
Can I mix two or more AC sources to handle overload and maintain a stable voltage of 230V AC?

For example if power from solar panel cannot handle a heavy load can I mix power from different source say a battery (after inverting) or main grid.

Bear in mind that the other source should not provide half the power but only complement that the solar panel cannot provide to handle the load.

If it can be done, how?


texts: Powering 5 fans with a LTC 3780 : should I protect it against induction effect?

texts:
I want to power 5 fans in parallel (12V 0.80A, each) using a adjustable power supply (DIY, made with an LTC 3780 connected to a 24V 15A PSU and mini Voltmetre).
I read that a fan could destroy the LTC 3780 because of the induction effect. If I'm not mistaken, when it's ON, the fan store energy in a magnetic field (because of it's winding), which can create a reverse current when we turn it OFF.

So do you confirm that I should protect a circuit from the fans ?
If yes, how can I modify the DIY setup to prevent burning my circuit ? The thread mention adding a Schottky Rectifier (the 1n5819). Is a Schottky diode (supporting the right amount of voltage and current) the best way to protect my circuit ? If yes, can I simply add it on the main wire that will power the 5 fans?

More generally, should I protect any circuit from any motors ? If no, what are the rule to follow ?


texts: SMPS Transformer - Different Current Densities for Primary and Secondary

texts:
I've seen a design sheet of an isolated off-line 5V/2A flyback converter.

In the "Calculating Wire Sizes" step the designer uses 4A/mm2 for primary and 10A/mm2 for secondary.

This seems quite interesting to me. Because I generally use 4.2A/mm2 (or 500 circular mils per Ampere) for both primary and secondary(ies) on my low power (<50W) designs.

Is this normal, or at least applicable? What can be the motivation of using different "J"s for different windings on the same transformer?

PS: IIRC f=70kHz and the number of turns for secondary was 5 or 7. Maybe using a few number of turns allows the designer to select higher J. I don't know.


texts: low-noise-amplifier datasheet lists negative dB for gain?

texts:
I'm looking at the RF3858 datasheet and on page 2 it shows the gain of the integrated LNA. There are two modes.
The high-gain mode has typically 21dB gain.
But the low-gain mode has typically -6dB gain.

Now what's up with the low-gain? Does that mean it's actually making the signal weaker? If that's true, what is the purpose?


texts: How to find the thevenin equivalent in this circuit?

texts:
I'm having troubles with finding the thevenin equivalent in general, particuliary in this circuit:

simulate this circuit – Schematic created using CircuitLab

My question is: how to find the thevenin equivalent considering the load is the one between point A and B?.

Please explain in detail the part of finding Rth. also i would appreciate a method, advice... which would help me to find the Rth in other circuit.

What i have tried:
I calculated the Eth by making the load as an open circuit as shown and calculated the current in each branch then i applied the mesh law (KVL) in one of the meshs containing my load which gave me Eth=0.1486Volt. if it's wrong so how to find Eth.
If possible, tell some hints before giving the answer.

Any help would be appreciated, thanks in advance.


texts: What is a general set of components for a robotics hacker?

texts:
I am playing around with a few projects and looking at a few more online. I've had to make some trips to the local electronics shop for a few basic necessities like LEDs, resistors etc. It got me thinking about what would constitute a good set of basic and cheap components. Things that would be useful for random robotic/electronic projects. I have broken the set up into tools and components. I was hoping you guys can add/edit this and provide online links as well for future budding roboticists and electronic hobbyists. The primary requirement being cheap and versatile.

My List so far,

Tools
Soldering Iron
Multimeter
A PCB Holder stand for help with soldering
Bread board
Solder and Solder remover

Components
Hobby resistor set (6 of each type for example)
Capicitors
LEDs
L293 motor driver chips
555 Timer chips
Potentiometers (Pots)
Transistors <- (What type?)
Voltage Regulators <- (What type?)
Switches <- (What type?)
Relays <- (What type?)
Battery Holder case
Header for power supply wires
DC Motor(s)
Servo Motor(s)
Veroboard(s)
PIC Microcontroller(s)


texts: Does the noise figure of a cable change if the load/source is mismatched?

texts: I know that the noise figure of a transmission line is equal to its attenuation (usually expressed as dB/m or dB/100 ft).  However, what if there is a mismatch between the line's characteristic impedance and the source and/or load?  Do the losses in the lines increase as a result?


texts:
I am working on a PCB Design and I need one USB power supply and data. I have read about CC1/CC2 configurations but I'm not sure that putting 5.1 kOhm resistors on CC1 and CC2 will work fine. I have seen one PCB Design like my design, but the designer uses two usb ports:

Why doesn't he connect USB2_N and USB2_P directly on DP1, DN1, DP2, DN2?
The designer tells to me this:
"sure you can do that, just means that you may need an adapter if you want to attach a USB device because you are also powering the board through the same connector.
You also need a mechanism to detect the device role which means an extra IC to switch between the host and device role."
Thank you so much.


texts: How should I protect from overvoltage ADC?

texts: I have a microcontroller with a built in ADC that I am using to read from an input pin (ATMEGA328P to be specific). I want to allow switching of resolutions on the input for our users (0-5V range, and 0-10V range) which i was planning on doing via a voltage divider. The thing I'm worried about is if the user has our unit in 0-5V mode and plugs in a higher voltage by mistake. I want some sort of overvoltage protection on the output of the voltage divider to protect my ADC. I don't care if this is a crowbar circuit that doesn't reset without removing power, anything that protects the unit will do. I'm open to all suggestions. Thanks!


texts: 12V blade fuse box type of connectors - identification

texts:
I have a following appliance (blade) fuse box:

1) How these four connectors are called? Do they have a name?

2) What is the best way to connect a cable to it without soldering such that the wire is tied down and won't move around?

I can't find any specification for the product with the answers for above. Thank you.


texts: How can I safely charge a 12V deep cycle battery with a wind generator?

texts:
So I'm trying to figure out how to safely power a small 12V deep cycle battery with a home built wind generator. It's a 36VDC motor that outputs around 5V with low wind, and 12V with lots of wind (1A - 3A). I would like it to power a small speaker, mp3 player and arduino, so low power consumption. (measured total = 400 mA)

I've looked into MPPT controllers etc, but those seem to be targeted for large 300W+ systems, and are pretty expensive.

My first idea was the following, see schematic

A buck-boost DC converted doubles the voltage, it goes to a LT1038 voltage regulator, that outputs 14.2 volt to the battery. The battery is specced to charge between 14.1v and 14.7v

Is this safe to do?

Is it dangerous to keep the voltage at charge voltage? Or should it be set at float charge voltage of 13.2V?

If you have other suggestions or schematics I would really appreciate it!

I'm also looking at chips like the BQ24450, but it's a steep learning curve.

Many thanks!!