texts: I2C Communication Between STM32F3 and SSD1306

texts:
I am trying to write data to my 128x32 OLED display. I researched it online and found that it has the SSD1306 controller connected to the display. It uses the I2C protocol and it only has 4 pins (VCC, GND, SDA, SCL). I am using the SMT32F303RET as my main controller and i want to write some data on the display over the I2C connection. I am programming the controller using registers and I am not using any other external libraries other then the "stm32f3xx.h". I wish to stay this way because I am learning a lot more then when I'am using finished libraries.

I am connecting the SDA and SCL pins of the display directly to the SDA and SCL pins of my controller. I am setting the SDA and SCL pins as pull-up trough software.

simulate this circuit – Schematic created using CircuitLab

My main problem is that i can't get the I2C communication working properly. I have reed through all the I2C documentation in the reference maunual for the STM32F303RET and folow the steps carefully. Also I followed the rules and information given in the data sheet for the SSD1306 controller. But I had no luck...

This is the code I wrote for configuring the I2C and writing data trough it:

void i2c_init() {
    //Enable I2C clock
    RCC->APB1ENR |= RCC_APB1ENR_I2C2EN;

    //Pin configuration
    RCC->AHBENR |= RCC_AHBENR_GPIOFEN;

    GPIOF->MODER |= GPIO_MODER_MODER0_1 | GPIO_MODER_MODER1_1;
    GPIOF->MODER &= ~(GPIO_MODER_MODER0_0 | GPIO_MODER_MODER1_0);

    GPIOF->OTYPER |= GPIO_OTYPER_OT_0 | GPIO_OTYPER_OT_1;

    GPIOF->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 | GPIO_OSPEEDER_OSPEEDR1);

    GPIOF->PUPDR |= GPIO_PUPDR_PUPDR0_0 | GPIO_PUPDR_PUPDR1_0;
    GPIOF->PUPDR &= ~(GPIO_PUPDR_PUPDR0_1 | GPIO_PUPDR_PUPDR1_1);

    GPIOF->AFR[0] |= 0x44;

    //Timing configuration
    I2C2->TIMINGR = 0x0000020C;

    //CR2 configuration
    I2C2->CR2 |= I2C_CR2_NACK | (0x3d << 1);

    //CR1 configuration
    I2C2->CR1 |= I2C_CR1_ANFOFF;

    //Peripheral enable
    I2C2->CR1 |= I2C_CR1_PE;
}

void i2c_write() {
    I2C2->CR2 &= ~(I2C_CR2_RD_WRN);
    I2C2->CR2 |= I2C_CR2_START | (1 << 16);

    while(I2C2->CR2 & I2C_CR2_START);

    I2C2->TXDR = (uint8_t)0xA5;

    while(!(I2C2->ISR & I2C_ISR_TXE));

    I2C2->CR2 = I2C_CR2_STOP;

    while (I2C2->CR2 & I2C_CR2_STOP);
}

The main error I am getting is NACK (not acknowledged). I know this because the NACKF and STOPF bits in the ISR register turn on as soon as I enable the START bit in the CR2 register. Also before I change some timing settings I was getting the ARLO (arbitration lost) error.

Thank you in advance!


texts: RS485 half duplex communication problem with K64

texts:
My board has a K64 NXP controller with half duplex RS485 comm., as shown here:

It is installed on a big machine with lots of other electronics/mechanics going on. I have 2 boards on the machine. Each board is getting 24V from a different power supply and using DC/DC (on board) it transfers it to 3.3. On the input 24V I have other 'users' also.
What I am experiencing is that in one of the boards, whenever a different user (on the same 24V main power line) is turned off and on, I'm getting an endless loop of tx enable, shown here:

This goes forever, and obviously, the connection with the K64 is dead, until I power on it. Without turning On/Off this user, there is no problem with the connection.
The green line is the tx enable. The yellow line is the Rs485 transmission (A+).
I did not see any voltage spikes on the 3.3 of the K64 nor on the 24V when the other user is turned on. I'm using a USB to RS485 dongle which is not shielded (ready made product) - so I'm guessing an outside noise is coupled on this cable. When it happens, even the slightest touch on this cable and it starts to show this tx enables, sometimes when I touch it it suddenly stops.

a. Even if it is a noise problem, how come the K64 sends endless TX enable pulses ? I would have thought just a one time scenario, not all the time.

b. Any idea how to solve it? Maybe something with the RS485 termination resistors?
Thanks.


texts:
I have a 12V DC voltage and need to draw around 1A at 1.2V. A quick calculation gives me the following results:

\$P_{dissipated} = (12V-1.2V) \times 1A = 10.8W\$

That's huge!

Can I use multiple regulators like 12 to 9, 9 to 7, 7 to 5, 5 to 3, and 3 to 1.2?

That would give me the following power dissipations in separate regulators: 3W, 2W, 2W, 2W, 1.8W.

Is that ok? And the two voltage stages are higher than the drop out voltage of the regulators.


texts: What are ESD (Electrostatic Discharge) precautions?

texts:
In some device datasheets there is a caution about ESD (Electrostatic Discharge) precautions. These devices are prone to damage because of electrostatic charges made by human body. These charges may be up to 4000 volts and cause damage without being noticed. It is recommended to follow ESD precautions during manipulation of these devices.

I have bought a pair of gloves that the manufacturer claims these gloves will eliminate ESD risk . Is there any other thing that I should care about ( I even thought about putting a wire on my arm and connect it to the ground !). What are standard ESD precautions?


texts: What will increase output volume (dB) on a Piezo Transducer?

texts:
I need to achieve 110dB at 25khz from a Piezo Transducer.  According to the datasheet, the resonant frequency of the Piezo is 25khz and at 10 vrms it will produce 110dB.

I will be using an MSP430G2553 controller's PWM pins to bit-bang it.

Currently, though, I am using an Arduino Mega 2560 to do a 'push-pull'.  I have connected the 2 pins of the transducer to 2 separate PWM pins on the arduino and am using a library that synchronizes the PWM output on the 2 pins so that they are opposite of each other.  This gives full motion to the piezo instead of having it vibrate between 0 - 3.3v, it oscillates between -3.3v->3.3v.  This doubles the voltage and got my output from 50dB up to 80dB.  However, I need to get up to 110dB.

So, the big question again is:  How do I increase the volume up to 110dB ?  (Basically, I need to achieve -5v -> +5v instead of -3.3v -> +3.3v)  How do I get the voltage up without screwing up the 25khz oscillation?  I need a circuit that will accomplish this.

Here's the current wiring:

Resister is 100ohm
Piezo has capacitance of 2500pf
Voltage from Arduino Mega 2560 goes from -3.3v to 0 and 0 to 3.3v on the 2 PWM pins.
These are set to oscillate at 25khz.


texts: Can I log current using a voltage input and V=IR

texts: I have a sensor which produces a current proportional to the variable it is sensing. My data logger only accepts input as a varying voltage, which it then encodes in 8 bits (scaled linearly to volts). Can I somehow use this and a knowledge of the equation V=IR to allow me to  measure the current (and therefore the variable that the current is proportional to) with my datalogger? Or would I need to find a logger that can log current directly?


texts: When building a Tesla coil, is it possible to use the primary and secondary coils of a second transformer in place of the usual coils?

texts: I am trying to build a Tesla coil. I have a neon sign transformer and a couple of microwave oven transformers. I am trying to understand why using the coils of an additional transformer to act as the primary and secondary won't work. I am doubtful though because I haven't seen anyone else trying it. Any Help?


texts: LC circuit powered by MOSFET generates not stable

texts:
Sorry for poor English.
I have a transformer from an old TV and try to generate HV discharge. I've added a capacitor (C1 on the scheme) to get resonant frequency around 17kHz. Used coil 5-6 for feedback for the transistor T1 (IRF3808) and protected the gate with 5k potentiometer RV1.
Sometimes the circuit works, sometimes not. I have tried to switch pins 5 and 6 of the transformer. Moved the tap of RV1 both directions. Checked that the transistor works. Everything looks fine, but the circuit does not work most of the time.
What is wrong with the circuit?


texts: Do the dipole antenna edges have earth potential or is it a closed circuit made of co-axial cable?

texts:
I understand the shape of the dipole antenna, but how is it fed so that the current only flows through one direction during the half cycle?
Even in a normal pole antenna, is there a ground at the edge of the antenna so that there is a potential difference?


texts: Can I use all channels of a multi-channel ADC to sample an input signal?

texts:
I am trying to evaluate an ADC that can be used to digitize a simple analog signal of upto 1MHz frequency. This ADC datasheet mentioned it has 8-input channels that are simultaneously sampled. What does it mean by simultaneously sampled?
Can I use all 8-channels to sample 1 input signal that can have maximum frequency of 1 MHz?


texts:
I want to build a noise generator from a Zener diode. I designed the above circuit. The noisy voltage from the diode is filtered via a high-pass filter and input into a 92x gain non-inverting amplifier. (I replaced the 10k resistor by a 100k to increase the gain). The power sources are from 2 AC-DC adaptors at 11.6V. The op-amp is an LM318P and the diode is a 1N755A

Although I am using a diode with Vz=7.5V, the voltage actually drops by 9V. The current through the 100 ohm resistor is 16mA, well below the max current of the diode. At last I filter the output to limit the band to below the Nyquist frequency of a cheap PC-based oscilloscope and limit its max voltage to protect it. Results are shown below.

My problem is that the output signal exhibits a periodic signal of about 3kHz:

What is wrong? Hints would be very appreciated.


texts:
I am working on project that requires me to detect the position of a pen on a piece of normal paper.

My first thought was to use 4 IR LEDs on a receiving unit set at the top of the page, and to put a camera on the pen to triangulate the position.

However I have come across some problems with this. The first being that I do not know of any sensor that is an "infrared camera" that I could buy commercially. The second problem I have run into is that the pen can be oriented in any direction, and no camera would be able to detect the IR in every direction.

I was wondering if anyone had any solutions to the first 2 problems, or if anyone knew of another technique to detect the position of one object relative to another.


texts: What are common control strategies for dosing pumps?

texts:
Dosing pumps means pumps that dose a specific amount with a high accuracy. In many process control scenarios, level gauges or flow meters are used (with low accuracy, at least in some cases), what other strategies are widely used?
Sources/Examples would be appreciated.

Edit 2012-07-19
My questions are, what measurements are taken (if any), how are the diverse inexactitudes accounted for and where along the drive train do you control the pump (FI-controlled motors vs. just turning off after Volume X is pumped, for example)
I can imagine a lot of ways to do this, but I don't know why one way may be superior to another in a given situation.


texts:
I'm really a fun of Arduino project, it's easy and it has a great community. But i am aware that is has no technological innovation, it is only a wrapper on a (normal?) microchip, if i have understand well.

What there was before arduino? What was the way to do program microchip before if?


texts: high accuracy wireless clock coordination + data transfer

texts:
I'm working on a robotics project that requires what is probably a somewhat strange data exchange requirement. I was hoping someone would have ideas on what technologies would be best to implement it. The problem is as follows:

I have many separate embedded systems (nodes) that need to maintain an extremely accurate, coordinated clock. Absolute accuracy doesn't matter, but they must agree with each other to at least 10us (hopefully better). They also need to send and receive data to/from a central computer. The data requirement is very small. Something like a couple of bytes at around 100Hz. So a total of ~1KB/s per node.

I was thinking I would be able to do this by using the laptop to send clock coordination packets, and a small WiFi microprocessor (like the esp8266) on each node to receive the packets. Lets say every 10ms, the laptop broadcasts a UDP packet. If I configure all the nodes to have the same IP address, they will receive the packet at essentially the same time. The only uncertainty in the clock coordination ping arriving at the nodes at the same time will be the uncertainty in the amount of time it takes for the esp8266 to process the packet. However, I also need the esp8266 to send data back to the laptop. But my understanding is that this is problematic if all the devices have the same IP address...

Other thoughts:

Ideally I would be able do this all directly from the nodes to the laptop (ad-hoc network). If I have to I can use a wireless AP connected to the laptop.
I know there are clock coordination schemes out there that use TCP/IP. I just don't think any of them are good enough to get the kind of clock accuracy I want. I could be wrong about this (ok technically there is something called Wi-Fi TimeSync but it doesn't seem to be commercially available yet).
Although it wouldn't be very elegant, I could live with having 2 esp8266 modules on each embedded system. 1 could share the same IP address with all other nodes and use the UDP packet coordination scheme discussed above. The 2nd would use TCP/IP with a unique address to communicate with the laptop.
There are 433mhz and 900mhz modules like this:
http://wiki.seeed.cc/433Mhz_RF_Link_Kit/
that would be very simple and fast. Just put a clock on the data line of the transmitter and read the clock off the receiver on all nodes. However, I don't think this is legal under FCC regulations:
http://www.edn.com/electronics-blogs/eye-on-iot-/4437311/Using-433-MHz-for-wireless-connectivity-in-the-Internet-of-Things

edit:

Thanks all for the comments. GPS is actually a great solution. I wasn't aware that they had PPS clocks that are so accurate. I think I will use that in addition to the esp8266. @analogsystemsrf, you are correct. This is for an ultrasonic positioning system.


texts: Protection diode selection for wire wounded resistor load

texts:
I need to know how to select the free wheeling protection diode for the circuit? the load is wire wounded resistor of 115 ohm with 3.5 Kilo watt.

Can any one suggest me is protection diode required in this case? and if yes please let me know how to select.


texts:
I have a pure sine wave home ups with a mains 1000VA transformer in it.

Transformer is 6.7/220VAC. How does it charge a 12V battery with 20A?????????

6.7V side is connected in H bridge mosfets.

Transformer Configuration Inside UPS (Ignore C1)

I want to design a charger with high current. Thats why I am asking.

Note: Charging Works even when mains voltage is as low as 100V.


texts: 1-Wire sensor to high temperature about 200 C

texts:
I'm using 1-wire network temperatures in the furnishing and now
I would like to measure the solar thermal collector in the upper end of the temperature of 1-wire sensor attached to the network. But the Dallas DS1820 series runs for 125 C. What to do?


texts: What type of stepper motor should I use in my project and how do I control them?

texts:
I'm building a video camera pan and tilt head. Here's what I'm getting at:

I'll need one motor to control the horizontal rotation of the camera, and one for the vertical. The horizontal motor shouldn't meet much resistance, as I'll be using bearings to carry the weight.

The vertical motor on the other hand, will have to move the camera to a position and hold it there. The camera might be anything up to 5kgs. I'm designing it to obviously be as balanced as possible minimising strain on the motor, but there may still be a fair amount.

I'm using stepper motors because I need to be able to do repeatable movements, as well as extremely slow movements, e.g. move 2 steps, wait 10 seconds, move 2 steps again.

I've been looking at the SparkFun stepper motors, but I've been recommended Farnell and have been completely overwhelmed by choice.

So what kind of stepper motors would you recommend? I'd even been thinking of using two different types of motors, given the different stresses they'll be under. For instance, using this for pan and this for tilt. I'd tried calculating the holding torque from the 125 oz.in figure, but haven't come up with anything meaningful.

And finally, as I'm going to be controlling this from an Arduino, what is the best way to connect up the two stepper motors to the Arduino? The SparkFun stepper motor driver doesn't seem very cost-effective, given I'd be using two of them at $16 each. What would you recommend?

Just to be clear, I don't mean this to be a shopping-list type post. I'm asking whether the motors I mentioned are suitable or not, and if not what kind of things I should be looking for.


texts: Question about sentence in application note: "incremented modulo-256". Request explanation and clarification

texts:
Context: I am reading an application note for a UWB transceiver. In it they are describing the typical message frame format, in accordance with IEEE rules. There is some wording that is confusing me and I am unsure whether I need to implement anything on the host controller, in accordance with this information.

In this application note (pg. 6 of 15)

It says

  The sequence number octet is incremented modulo-256 for every frame sent, as per IEEE rules. The
  source and destination addresses are either 64-bit numbers programmed uniquely into each unit
  (during manufacture) or 16-bit addresses temporarily assigned. The 2-octet FCS is a CRC frame
  check sequence following the IEEE standard, (this can be generated automatically by the DW1000 IC
  and appended to the transmitted message)

In the IEEE standard (802.15.4-2011) (pg. 59)

It states:

  5.2.1.2 Sequence Number field

  The Sequence Number field specifies the sequence identifier for the frame.
      For a beacon frame, the Sequence Number field shall specify a BSN. For a
      data, acknowledgment, or MAC
      command frame, the Sequence Number field shall specify a DSN that is used to
      match an acknowledgment
      frame to the data or MAC command frame.

I understand the principles of modulo arithmetic and I understand (and please correct me if this is wrong) that the sequence number refers to a frame and its order within a greater sequence of frames. However, the wording "increments by modulo-256" has thrown me a little.

Does it mean that it will bit shift a single bit, within an octet, once every time a frame is sent until a pre-defined number of frames have been sent? Do I need to process this to piece the greater sequence together?

Any help is appreciated.


texts: How can someone determine from the surface current distribution the electric field polarization?

texts: How someone can determine by looking at the surface current direction what e-field components to expect? For example only \$E_\theta\$ or only \$E_\phi\$ ?


texts: How to check with a simple multimeter whether an old lead-acid battery and its charger are still working?

texts:
I have an old (ca. 10 years old) 6V lead-acid battery and a mains charger for it and I know the combination worked years ago.

Now I tried to recharge the battery and the charger's LED turns on during charging, but when I use the battery with a LED bicycle light (for dynamo use) the bicycle light doesn't illuminate. Of course the light might be defective, so my question is:

How can I check whether the lead-acid battery and its charger are still working?

I do have a simple digital multimeter and after charging the battery over night it gives me a voltage of 4.5V at the battery (no other load attached,) but at the plugged-in charger I see strangely only 0.15V (no other load attached.)

I have no idea what's going on. Is all of this normal and the bicycle light is the problem?

Update:

The battery is a DiaMec SLA battery. Here a picture of it:

And the brand of the charger is PowerTech:

Update II / Resolution:

Finally, after reading all the great tips and comments, I did get a new battery (exactly same make and model) and the old charger works perfectly with it and the lamp works as well. So indeed, as people told me, it was the battery which was defective.


texts: Tactile switch technologies for soft feel

texts:
I would appreciate help comparing the various tactile switch technologies towards achieving a soft feel, conveying quality to the user, while keeping costs and dev time down. These are to be used on front panels of scientific instruments.

This is what I have done so far:

We have tested Omron type of tactile switches 12x12mm (with and without caps) but the feel and sound are metallic and do not seem appropriate for the front panel of a high-end instrument. They feel and sound "cheap".

Metal domes seem to feel better but are often used with membrane overlays and conductive ink circuits on flex pcbs. Can this switches be used, which offer a nicer softer feel, on a regular PCB instead, placed behind an embossed or non-embossed membrane? No need to order a full customised membrane switch array then but we would buy and solder individual dome switches?

The ones we really liked though were the rubber switches (nice soft feel) but these seem to be manufactured as custom full key array products which require a mold and cost is likely to be high.
Does the technology of rubber switches exist in discrete switches which we could buy individually and place/solder on a PCB, as we do with regular Omron 12x12 switches? Is this a viable way to avoid using molds and rubber injection/casting?

Overall the ideal answer to this question would be a suggestion on how to achieve soft feel and still keep production/prototyping costs and  time low?

Thank you in advance


texts:
I have come across this example problem and can't determine the why behind why this comes out the way it does:

So in figure 3.9 part a) they get 4 volts for \$v_{R2}\$, however the negative voltage is throwing me off for example:

KVL around that first loop should be:

$$-12V + v_{R2} + (-8V) = 0$$

This is clearly wrong but I have no idea why and am seaking an explanation.


texts:
Here is the deal..

I need to transmit data to 8 identical components.
Each component has a clock and an input signal.

MCU only sends data. Components only receive data.
All 8 components are the same and receive the same 366 bit stream format (only with different values)
All components use the same clock.
Data should be transmitted at 25Mhz, Clock should also run at 25Mhz.

This is a job for an FPGA but I'm trying to get away with doing it on a 120Mhz MCU.
What would be the best way to approach this task? I cant send the data in serial (sending the data to each component at once) and I couldn't find an MCU with 8 SPI units.

All help would be appreciated.


texts: Identifying a component in a circuit diagram

texts:
I'm a beginner when it comes to electronic circuits and came across this schematic diagram for a class exercise. It's my first time coming across this certain component (encircled). It does say it's an LM35 temperature sensor, but the LM35 only has 3 pins, while this one apparently has 5. Any idea what it is?

If it'll help, here are some details about the exercise:

Title of exercise is Temperature Modeling
Materials/Components to be used include: a 12v brake lamp with socket, lm35 temp sensor, lf353 op-amp, mc4741 op-amp, tip35c transistor, and some resistors and bourns trimmer
The objective is to record the output voltage per time interval


texts: Can one always drive oscillator inputs with a single-pin oscillator output and bypass the integrated feedback circuitry?

texts:
Very little is written in the MCP2211 datasheet regarding the oscillator input configurations. The microcontrollers I have been using lately allow you to use the self-powered, single output oscillators rather than the integrated amplifier feedback mechanism on-chip.

In general, can one do this sort of thing for all cases when working with an oscillator that is fully integrated with the load capacitances and amplifier/feedback loops?

i.e. rather than doing this:

Can we always do something similar to this?:


texts: Should my external analog input be isolated?

texts:
I want to build a device that samples analog signals from various measurement instruments via their analog outputs. The instruments have their own power supply, and all devices are powered from the mains. I need to measure signals in the range of 0-50Hz with a level of at most 0-10V.

The documentation of the analog outputs mainly talks about the signal voltage levels, but I'm concerned about the common mode. From what I can tell with an oscilloscope, the outputs of two instruments I checked seem to be referred to ground (one line at GND, one above), but even if that is the case, would it be a good idea to simply connect the grounds of all devices?

It seems safest to build the analog input in a way that is fully isolated, but is that really required? I'm not entirely sure how I'd build something like that (switching a capacitor between the input and my ADC perhaps?), so any pointers would be appreciated.


texts: help me solve concurrent assignment error in verilog for the code given below?

texts:
Error is concurrent assignment to a non-net "c" is not permitted.
module ha (sum,carry,x,y);
  input x,y;
  output sum,carry;
  assign sum = x^y;
  assign carry = x&y;
endmodule

module vedic_2bit(a,b,clk,rst,c);
  input clk,rst;
  input [1:0] a,b;
  output reg [3:0] c;
  reg [3:0] t;
  always@(posedge clk)
    if(rst)
      begin
        c <= 0;
      end
    else
      begin
        c[0] <= a[0]&b[0];
        t[0] <= a[1]&b[0];
        t[1] <= a[0]&b[1];
        t[2] <= a[1]&b[1];
      end
  ha H1 (c[1],t[3],t[0],t[1]);
  ha H2 (c[2],c[3],t[2],t[3]);
endmodule


texts: Does a poor mobile network signal cause faster battery drain?

texts:
Quite a simple question actually, does a poor mobile network signal cause faster battery drain?

If so, is there a difference between 2g/3g/4g/5g in the speed at which the battery drains.


texts: Best choice in ARM Cortex series for running RTOS A-,R- or M?

texts:
I am learning about ARM Cortex based systems. I understand that most of the Cortex series can support running an OS. When it comes to real time operating systems implementation on an embedded system, such as porting variant of FreeRTOS on a custom embedded board.
What should be basis of selection of particular ARM Cortex series ?

For running RTOS on ARM Cortex is ARM Cortex-R series the de-facto norm ?

Note: Consider I am going for a hard real time system.


texts:
I'm currently working on a project with multiple IMUs mounted on moving vehicle estimating their pose. I've just read about AHRS algorithms. So I have two questions about them:

Since my data is pre-recorded and I know some fixed axes and movements those IMUs can make, how can those algorithms be improved? There has to be ways, otherwise my project would end just taking an existing AHRS library... :)
What I don't get is, will AHRS algorithm work properly even if I'm driving and accelerating in a car? How can those algorithm estimate where e.g. gravity is applying, whilst being accelerated in multiple directions?

By the way: I'm using BNO055 Developer USB sticks at the moment, which already deliver a G-vector and linear acceleration data. Does anyone know how and how accurate BOSCH calculates them? Not sure if I can trust them, or if I have to take raw acceleration and gyro and come up with my one linear acceleration.


texts: Replace 173 Wh lead acid battery with 20000 mAh power bank

texts:
I have an APC BX1100C 173 Wh UPS that I use for my computer. I also have a 20000 mAh power bank with output voltage of 5 V.

What do I need to do to replace UPS battery with this power bank? Is this power bank capable of replacing the ups battery? UPS load is 50 W.


texts: The difference between technical ground and safety ground?

texts:
1) can someone clarify the differences between safety ground and technical ground?
 Why or why wouldn't we always have both? I'm thinking mostly in a North American context.

2) Are there best practices for rack grounding/bonding? I sometimes see AV equipment racks with large ground lugs bonding each one together and then terminating to a ground bus. I've seen plenty of systems that didn't incorporate this and worked just fine, too. So what's the safest and most technically sound approach moving forward?


texts: Altium: Export/Package Read-Only PCB or Project

texts:
I'm looking to export an altium PCB or full project but would like it to be "read-only" so that whomever I'm sending it to cannot edit it without my knowledge. They're looking to do a more in-depth analysis than just the gerbers/fab/assy files.
Has anyone had experience exporting read-only projects with Altium?


texts:
In the question: Very accurate time measurement, Rocketmagnet show a circuit that is exactly what I need for a cub scout pinewood derby race track timer. I want to be able to dedicate a timer to each event and get accurate times for each event to +/- 100 ns.

I have not designed, built or programmed any real time control circuits / computer systems in 15 years and need a set of suggestions on where to start, what tools I need and preferably a suggestion for an eval board that I can use to start with. I can learn the newer RT programming compilers, debuggers and tools and implement any sensor circuits but need a starting point to pick the correct MCU.

Any help in getting started is appreciated.


texts:
One of the jobs I often have to perform is repairing the infra-red sensing headsets for BattleSports equipment.

Basically the headset consists of a pair of IR detectors and red LEDs for indication. They are worn on the head, and connect to the BattleSports gun via a coiled (Telephone Handset-style) cable.

One end of this cable has a proper RJ-11 (4P4C) connector, the other end is soldered directly into one of the sensor modules on the headset.

The cable used is really not the best cable in the world.

It breaks where it enters the gun, even with a rubber grommet
It breaks where it enters the sensor
It's not designed to be soldered

And on top of all that while doing the repairs I am finding the actual copper of the wire is getting badly corroded and oxidised by being outside all day every day (kids are not gentle with the kit). The wire gets brittle with the oxidization, and breaks are more common as it ages.

So I ask: is there a better kind of cable that is specially designed to resist oxidisation?  I'm not asking for a specific product or anything, just if such a wire exists and what it would be called.  From there I can try and source coiled cable, or as a last resort investigate custom cable producers. I just need to know what metal / alloy etc to look for...

Update:

Thanks to @RussellMcMahon I now have a term to search for, and a concept to look into.  It just so happens that I bought a headset cable to try out to see if it was any good - closer examination shows that it is indeed made from this "Tinsel Cable" that Russell mentions.

And yes, I can attest that it is almost impossible to solder it.

For more detail here's some pictures of the headset end.

This is one of the two sensors:

The wire enters between the casing and the circuit board:

(That's fluff,by the way, not blood :P ). The wire is soldered direct to the circuit board (surface mount pads):

That's my attempt at soldering the tinsel wire there...

The most common break at the headset end is at the point the wire enters into the plastic casing.  There's quite a bit of crimping pressure placed on the wire at that point, and bends there are usually fatal.


texts:
I am trying to control a WS2812 LED with STM32F103. The LED is a digital RGB LED also known as Neopixel. They are controlled by sending 24 bits of color data per LED to the first LED's data pin.

The STM32 is 3.3V and the LED is 5V. To be able to control it I put a transistor in between like this:

This solves the level shifting problem, but causes another one: now the data signal for the LED is inverted. When the STM32 pin is low, LED data is high and vice-versa. I USE Timer PWM and DMA to control the LED. I pass the buffer with color value bits to DMA like that:

HAL_TIM_PWM_Start_DMA(&htim4, TIM_CHANNEL_1, (uint32_t *)&BUF_DMA, ARRAY_LEN);

This produces a nice PWM signal on MC pin. Here is how a bunch of zeros at 800KHz look like:

But the transistor inverts the signal making it useless:

I need to pass the inverted signal from the MC pin somehow. So that the transistor will UN-INVERT it back. Is there a way to invert PWM/pin signal completely? So that MC pin is always HIGH by default, so that LED data line stays LOW?

A few notes:

I use PB5 and PB6 to control two separate lines of WS2812
The PCBs are already printed and all the components are SMD, so hardware workarounds are barely possible.
I already tried to remove the transistor completely and use MC pin to pull 5V line to ground internally in open drain mode, but PB5 is not 5V tolerant. No luck here.


texts: Can someone help me understand output impedance to an ADC?

texts:
I have an IR detection circuit that consists of a phototransistor and a resistor in a voltage divider configuration, like the right circuit here:

In my case, R_L = 1 MOhm since I want low current consumption. I connect V_out to an ADC pin of my ATtiny85 MCU. Now for my question: The ATtiny85 datasheet says that "The ADC is optimized for analog signals with an output impedance of approximately 10 kOhm or less."

The problem is that I don't understand what "output impedance" is when we're talking about an ADC. Does my circuit as above have an output impedance of 10 kOhm or less? And why is it called impedance, I thought that term is only used for AC signals? In my case I just want to read a voltage a few times per second at most to measure the strength of the incoming infrared light.


texts: I want to build a 500 cell shift register using the TI SN74AUP1G79 flip flop.How much current must my power supply put out to drive this many flip flops and how much current must my clock buffer put out to drive all the clocks? I am running the register at 1.54mhz. Thank you.


texts:
I'm currently going over the derivation of the telegrapher's equations shown here, but there's a step that I'm not fully grasping.

I think I can follow some of how you get from eq.3 to eq.5:

If the current through the inductor is a sinusoid given by:
$$i(t) = Isin(\omega t + \theta)$$

Substituting this into eq.3 gives:
$$j\omega L.I(z)$$

Similarly, $$R.i(z,t)$$ becomes $$R.I(z)$$

Putting this together gives the RHS of eqn. 5:
$$-(R+j\omega L).I(z)$$

However, I simply don't understand how going from eq.3 to eq.5 the other term
gets from:

$$\frac{\partial v(z,t)}{\partial z}$$

to:

$$\frac{dV(z)}{dz} $$

If anyone can help explain in more detail what happens during the "Simplify equations 3 and 4 using Cosine phasors." step that would be much appreciated.


texts: Why are my solar cell currents not adding up?

texts:
I'm outside in full sunlight trying out some new solar cells I soldered together. I have a string of cells lined up like this:

My DMM reads 3.14V open circuit and 0.8A short circuit. I take two more strings and connect them like this:

My DMM should read something like 3.14V and 2.4A. Instead, it reads 3.14V and 1.61A.

I thought I may need diodes for each string, so I did this:

Diode: https://www.mouser.com/ProductDetail/Vishay-Semiconductors/BAW76-TAP/?qs=sGAEpiMZZMtoHjESLttvkqndoGbqj5C%2FaqMW7rnfy0M%3D

I expected a voltage drop and sure enough my DMM read 3V and 0.52A. Next, I made this:

I was expecting 3V and ~1.5A. Instead, I got 3V and 0.82A.

I've never experienced parallel solar cells having a current drop like that in my other solar panels. Not only is the current lower after I add a diode, it's even lower when I connect them in parallel. Outside of possible bad workmanship on my part, is anyone aware of a possible cause?

EDIT!!!

Here are pictures of the (HOW-IN-THE-WORLD-IS-HAPPENING) phenomenon. Each string of solar cells are color coded. The cells having this current reduction issue are the bigger ones. Each picture shows short circuit current with my DMM (sorry Kevin White haha). I used a lamp, so yes the current is gonna be tiny, but it suffices.

1st string of malfunctioning cells: 0.51mA

2nd string of malfunctioning cells: 0.36mA

1st and 2nd strings of malfunctioning cells in parallel: Should be 0.51 + 0.36 = ~0.87mA. Instead, it's 0.43mA

And for the sake of a control group, 1st string of normally functioning cells: 0.3mA

2nd string of normally functioning cells: 0.28mA

1st and 2nd string of functioning cells in parallel: Should be around 0.3 + 0.28 = ~0.58mA. It's 0.6mA :)

And finally, to validate my point, 1st and 2nd string of normally functioning cells and 1st string of malfunctioning cells in parallel: Should be 0.6mA + 0.51mA = ~1.1mA. Instead, it's 0.53mA.

It's almost as if the bigger cells are siphoning off current. I tested for shorts. Looked for corrosion and bad construction. Nothing stands out.

WHAT IS GOING ON?!


texts: Calculating peak current using efficiency for switching regulator

texts:
The datasheet shows the formula for calculating Peak inductor current is:

(Input voltage) Vi=3.2; efficiency=85%; OuputPower=12w

I(peak) = (OuputPower/(Vi x efficiency)) => 12w/2.72v => 4.4118A .... (i)

How I thought I would calculate is as follows;

Required Input power = Output Power + Loss power => 12w x 1.15 => 13.8 watts

I(Peak) = (Required Input power)/Vi => 13.8w/3.2v => 4.3125A  ....... (ii)

what's wrong with the equation (ii)? What's being add up in (ii) to make (i)? I am a little confused here. Ignore my ignorance.


texts:
To reduce the loop area and noisepick up, the GND lead of the scope probe is very next to the tip in the below probe:

I don’t have such probes and my scope probe GND leads are much longer alligator clips.

Does the type of probe in the photo have a name or is it homemade? And when is it used?


texts:
I  am trying to generate +/- 7v from EVM DC 1854A, by default this evm can generate +/- 5v, by referring to datasheet of LT8471EFE using some formula we can calculate resistor values for generating different output voltages.

So i concluded that by changing R3 and R5 (got them from evm schematic) to 40k i can generate +/- 7v.

are those values enough or should in change some other components values too ?

Datasheet link of LT8471EFE : https://www.analog.com/media/en/technical-documentation/data-sheets/8471fd.pdf

Data sheet of EVM : https://www.analog.com/media/en/dsp-documentation/evaluation-kit-manuals/DC1854AF.PDF

Formula used is: Vout = Vfb(1+Ra/Rb)

Thanks in Advance


texts: PNP Highside Switch For Capacitive Sensor

texts:
Am wanting to use this Capacitive push button for a project but am having trouble understanding the application circuit.

I understand that it is a PNP Highside switch and that current will flow to the load when the base is connected to ground. However I don’t understand why the pin on the controller is a output and the purpose of R1. I would have thought that the the controller pin should be a input?

Any help with a description on the circuit operation will be great,

Cheers,


texts: Difference between best/worse-case latency

texts:
I am doing performance optimization of an inverse 8x8 Type-II DCT transform code using Xilinx Vivado HLS. I have generated the report but am unsure of the difference between the best-case latency and worst-case latency.

Would anyone be able to explain what best-case and worst-case latency means? I did a Google search but could not come out with a conclusive answer.


texts: Find high current latch or use Darlington array?

texts: Looking for best practices here. I'm building a common-anode LED matrix. I've got a current sink LED driver, and I'm looking for a latch that will provide enough current to drive an array of LEDs. All the latches I can find have very low current ratings. This guy had some success with running high current latches in parallel to provide the current, but it seems sloppy and is definitely expensive. I am leaning towards trying a low current latch with a Darlington array, however I've never used one before and don't know what exactly I'm looking for. Can anyone tell me if that's a good way to go about it, and suggest an 8 bit latch and Darlington array combo? Thanks.


texts: Help with my circuit for PWM of full wave rectified Xmas lights

texts: I want to create a fade up/down circuit for full wave rectified LED Xmas lights that will go from full brightness to nearly but not completely off. Won’t bore you with the working circuit I designed using a buffered digital potentiometer to provide the varying 0 to 5V signal but the problem I seem to be having is that the voltage controlled PWM circuits I’ve tried didn’t work as expected. I’m guessing because the PWM freq. and the 60 Hz mains were not sync’ed or possibly the rectifying circuit in the lights. (haven’t reversed engineered them)  So… I thought first, how can I get sync’ed to the mains, then how to vary the avg. voltage to the lights. Using others design components I came up with this idea. Use a PS2505-1 optocoupler to create a 5V pulse as the AC mains crosses 0 volts. Now I’m sync’ed. Take that pulse signal, pass it thru a RC circuit to create a triangle wave form. Send that wave form into an adjustable comparator (this is where the digital pot replaces VR1) then send that output to a optocoupled triac to switch the lights on and off at varying points (T) of the mains AC wave form. Gonna say I don’t have time but basically just too lazy to dig out the scope and build this circuit. Any takers? Seem to me that in theory it might work. Just a hobbyist tinkering and would welcome all input but KISS. (Keep It Simple for this Stupid)


texts: Achieving 90R impedance for USB Type C on a four layer board

texts:
I have started routing the 90R controlled impedance tracks for the USB. I've got the information from the manufacturer to use a trace width of 0.22mm and trace spacing of 0.125mm to achieve 90R impedance. Could anyone help me with my doubts?

These are the images of PCB layer stack-up followed from ZOT

See the above-attached PCB layout image,

Are all the yellow circled ground vias sufficient for the return current?
Are the tracks far enough to avoid the crosstalk? As I have set the track spacing to 0.125mm as per the manufacturer instructions.

Please let me know if it is good to go. Thanks


texts:
I am experimenting with Op-amp for making a audio amplifier.
I am using this circuit.

I want to know if the values of C424 and C118 are correctly chosen here or do they need to be change? I hear small salt-and-pepper type noise in the audio. I wonder how can that be removed?


texts: Beyond what is recommended by fabricators, how far should traces be from SMD pads?

texts:
Having followed a fabricator's DRC (this case being OSHPark), this distance between an SMD pad and a trace is considered acceptable (see attached images).

However, I wanted to inquire about what the accepted logic is behind the distances between traces and SMD pads, with and beyond manufacturing restrictions? My initial thought jumped to how exactly the SMD components are soldered, but am unsure what considerations to make in practice as I will be hand soldering them.

These examples are of SOT-23 transistor and a 0603 resistor respectively.

Example 1:

Example 2:

I've read through this question, which I think has pertinence.


texts: What is the name and schema of the 5-pin connector

texts:
I have on my ebike this type of connector. Do you know what is the name and schema of it?

Edit1:  The eBike is LeaderFox 2020 Altar. The cable is from TFT 860c display to the Bafang M500 engine.


texts: How above should a through hole transistor sit on the PCB?

texts:
I´m soldering a self-made H bridge with several 547 and 557 TO-92 through hole transistors and I don´t know how high from the PCB should I solder the transistor.

I found a tutorial just telling that they should sit just above the PCB but has no explanation why.


texts: LED brightness stability issues - how to fix?

texts:
I am performing an imaging experiment in which LED stability is critical. I use 2-3 red LEDs to illuminate a surface while imaging that surface. In each LED circuit, I use a constant-voltage laboratory power supply (typically 11 V / 0.05-0.10 A) and a buckpuck LED driver to achieve constant current. The buckpuck's output current is adjustable using a 5k potentiometer between the REF and CTRL pins (higher resistance = higher current output = brighter LED). The circuit diagram is illustrated below.

The LED itself is attached to a heat sink to avoid overheating. Despite this, I am still having issues with LED instability. Does anybody have any suggestions to make the LED brightness more stable?

Here are the specific components I am using:

Power Supply: TENMA 72-7245 Dual Output Power Supply
LED Driver: LuxDrive 1000mA Buckpuck 3021-D-E-1000
LED: Osram LRW5SN Platinum Dragon Red 625nm LED
Potentiometer: Bourns 3590 Precision Potentiometer, 5k 2W 10-turn linear wirewound

Any help is much appreciated! Thank you.

EDIT: Thank you for the feedback so far. Ideally, I would like to avoid large changes to the circuit design if at all possible. Given that, would the following things help reduce high-frequency noise at all?

Grounding. I'm not really sure how to properly ground this circuit, or if it needs it.
Decoupling capacitors. Could a capacitor between Vin +/-, LED +/-, or CTRL/REF reduce high frequency fluctuations?


texts: Does a capacitor return the voltage you give it or the voltage specific to the capacitor?

texts:
I bought a 'Juice jw2d 2.4 farad 24V surge low esr' capacitor. It's a type of capacitor used for car audio sound systems, 12v I assume.

I however need to use it for a 24v sound system.

Does '24V surge low esr' mean it will output 24V if give it 24V from the batteries?


texts: CAN Bus Physical Layer Twisted pair or not

texts:
CAN bus is very common in automotive or vehicular applications. In our case, we are using aerial platforms with have CAN bus links between operator remote and ground control box.

As is very typical of such products, the cables carrying the CAN bus around are neither shielded nor twisted pair. The typical run of cable between devices is something along 20 meters with a few Deutsch automotive connectors along the way. The original products from the manufacturers work flawlessly, as is expected.

However, if we are to change the cabling/connectors configuration some glitches start to appear, although the terminating devices at both ends are identical:

shortening the overall cable length to a total run of 10 meters
going through Entrelec terminals,
then on individual wires for about 2 meters,
then connecting to an Harting industrial connector,
which is finally attached to a 3 meters spring cable,

Every once in a while (say 3-4 times a week of regular usage), communication glitches occurs between the devices. The on-board diagnostics signals an error and just halts everything. It is as though the physical link "is now"/"was originally" just within margins of proper operation and those issues start to appear.

Thus, the question is, how can we diagnose/improve this cabling?

Does using twisted pair/shielded cables runs going to help or harm?
Is there a specific impedance of cables we should be aiming for (like 50Ohm or 75Ohm BNC cables for Network of cable applications)?
Other thoughts on the subject, as we are ill-equipped to diagnose the waveform or the protocol on the line with a few occurrences every week. It also makes it very hard to confirm the validity/improvement of any changes we are introducing?


texts: How to get rectangular angles for point to point wiring on a protoboard

texts:
I'm intending to solder several protoboards in a few weeks when I get all my materials.

I was wondering what is the best way to keep the rectangular angles (so it looks similar to the picture below, see for example the black arrow pointing to the red wire).

I don't need all the angles but some angles to keep the shape a bit tidy would be nice.

Is glueing the wire onto the protoboard acceptable? Soldering will not work, since it will melt the (colored) unsulation. I'm using 22 and/or 24 AWG wire.

Update

I do not want to use an 'ordered' PCB because I will need only one, and there is a low possibility I might need to change something.
Also I'm using the prototype on (music) stages, while functioning it will be steady, but it will be moved/bumped regularly during transport.
The jumper-symbols (straight wires) are only used for convenience for drawing, I will not use jumpers but stranded 22/24AWG wire.


texts: Why collector current is inwards to transistor in an NPN?

texts:
In this page, the following model is given for an NPN BJT.

simulate this circuit – Schematic created using CircuitLab
Also, it is stated that I(e) is outwards from the transistor, I(b) is inwards to the transistor and I(c) is inwards to the transistor as well.
But according to this diagram, isn't I(c) supposed to be outwards from the transistor? How can it be inwards to the transistor? Could you explain this?


texts: Connectors for arcade buttons and connect 12V LED to a 5V tollerant micro

texts:
I did buy a board from this site, which basically allow me to connect buttons, switch and other controls with ease and no need to program anything: http://derekspearedesigns.com/dsd-36-button-controller-avx.html

Now, I did order some buttons and realized that they are made for some sort of connector; I tried to solder wire on the contacts but the wire breaks at the junction, as soon as you move the connection a bit. This is how the buttons looks like:

Is there a connector that slot into these connections; and is solid enough to not come off? I did look at sites that sell arcade accessories, and the only thing they sell is daisy chained wires; which is not what I need, because the board I own, require 2 connections for each button. I could cut and modify the chained wire but I want to see if I can get the correct connectors first.

The second issue is related to how to power the button LED; since they support 12V. I did buy a 12V step up that works fine with the square buttons, which takes the 5V from USB and output 12V for the LED; since the switch connections are separated from the LED connection.

But I also use this type, which has just 3 poles instead of 4; and my concern is that the board seems to be 5V tollerant, so if I add the 12V coming in from the step up device; I may fry the board?


texts:
I'm having trouble figuring out how the longest stage of a pipeline is calculated given the following:

"Your processor has a 3-stage pipeline where the delay is 26ns through the first stage, 40ns through the second stage, and 26ns through the third stage. The propagation delay for latches is 4ns. What is the speedup, over an infinite number of instructions, of the given pipeline over an unpipelined version assuming the logic is the same for both versions?"

Is the pipeline cycle time equal to the longest stage plus two latch propagation delays or just one? I understand that there will be a latch delay before and after entering the longest stage, but I'm not sure whether to count both of the delays or just one when calculating the pipeline cycle time.


texts: FPGA: intentional delays through manual placement/routing

texts:
In my FPGA design, I have some input signals that need to be delayed considerably before they reach the first clocked register. There are delay elements near the pins for exactly that purpose, but their maximal delay is still too low.

So I want to force the signals on a detour through the FPGA in order to achieve the required delay. I realize this is not "by the book", but maybe others have been in the same situation.

Question: Are there some "best practice" rules for this kind of thing?

Provided that the required delay can be achieved "on paper" in both ways, which is to be preferred: signals travelling great distances or signals going through combinatorial logic? What kind of logic is best suited for that purpose (LUT, carry chain,...)?

If you're an experienced designer and can't think of any difference, that too would be useful information.

I'm using an Altera Cyclone V, but the question should be answerable in general.


texts: Problem with displaying characters on LCD

texts:
I tried to interface PIC16f722A with LM016L LCD in proteus. I had wrote the C-code for initializing (LCD) and displaying characters on LCD.
The problems are as follows:

1)When I transfer X number of characters, it just shows (X-1) number of characters, ignoring the last character.

2)LCD shows Numbers and Special characters BUT NOT ALPHABETS.

Here is the screenshot of sending four characters i.e. (1,2,3,4) and it only shows 1 2 3. Here is the screenshot.

#include <stdio.h>
#include <stdbool.h>
#define LCD_DATA PORTB
#define LCD_CTRL PORTA

sbit LCD_EN at PORTA.B0;        // LCD Latch pin (Enable)
sbit LCD_RS at PORTA.B1;       // Command/Data select PIN | Command(RS=0) | DATA(RS=1)
sbit LCD_RW at PORTA.B2;       // READ/WRTIE pin | Read (1) | Write (0)

#define LCD_DATA_DIRECTION TRISB
sbit LCD_EN_Direction at TRISA0_bit;
sbit LCD_RS_Direction at TRISA1_bit;
sbit LCD_RW_Direction at TRISA2_bit;

#define CHECK_High_BIT(var,pos) (((var)>>(pos)) & 1)

// =========================    LCD FUNCTIONS =========================

void lcd_ready(){

             LCD_DATA_DIRECTION=0xff;    // Data ports input
             LCD_RS=0; // Command register
             LCD_RW=1; // Read from LCD
             Delay_ms(1);LCD_EN=0;Delay_ms(1);LCD_EN=1;Delay_ms(1); // Read requires Low-to-High sig
             while(CHECK_High_BIT(LCD_DATA,7));
             LCD_DATA_DIRECTION=0x00;   // Data ports output
}

void lcd_Command_write(char value){

                   LCD_RS=0;LCD_RW=0;
                   LCD_DATA=value;
                   Delay_ms(1);LCD_EN=1;delay_ms(1);LCD_EN=0;Delay_ms(1);
}

void lcd_Data_write(char value){
             LCD_DATA_DIRECTION=0x00;
             LCD_RS=1;LCD_RW=0;
             LCD_DATA=value;
             Delay_ms(1);LCD_EN=1;delay_ms(1);LCD_EN=0;Delay_ms(1);
}

void LCD_POWER(bool flag){

                if(flag){
                        Delay_ms(250);           // Power up delay
                        lcd_ready();             // Is LCD BUSY ? wait here
                        lcd_Command_write(0x38); // LCD 2 Lines, 5x7 characters
                        lcd_ready();
                        lcd_Command_write(0x0E); // Display ON, Cursor ON
                        lcd_ready();
                        lcd_Command_write(0x01);  // Clear LCD
                        lcd_ready();
                        lcd_Command_write(0x06);  // Shift Cursor Right
                        lcd_ready();
                        lcd_Command_write(0x80);  // Cursor at line 1 position 1
                        }
                else{
                        lcd_ready(); // Is LCD BUSY ? wait here
                        LCD_RS=0;      // Select Command Register
                        LCD_RW=0;      // Write operation
                        LCD_DATA=0x10; // Cursor and Display off
                        Delay_us(1);LCD_EN=1;Delay_us(1);LCD_EN=0; // Latch
                        }
 }

void main() {

LCD_DATA_DIRECTION=LCD_EN_Direction=LCD_RS_Direction=LCD_RW_Direction=0x00;

            LCD_POWER(1);
            LCD_ready();
            LCD_DATA_write('1');
            LCD_ready();
            LCD_DATA_write('2');
            LCD_ready();
            LCD_DATA_write('3');
            LCD_ready();
            LCD_DATA_write('4');

}

Here is the C Code

NOTE: I am not using delay b/w transfering characters, instead i use D7 pin of LCD to monitor whether the LCD is busy or not.


texts: I'm trying to use a microcontroller to control a lightbulb. I would like to execute a command if the switch is flicked three times sequentially. What would be the best way to sense for this, since the microcontroller would be reset if the switch went off? (sorry, not much of an electronics person)


texts: CAN bus test via loopback - possible or not?

texts:
I want to test the integrity of the CAN bus (also my CAN transceiver) periodically using the following method (independent of the other nodes).

Assume two nodes always exist (node A and node B). When node A transmits a message on the bus, node B will receive the message. But can/will node A also receive the message so that I can confirm that the data has gone to the bus and has been received back uncorrupted?

I'm in confusion as to whether the transmitter can be used to receive the same message it transmits, so that the health check of the bus can be independent of the other nodes. Though the message that will be sent on the bus will be received by the other nodes, it doesn't matter, I'll discard such messages in software / acceptance filter, etc. in the receiving nodes.

Whether this method can be used in addition to all the error mechanisms, CRC, etc. provided in the CAN specification itself or are there any other methods for checking the integrity of the CAN bus via software (like internal loopback, echo test, etc.). I'm using the RM57 microcontroller BTW (if it helps).

Thanks


texts:
I have a USB dongle which converts TTL UART signal from a microcontroller to USB level signal using level converter. I has six pins Vcc, GND, RTS, CTS, TXD, RXD. My microcontroller has two pins for UART which are RX and TX. my microcontroller is Atmega16L and the USB dongle is RN-SRL-PRO3V-DGL from Roving Networks.

I need to know how to connect micro to USB dongle. Is it RXD connected to RX and TXD connected to TX. or is it the other way around (RXD to TX and TXD to RX).

Any help is much appreciated. Thanks


texts:
I am working on a project at school where we need sonar input to control a little vehicle.  Pretty simple stuff, usually.  However, we're having a bear of a time getting the sonar to work.  My faculty adviser has helped us get a little closer to the goal but we're still up a creek and running out of time.  The module is a Prowave SRM400.  We wired it up to an Arduino with a transistor which will pull the MCU pin low for 500 microseconds (verified on o-scope) and we have also been able to verify that the out-pulse does get sent to the transducer.  For a while we were getting some weird sawtooth looking data back with a curved front edge and a straight dropoff on the "right" side of the scope.  The adviser then started to play with the potentiometers on the board and now it seems to not work at all.  The datasheets are not super helpful about what the output is supposed to look like or how to interpret the output into useful data.  There is one waveform supplied on the data sheet which is perfect digital square waves, and we definitely never saw anything like that.  Does anyone have experience with this particular board?  It's not a new device, I think it came out in 2003 or something, but I'm not able to find any help on it so far.  How am I supposed to interpret the output coming from this board?

I might also mention this does not count as "helping a student do his homework."  The class is about project management and the actual project is not so important... except ours is supposed to be used by grad students next year so it really needs to actually work.

SRM400 datasheet (note: the PDF has timing information on the waveform section, the HTML does not) http://www.prowave.com.tw/english/products/sr/srm400.htm
The chip on the SRM400 is a PW0268, found here: http://www.prowave.com.tw/english/products/sr/sric/sric.htm
What we saw point "A" coming from the MCU and point "C" between the control module and the transducer match the data sheet.  This is the scope of the output to the MCU.


texts: What should the transfer function be for this RCL circuit?

texts:
What should the transfer function be for the RCL circuit?

When I derive the TF (using complex impedance method) for Output voltage/Input voltage I get the following:
$$\dfrac{Eo(s)}{Ei(s)}=\dfrac{1}{s^2CL+sRC+1} $$ (1)
When I derive the TF (using Laplace transform) for Charge/Input voltage I get the following:
$$\dfrac{Q(s)}{E(s)}=\dfrac{1}{Ls^2+Rs+(1/C)} $$ (2)
Update: I have realised my error. My question revolved around the fact that I didn't recognise that equations (1) and (2) were the same, except for the denominator being divided through by C.
This question is no longer relevant and I would like to delete it! But, I'm not able to!!


texts: Understanding piezo buzzers and their specification

texts:
I am using the following piezo buzzer:

As far as I understand, a piezo buzzer is a capacitive load. So the current loading this capacitance should be limited in order not to burn the driver (in my case an MCU).
What is then capacitance and what is max rated current?
At 15nF capacitance a resistor of about 100 ohm will be needed in order to limit the current @Vdd=3.3V and max pin current 40mA. However, if max rated current is only 2mA, I basically do not need any serial resistance in order to limit the current. How to use these data?

My second question is, what is Tone nature?
I do not believe there is a buzzer which generates a discontinuous tone when driven with continuous signal.


texts: What is the current limit on each phase of a 160 kVA three-phase UPS?

texts:
I'm a physicist by training, so I think I understand voltage, current, phase and power. However, I lack the knowledge to translate between this and the published ratings on three-phase electrical equipment.

If a three-phase UPS is rated at 160 kVA, does this mean that each phase can deliver 160/3 = 53.3 kVA? Or is there a factor of \$\sqrt{3}\$ involved?


texts: Best way to calibrate ADC for current sense MOSFET

texts:
I'm using the infinion BTS6143 as a current switch and current measurement device in combination with an STM32 controller.

The BTS6143 is an integrated MOSFET with internal charge pump and \$I_{sense}\$ output.

The ADC  value proportional to the load current \$ I_L\$ is calculated by:

$$Value_{ADC} = \frac{680 \Omega * I_L}{3,3V*k_{ILIS}} * 4095$$

My problem is that the \$k_{ILIS}\$ is higly dependent on the load current as shown in the data sheet:

Especially for very small currents under 1A.

My "solution" to the problem was to calibrate the device with 5A which I measured quite precisely with a fluke multimeter. With this the µC now knows what 5A are.

With the 1 calibration point and the ADC starting at zero I get 2 points

\$P_1 (0|0), P2(5|ADC(5A)) \$

and can calculate a slope for a straight line:
$$f(x) = \frac{ADC(5A)}{5A} * x$$

I measured a few devices after using this method and this gave me an error of about 5% at currents from 6...10A, but on some devices I got errors of 50% for currents around 1A.

So I introduced another calibrationpoint at 1A, which brought me down to 3% error at 1A. I used this point only to tell the device what 1A is. Not to modify my straight line, which I still calculate from the 5A point.

With the error at 1A down I checked what the next critical point is which was at 2A (10-15%), so I tried (ADC(1A)+ADC(3A))/2 which roughly halfed the error at 2A.

Now everything is below 10% of error from the ideal value for the current and I could live with that, but is there a better way, or things to improve? I can only take 2 calibration points, due to some restrictions and I can't calculate a line from the ADC value at 1A and 5A, because the point at 1A ruins the line for larger currents.


texts: How to implement a DC/DC converter module into circuit

texts:
I'm building a small regulator for a project I'm working on, and I happen to need 12VDC for the main application, as well as a 5VDC rail for powering a Raspberry Pi 3 and some shift registers. Since the 5 VDC rail is going to consume around 3-4 A I thought burning of the unnecessary voltage with a linear regulator was a bit too excessive, and since space is at a premium, I decided to go with a commercially available DC/DC converter.

The converter I chose is the following from Delta

The datasheet isn't the worlds greatest, but so far I've been able to deduce the following:

I need a resistor for the trim option to select the appropirate output voltage
A Low ESR output capacitor is needed to smooth out the ripple
The Output Enable can apparently be left floating if not needed

However, what I can't really get my head around is if I need some sort of input capacitors as well (they've spec'ed the suggested minimum input capacitor as OSCON 16V/270µF (ESR 18 mΩ max.)), the datasheet has some mention of a 100nF ceramic and a 10uF tantalum capacitors, but I can't tell if it's only for some measurement setup?

Also, the capacitor they've spec'ed (OSCON 6.3V/680µF (ESR 13 mΩ max.)) seems to be rarer than hens teeth, so I'm thinking of substituting it with this capacitor.

Am I missing something else?

The whole board will be fed from a Meanwell 12VDC PSU.


texts:
I'm trying to annotate a Schematic project in Altium, my aim is to get, for example, in the 1st sheet : C101. C102 R101 and so on , in the 2nd something like : C201  C202 L201.

I've been trying in vain to do that.So I've decide annotate each sheet alone(Not the whole project), but this turns out to be tricky. Here's what I get :

So as you can the proposed names are  the same as the current ones !

any idea how to solve this ?


texts: Safe to add large external batteries to APC SMT2200RM2u?

texts:
I recently got a very good deal on a refurb APC SMT2200RM2U battery backup. The unit seems to be in perfect working order, however the seller either gave me really cheap or old batteries.

The batteries go from a 100% to 70% charge in less than a minute. From there, it drops slower, but still very fast. At a 20% UPS load, I get about 20 minutes of runtime. I have done a runtime calibration.

What I am strongly considering is getting four 35Ah 12V SLA batteries, wiring them in series externally and connecting it to the APC unit. I'm specifically looking at these: https://www.amazon.com/35AH-Sealed-Battery-LEISURE-Wheelchair/dp/B00A82FCEE

Is there any reason to worry about this configuration? Is it going to overload the APC's charging circuit? Overheat it? Anything else that I would need to consider?

Four of these batteries would provide 3.5 times the capacity that come with the original battery packs when you buy this unit new.


texts: Need output voltages of 0V or 5V based on analog range

texts:
I need to produce an output voltage of 0 volt for inputs < 2.24V or 5 volt for inputs above > 2.70 V.

(For instance, 1.50 V input should produce 0 V output, while 3.75 V input should produce 5 V output.)

Is there any device or electronic component that can do this?


texts: In programming a specific microcontroller board, for example the pyboard, it is necessary to access certain libraries or classes beyond the standard functions for the pyboard. Before programming the board's accelerometer chip it is necessary to include the statement "from pyb import Accel". My question is related to where Accel is obtained from. Is it included in the driver pybcdc.inf located in the pyboard's flash drive and installed on my laptop computer?


texts:
I am trying to build an equivalent circuit for a 3-ph+N cable. Could you help me to identify the parameters. In the picture, you can find the primitive impedance matric for the cable and the proposed equivalent circuit.
I got the shown imperative impedance matrix from a reference and the idea is to build an equivalent circuit for a cable that has the same parameters as in the matrix. I have trouble extracting the parameters of the equivalent from the shown matrix. Take into consideration this model for a 4-wire 50 Hz cable.
Many many thanks in advance


texts: MCP23S17 not outputing the desired output

texts:
I have a MCP23S17 GPIO expansion connected to my raspberry pi. I am using it to switch mosfets that controls multiple LEDs

I am using this RPIMCP23S17 python library upon trying its example code that supposedly toggles ON and OFF all the channels of the MCP, I am not getting anything from the LEDs,

So i began looking for the cause problem, I tried replacing the chip thinking it may be a bad one but still the same result. My circuit is below BCM 6 and BCM 8 (CE0) share the same connection because of the board i have,

I tried tinkering with the code a little bit and use some third party software that looks at the state of the GPIO pins.

from RPiMCP23S17.MCP23S17 import MCP23S17
import time

import spidev
spi = spidev.SpiDev()
spi.open(0,0)
spi.max_speed_hz = 100000   #have to slow down the SPI bus so that i can look at the states in piscope

mcp1 = MCP23S17(bus=0x00, pin_cs=0x00, device_id=0x00)
mcp1.open()

for x in range(0, 16):
    mcp1.setDirection(x, mcp1.DIR_OUTPUT)

while(True):
    print ("Toggling all Pins ON")
    for x in range(0, 16):
        mcp1.digitalWrite(x, MCP23S17.LEVEL_HIGH)
    time.sleep(1)

This code do yeild some results but definitely not the desired one it turns on 4 out of 14 leds but for a very very short amount of time, it does not stay. Atleast this somewhat confirms that the chip is recieving the signal

but when i look into piscope it would seem that MISO pin is not recieving(or output??) anything

Any ideas?


texts: Effect of a transistor on a voltage divider? (or vice versa)

texts:
I'm learning about transistors and am trying to make a basic circuit that uses a photoresistor as a sensor to turn an LED on and off depending on light conditions (the 150kOhm resistor is where the photoresistor will be). I'm still trying to learn how to choose the appropriate resistor values, but messing around in Multisim I noticed that the voltage divider in the circuit below does not behave as I expected.

Here's the circuit with the top resistor in the voltage divider being 1kOhm:

According to Multisim, the voltage across each of the resistors is about the same, when almost the entire supply voltage should be across the bottom resistor since it's much larger than the top.

Here's the circuit with the 1k resistor changed to a 10k:

If I take the transistor out of the circuit, then the voltage divider behaves as it should.

Why isn't the voltage divider working properly when the transistor is attached to it?


texts: OPAMP - Current sense - unexpected behavior

texts:
I want to trigger an interrupt on an ATMEGA328P, when the current of a load is below a certain value.

Therefore I designed the following differential amp circuit using an LM358

Below picture shows the LTSpice circuit.

With the following parameters for the LM358.

The LTSpice simulation shows the following voltage at the output voltage vs. load current:

After the simulation, I build this circuit. The potentiometer is used to adjust the gain slightly

But after building it up, I cannot get it working.
From 0 to 100mA Rload the output of the OPAMP remains at 3.8V (5V VCC - VRailOffset). Even with RLoad disconnected the output voltage remains at 3.8V.
The voltage measured at the 10Ohm current sense resistor is correct.

The adjustment potentiometer has no effect at all to the output state.
I tried different resistor values already (1k/22k and 100k/2Meg).

What am I missing here?


texts: Looking for a suitable transistor for a simple circuit - 50 y/o Junghans clock repair

texts:
Trying to find if there is a suitable commonly available replacement transistor for a small circuit card on a Junghans W.707 clock movement (about 50 years old.)
Here's a picture of the whole thing http://www.hwynen.de/jgh-atomat.html (top right hand corner) and circuit cards shown below.
Very simply, 2 coils, a capacitor and a transistor.
I then believe I've found a schematic of the card - http://www.bmumford.com/tmp/ATOschematic.gif however the actual circuit I have differs slightly from this layout but still only the 4 parts (2 coils, capacitor, transistor).
I have a similar clock with the same shape circuit card that I have swapped into the non-working unit and it works fine. The two interwoven coils, sense and drive, work with the oscillating spring balance that has two plates (above and below) with two small permanent magnets.
I'm pretty sure the coils are OK (measured for continuity) and I have even swapped the capacitor over and that is not the problem, which leaves the transistor.  There are no markings on it to say what it is.
It is 8mm round by 7mm high; internal parts embeded in light green epoxy with 3 gold legs protruding and a small tag adjacent to one leg.
The working card, which has slightly different circuitry layout again - but still drives the movement, has a tall thin transistor (4.6 x 10mm) that has '13X' and a small red dot on it.
The whole thing runs off a 1.5V C size battery.
Does anyone know of a suitable transistor that would perform the job? If the original is available, where could I get it in Australia?
I did find a DIY guitar pedal site that seems to have AC125 gemaniums but 4 different sorts - but I don't know which of them would be suitable.
(DIY Guitar Pedals has some germanium transistors for sale, but I'm not sure which would be suitable.)
Replacement does not necessarily have to be the AC125 germanium. I'm only basing that on the schematic I found.  I just want something to perform the job and I don't have enough knowledge to figure out what's suitable.
If it would help I can photograph my actual circuit (both sides) and draw the schematic but not sure what the internals of the transistor would be.

Schematic from above link:


texts: Understanding processor instruction pipeline problem solution

texts:
I need help in understanding the solution from solution manual.
The question is from the exercise 4.13.5 of chapter 4 in the book Computer Organization and Design by Patterson and Hannessey (4th edition).
The question is about instruction pipelining.

The question

Consider two instruction sequences:

Add NOP instructions to this code to eliminate hazards if there is ALU-ALU forwarding only (no forwarding from the MEM to the EX stage).

The solution from solution manual

With ALU-ALU-only forwarding, an ALU instruction can forward to the next instruction, but not to the second-next instruction (because that would be forwarding from MEM to EX). A load cannot forward at all, because it determines the data value in MEM stage, when it is too late for ALU-ALU forwarding. We have:

Doubts

The question asks to add NOPs. But I dont see single NOP in the solution given.
In the solution it says "A load cannot forward at all, because it determines the data value in MEM stage, when it is too late for ALU-ALU forwarding.". Then how there can be "ALU-ALU forwarding of R4 from I2" in isntruction sequence 1?
I dont get the meaning of the question itself. Does it mean to replace ALU-ALU forwarding with NOPs and keep MA-EX forwarding untouched?
This link
gives solution to 2nd instruction sequence as follows:

while this chegg link
gives its solution as follows:

Whats true?

(There are other resources giving other instruction sequences, like ppts and pdf from different university courses, but none of them give satisfactory logical solution. I did not give them here to avoid further confusion.)


texts: Driving a wire from a 1-bit reg from one bit of 8-bit reg (verilog)

texts:
I have wasted far too much time on this.

So here goes. Started off coding up a basic SPI slave device, to work with a Raspberry Pi as SPI master. Using a Xilinx XC6SLX16 as the slave. Using a logic analyzer in parallel with the FPGA and the RPi. Garbage read back to the RPi. So I have whittled the code down to simply triggering on the SPI clock positive edge, incrementing a 3-bit counter to then write out the counter bits on three general purpose I/O lines for the logic analyzer to display. I have reduced the RPi SPI clock to 25khz (SPI divider of 10,000).

    module laser1(
    input sclk,
         output miso,
         output [2:0] out
);
reg miso_r;
reg [2:0] count;
reg [7:0] data1;

initial begin
   data1 = 8'b11000101;
        count = 3'b000;
end

assign miso = miso_r;
assign out = count;

always @(posedge sclk) begin
   case (count)
           0: miso_r <= data1[0];
                1: miso_r <= data1[1];
                2: miso_r <= data1[2];
                3: miso_r <= data1[3];
                4: miso_r <= data1[4];
                5: miso_r <= data1[5];
                6: miso_r <= data1[6];
                7: miso_r <= data1[7];
        endcase
        count <= count + 1'b1;
        if (count == 3'b111)
           count <= 3'b000;
end
endmodule

I have ended up using a case statement but it still acts idiotic. I used to have:

miso_r <= data1[count];

On the logic analyzer, the 3 bits of 'count' are channels 4,5,6:

With each triggering from the SPI clock, we see 'count' take on these values:

0,1,2,3,5,6,7,0,1,3,5,6,7,0,1,3

If I change the index into data1 to be a constant, 'count' increments normally. The very act of using it as a bit-select totally wrecks its value.

This is beyond weird. Any insights are appreciated...

This is the contents of the constraints file, showing the label for each pin out of the package file:

NET miso LOC="F9"; // IO_L40P_0
NET sclk LOC="A9"; // IO_L34N_GCLK18_0
NET out<2> LOC="F7"; // IO_L5P_0
NET out<1> LOC="D6"; // IO_L7P_0
NET out<0> LOC="P9"; // IO_L14N_D12_2


texts: Why radio exhibits better sensitivity with a wider deviation when Rx bandwidth remains constant

texts:
I used an RF generator transmitting FSK packets with a datarate of 50 kbps. The deviation was 12.5 kHz. With this combination of datarate and deviation the modulation index is 0.5. I found that my device undertest had an Rx sensitivity of ~102 dB. The IF BW is approximately 100 kHz.

I left DUT settings untouched. I changed the deviation of the signal sent by the generator from 12.5 kHz to 25 kHz. Datarate remained 50 kbps. This equals to modulation index = 1.

I found out that the sensitivity was a few dB's better. Someone told me that it is because the symbols are further apart from each other in the freq plane, and thus it is easier for the radio to demodulate it. My question is, why the wider deviation is easier for the radio?

The radio uses low IF receiver. RF is fed to an I/Q- down conversion mixer. The I/Q signals are sampled by IF ADC.


texts:
I have the task:

Buildings resonance between 0.8Hz... 1Hz. These frequencies can break glass and must be avoided, so engineers need to know the exact resonance frequency.

How many FFT points are necessary for the sampling frequency 5.4Hz in order to achieve a frequency resolution of 0.001 Hz. Also determine the observation time.

Does anyone know how to start?

FFT requires N=2^k operations

The solution is 8192 points and 1517 seconds observation time.

k=13 could be derived from the solution, but that didn't really help.


texts: Over Curent protection for multiple consumers

texts:
While designing a light fixture I came across an issue.
The fixture is powered by a single ACDC unit that generates 24V.
The fixture has around 50 LED elements that are connected to the power source.
If a single LED element has a short circuit then the over current protection on the PSU kicks-in and power is cut off to all the other LEDs making it very hard to locate the faulty LED and replace it.

What would be the best (and cheapest) way to add another short circuit protection per LED element that will kick in before the PSU shuts down so only the faulty LED will get disconnected from the power bus? I thought of adding a PTC but I'm afraid it will take time for it to kick-in as it is temperature based and it will 'loose the race'.

I don't want to change the PSU and it is impossible (and unsafe) to switch off the over current protection. Most quality PSUs comes with this feature built in.
I can't change the LED driver and LED (G4 LED)
For mechanical reasons I can't change the topology of the connections.


texts:
My computer lab just got a power upgrade, now we have 208V/30A with L6-30 receptacles, in addition to what we previously had.
I have some leftover rack mounted power distribution units (PDUs) given to me by a partner lab, which have L5-20 plugs (rated for 125V/20A)
Is it possible for me to have my L5-20 devices work off of L6-30 receptacles? I found splitters online that allow me to go from L6-30P to (2)L6-20R, which will fit the L5-20 plugs but I will still be plugging a 125V rated device into 208V socket. Or should I just abandon the L5-20 devices and purchase new L6-30 PDUs? Or should we go back through and change the receptacles to L5-20?
Thank you for your help


texts: Control theory: is there any actual application for D in ABCD matrix?

texts:
Recall that a LTI state space of a dynamical system is given as:

Is there any actual purpose for D in the output equation?

If D was not zero, it would mean that the output is "directly" dependent upon the input. Does anyone know any system that behave or designed in such a way?


texts: How should we account for the length of series termination resistors for length matching?

texts:
In some cases, we need to length match several different nets between two ICs, based on the specifications of the driving or receiving IC. Sometimes, some of these nets have a series termination resistor. Is there a rule/guideline that helps to account for the series resistor, when determining the length of the routed net?

To help describe with a "picture":

                       10mm
netA:   SrcVia---------------------------RcvVia

                 4mm                      6mm
netB:   SrcVia---------Via [R33] Via-------------RcvVia

I want to length match netA and netB. NetA is 10mm. Should netB considered 10mm, or should it account for the physical package of the resistor (0201, 0402, 0603, etc) ?

Also, notice that, the signal in netB also has 2 additional vias on the path in order to go to the top or bottom layer, to place the resistor. Those 2 vias should also contribute to the effective "length", I think.


texts:
I'm trying to build these 2 pedals:

http://byocelectronics.com/lilgrayodschematic.pdf
http://byocelectronics.com/lilcompschematic.pdf

both circuits have these parts separated from the "main" circuit.
When I find symbols such as "+9v", "Vr", "VrefA", "V+" and the likes, does it mean I have to connect the component from the "main" circuit to these kind of "outs" that are pointing upwards on those separated parts? Like this?

What am I missing here?


texts: Operational amplifier as comparator - maximum input voltage

texts:
Regarding the attached schematic and the IC2B op amp, what is the maximum input voltage allowed at the IN+ and IN- of IC2B ?

I read in the LM324 datasheet, that the differential input voltage is specified = +-32V. Also, in the same datasheet, in mentioned another parameter the Common-mode input voltage range which is equal to V+ - 1.5V.

I know that IC2B works as an comparator, when IN+ is higher than IN-, then the output will the Vcc, and when the IN- is higher than IN+, then the output will be 0V.
Will the op amp IC2B work safely in this configuration ?


texts: FETs transfer characteristics in 4 quadrants

texts:
Recently I was given a following problem on the test:

  Usually, transfer characteristic (Id(Vgs)@Vds) of JFET and MOSFET is plotted in the 2 quadrants. Plot it in all 4.

After the test we were not given any explanation of the problem and it wasn't in the course either.

I'm still wondering, how would it look?


texts:
The power extension has two USB slots. I noticed that when a Xiaomi phone is plugged first, and then iPhone next, the iPhone doesn't charge. However, if it's done in reverse, iPhone first, Xiaomi second, the iPhone charges and so is the Xiaomi phone.

Why plugging in a particular sequence makes a difference whether the other phone will charge or not?

I also tried to swap the plugging of phone on the USB slots, same thing happens.


texts: How cheap could a .NETMF board be w/Ethernet

texts:
I'm getting started with .NETMF and was wondering, what is the cheapest .NETMF board could be developed for, assuming it only has an ethernet jack and lwIP stack for TCP & UDP support? The code running on the board would be pretty small, just serving a small static website over tcp.

Is it possible to make it under $5? $10?


texts: I have recently started tinkering with technology to see how things work. I am building a small box with a phone charger, flashlight and solar panel however I wanted to add a laser pen. After taking it apart enough, I can't understand how it gets power from the 2 batteries in it, here is the pen, where would I connect the red and black wires to power it from my battery?


texts: How is the flushing really implemented? I have an idea that on conditional branches, the prior instructions are flushed. But how are they actually flushed?


texts: overshoot and undershoot on 3 volt pulse

texts:
i am interfacing a system, this system output signal of 200ns digital pulse with repetition time of every 3ms. Ideal voltage of signal would be 0v to 3.3V but signal coming from system have high overshoot and undershoot value (value upto +5 to -2V). and i want to interface this signal with Xilinx 7 series FPGA(artix) with bank voltage of 3.3V. Attach is signal shape i get from system.

So first question is If i don't put any protection circuit would my IO pin of FPGA will burnout or what will happen. as maximum voltage limit as per 7 series FPA for 3.3V bank is -0.5 to 3.8V.
Second question is what will be good protection circuit for this overshoot and undershoot protection.
is there any recommended OPAMP IC which will handle 200ns pulse easily

I need circuit which will handle 200ns pulse easily.


texts: What is the equation for a potentiometer with dual power supply?

texts:
simulate this circuit – Schematic created using CircuitLab

Suppose we setup a potentiometer with two power supplies +10V and -10V as shown above. A digital voltmeter is setup to measure the voltage.

If the potentiometer is turned all the way up, a digital voltmeter would read +10V, if the potentiometer is setup all the way down, the digital voltmeter would read -10V.

My question is

When writing the equation for calculating the voltage across the voltmeter, how can we include the +10V and as well as -10V in our potential divider equation and calculate the voltage at the voltmeter?


texts: Trying to get my head around RTSP and failing miserably

texts:
I am trying to write a system which stores 1024 bytes of data in the program space (PSV) - arranged in 128 blocks of 8 bytes.

I have pored through the data sheet, the flash programming manual, the "Data EEPROM Emulation" application note and source code, but I still just don't understand the workings of it.

So, my questions that I could really do with being answered are:

1) How do you reliably allocate the memory within the PSV space so that it uses one entire table page so that erasing only affects that allocated data?

At the moment I have:

unsigned char __attribute__((space(psv),aligned(1024))) nvram[128][8];

From what I can see that is then giving me a variable address of 0x00C400, a table page of 0x000000, and a table offset of 0x004400. When I erase the table page using these values, as per the example code, it nicely corrupts my code.

2) How do the values relate to each other?

From reading the data sheets etc I understood that the table page should be the page number - being a multiple of 512 rows of 64 program words. That to my mind is 1024 bytes of low-order storage. So how is the table page from above 0? Surely it would be 0x000031 (0x32 * 1024 = 0x00C400) or something similar?

Further, I understood that the table offset is the number of bytes from the start of the table to the address of the object you want to reference - so for a properly aligned variable that should be 0. How can you have an offset of 0x004400 in a block of memory that is only 0x0400 bytes long?

I am using the __builtin_tblpage() and __builtin_tbloffset() functions to obtain the values in question.

3) Is there anywhere that explains, in plain English how to work with the internal flash?

Yes, it's all very well having these data sheets and stuff, but they present way too much information in an overly complex way. Even the example code I can find is ridiculously complex and convoluted. Is there anywhere that can explain it better?

Extra info:

The PIC in question is a dsPIC33FJ128GP802

I am using MPLAB C30 V3.30b


texts: Measuring low currents with oscilloscope - does the current really flow backwards this much?

texts:
I have an RF mcu intended to run on a coin cell and I'm going to need to measure current consumption as it transitions from state to state.

As a quick test I put a 2 ohm resistor in series with the circuit and attached that to the oscilloscope with the probe on one side of the resistor and he probe ground on the other side of the resistor. Here is what I'm getting on the oscilloscope:

What is curious is how the current appears to flow back wards as much as it went forwards. I assume my test setup is bad, and I either need isolation somewhere or I need to implement a differential probe.

Is this normal and expected, or do I need to resolve some issues before trying to use this for measuring current consumption?

Note that the processor is running at 24MHz which closely matches the pulses in the waveform.

Here is the test setup:


texts: Electrical insulation resistance of TO-220 package with SIL pad and plastic shoulder washer?

texts:
What would a ballpark insulation voltage (HI-POT) rating be for a TO-220 package (with a "hot" tab) mounted to a grounded heat-sink with SIL pad and shoulder washer?

I am not seeing much documentation about this. I want to replace a TO-220 "FP" insulated package with a non-insulated package + SIL pad + shoulder washer if possible.

I found this paper, and at the bottom of the tenth page it reads, "The breakdown voltage [of a SIL pad] is 3500-4500 Vac". It references a Bergquist brand Sil-Pad® 400 product datasheet.

Perhaps the electrical insulation resistance of the pad itself is 4 kV, but I highly doubt the whole assembly would be rated for that. When compressed, even if grease were used to fill the voids around the screw, and it is kept meticulously clean.

The TO-220 device in question is a 16 A, 1200 V rated SCR, being supplied half-wave 408 V AC (~600 V DC pulses).


texts: Can I use a resistor before a bridge rectifier to lower inrush current?

texts:
I have been looking for ways to limit inrush current in a power supply circuit I am designing. In LTspice, with no current limiting, I see a spike of around 24A before my caps are charged.

Looking around, I see NTC inrush current limiters as a common solution as well as some ideas with inductors and resistors inline with the capacitor, each with its own advantages and disadvantages.

My idea though was to put a resistor before the bridge rectifier in my circuit, so the resistor would always provide some resistance before the capacitors got charged. Playing around again in LTspice, this drops my inrush current to about 4A (and changes with the resistor value obviously).

Is this ever done? Are there any major good or bad reasons to do this? I suspect no one does this due to decreased power efficiency, but is that the only reason?


texts: BU2505FV - Can I use SPI with this part?

texts:
I am planning to use the BU2505FV DAC in my design and to communicate with it using SPI.

Is the 3 Wire interface described in the datasheet compatible with SPI? The DAC expect 14 bits to configure an output, and my Microcontroller SPI can send only bytes (8 bits per byte). So what will happen if I try to configure an analog output by sending 16 bits (2 bytes) to the DAC?

Also, I plan to connect other devices to the SPI bus, such as the MCP23S17 I/O expander. Are there any compatibility issues with using both parts in the same design?

Thank you all for your help!


texts: Soldering in marine environment: how to prevent future corrosion

texts:
I regularly need to connect cables on boats. One of the best ways to make these connections reliable is soldering. Usually this involves soldering to a cable with a heavy layer of verdigris. Resin based flux is usually not enough to remove the oxidation from these cables. Also sea water will have soaked up into the cable. Thus it is common that the whole lenght of the cable surface is corroded; so cutting off the end to find uncorroded copper isn't feasible.

Currently I use hydrochloric acid to strip the oxidation of the cable and then rosin cored 60/40 solder which works very well. However the residue of the hydrochloric acid encourages future corrosion what I would like to avoid / minimize.

What are better ways to prepare such cables for soldering?


texts: Storing an LED's previous state even when power is removed

texts:
Storing an LED's previous state even if power is removed

I want to build a simple circuit that consists of 2 push buttons and an LED. I want the LED to turn on when one pushbutton is pressed and off when the other is pressed. I am pretty sure this can be done with a flip-flop. But this is not the only part. I also want the circuit to keep its previous state even if power is removed. So if the LED is on, and power is removed, I want it to be on when the power is added. Same with if the LED is off and the power is removed I want it to stay off when power is added. I think that NAND gates or something are used to store flash data, but I am not sure. I want this circuit to be only consisting of transistors and other common parts like capacitors resistors diodes crystals inductors ect... I don't want to use any uncommon integrated circuits (I only have 555 timers and some dual flip flops and some buffers and a few other really odd ic's.

This may be impossible (especially with only transistors) but any information is helpful  and I'm only 14 so I'm still a beginner in this stuff.

Edit: I want to figure out a semiconductor way to do this. I know I don't have the parts but what would I need?


texts:
I want to take an LED and power it with a 9V battery. I just don't seem able to get the math right.

Taking an average 9V battery and a 10mm LED, what kind of resistor would I need and how do I know for how long the LED will run on the battery?

Also, can infrared LEDs be "seen" (using a camera?) from a distance?


texts: How do you solve for the compensation resistor in this circuit using Vout?

texts:
I managed to solve for the value of the compensation resistor (R3 which goes at the positive terminal of the op amp) because I know that R3= R2||R1. I reduced the resistors in the feedback loop of the op amp to 8/3R and took that in parallel with R = (8/11)R which is the right answer.

How do I calculate R3 using Vout due to Ibias as it says in the hint?

With only Ibias active I calculated Vout to be 8*R*Ib. What do I do with this value? How do I mathematically show that R3 should go at the non-inverting terminal of the opamp?


texts: Comparator Question (and more general question)

texts:
I have been fascinated with electronics my whole life and read many books on it, but only recently have I began to really tinker, and I have often been befuddled by many salient details that are involved, that don't seem to be written down anywhere.

simulate this circuit – Schematic created using CircuitLab

The current circuit I am working on is a comparator (LM339N).  It is on a 9v source.  I have two voltage dividers feeding the +/- inputs.  One is a simple 50% voltage divider, and the other has a photoresistor attached.  The goal is that when the photoresistor detects no light, an LED attached to the output should light up.

So, the LED is attached to the outlet so it sinks to the comparator when it goes low (the fact that comparators only sink current and do not source it took me forever to discover - again it seems that there are many salient details that are hidden to newbs like myself).

The circuit works great if it does the opposite - if the light on the photoresistor turns the light off.  Now, to me, it seems that if light on the photoresistor turns the light off, then I should be able to get my desired result simply by switching the inputs of the comparator.  However, when I do this, the light never turns on.

The only thing I can think of (which I couldn't think of last night when I was working on it until midnight, but now that I'm in my office I'm wondering about), is that maybe the fact that the photoresistor is giving a variable voltage rather than a constant reference voltage is preventing the comparator from working.

Another possibility is that I don't know if the comparator is sinking current from my voltage dividers or not, and/or messing with their operation by providing a low-load path for electricity.  Does it matter how stiff I make my divider?  200-ohm or 10k ohm dividers?

So, in short, if anyone knows much about comparators and can help me in the right path that would be great.  But even more, if someone knows a good book that helps with the nitty gritty sorcery involved in electronics (like going through each major part and telling where the doozies are - like that comparators don't source currents), that would be even better.


texts: What happens when there's no specific input variable on a logic diagram using a JK flip flop?

texts:
I'm trying to do some homework involving this circuit diagram:

But I'm confused as to what the input would be for building a state table.  Would I have to use the states of the flip flops as the input variables?


texts: How to figure out the pinout of this embedded netbook (Asus EEE X101h) webcam?

texts:
Sometime ago my old Asus X101H netbook died with a molten cooler fan. I've extracted it's webcam, which I want to use for another project.

Now I'm trying to map the pinout of the connector. The situation looks like this:

So I'm guessing it's using USB to connect the webcam. On the board is also a microphone, so I'm guessing there are two USB interfaces.

I've figured out the grounds by measuring the resistance by the screw hole (left side of the boards frontal view).

The black and the blue wire are GNDs. I know it's hard to figure out D- and D+ but it's not so bad if I get the wrong.

My only problem is, how can I figure out which pins are the VCCs?

On the label of the cable is written:

X101H CMOS CABLE
P/N: 14004-00090100
HIGH-TEK (KW5) 11/08/22

I've a Fluke Multimeter, but not many other tools.

Thank you in advance!


texts: Is 5V too much for a device that uses 3.5V?

texts: I have a handheld GPS that uses 2 x1.5V batteries or a cigarette litghter plug that outputs 3.5V. I do not have a 12v source readily available but do have several USB ports that output 5V. Can I make a patch cord or do I need to reduce voltage first?