# Tag Info

49

Use 1-wire bus and any 1-wire chip inside the button. I wrote "any", because each 1-wire chip has its own, unique hardware address, so all that you need on RPi side is checking that the chip was detected, for example using bash command: ls /sys/bus/w1/devices/ and checking it's output for existence of subdirectory named exactly as this hardware address. ...

37

If you really want "to understand how computers work on the low level", then it could be argued that neither Arduino nor Raspberry Pi are suitable. Both of these platforms (their hardware and software) are designed specifically to hide the low-level details in order to make it easy for people who don't care about those details to accomplish their higher-...

30

This must be British. For them "fit" means something like what we would call "install". For us, "fit" means how well something fits, meaning how good it is at mechanically going into the right mounting holes or whatever, or how effective it is overall in the role it is being used in. In this case "no-fit" means "do not install". This is often done when a ...

29

Neither: it can be considered a single-board computer where the main CPU is a system-on-chip.

29

tl;dr because there are real-world issues that prevent us from setting I/O standards and other specifications willy-nilly. If EE were so simple a lot of us wouldn't have jobs or thesis projects. To start, there are tons of practical reasons why we don't just increase I/O voltage. It's not as simple as some guy crossing out 3.3v on a piece of paper and ...

24

What you are trying to do won't really work. First a "C program" doesn't consume a particular amount of power. A particular program performing a particular task on a particular processor may cause a reasonably measurable increase in power draw by that processor, or not. The power draw of a processor will only change significantly if it would otherwise go ...

23

Other common terms used are "no placement" (NP) or "do not place" (DNP) but "no fit" would fall into the same category. It means the circuit board (PCB) has pads where a connector may be placed, but when you receive the board it won't have a connector installed. It will be up to you to source the connector and install it youself if you require it.

21

The user manual of your multimeter tells us why: In the current measuring mode (DC or AC): input impedance approximately 3 kΩ. Which in all honesty is just a joke. So with 5 V the most current you can get is 1.67 mA, but it doesn't even tell us the range of the input impedance, so the value you measured is "fine". It says to be able to ...

19

You see aliasing in your capture, not clock jitter - a case of the wrong tool for the job. A 2Mhz clock has a 500ns period, so is high for 250ns. With a 16Mhz logic analyser you are taking samples every 62.5ns, so ideally you'd see 4 high samples, 4 low samples repeating. Now consider the effect of a minuscule 0.5% difference in frequency on the CPU ...

18

Trying to do with with IIC is a bad idea. IIC is really meant for communication between chips on a single board. Since the maximum required current to pull a line low is limited, the lines are relatively high impedance (a few kΩ). This means they can pick up noise easily, which is a serious issue when running in unshielded cable in the walls ...

14

The idea of the transistors is that: If the Left is low and the right is high R2 (and the left transistor a little) will negative-bias the base of the right transistor's base, allowing it to push the gate to the right voltage; closing the FET's channel and the body diode will block as well. If the right is low and the left is high, the left transistor's b-e ...

13

The best way to do this would be to use a transistor as a comparator to make the transition sharp. Here is an example circuit: It uses the LDR as the upper part of a voltage divider. When the LDR resistance drops the voltage at the transistor base rises and turns it on. The transistor can be any general purpose NPN. We can calculate the resistor value based ...

13

An Arduino can be used with the Arduino SDE, which provides some functionality in a 'hidden' way, but it can also be used with plain assembler, C, or C++ (and probably with a lot of other languages, but those seem to be less common). There is a wide variety of add-one boards available called shields, is most cases with support software that integrates with ...

13

Since SPI is a synchronous protocol the exact frequency at any one point in time really doesn't matter. Everything is keyed to the edges of the clock, so the exact timing between edges really doesn't matter - within the limits of the device of course.

13

The industry-standard way of doing this is to use an optically-isolated coupler. The proper industrial method is to use a modular system where you can select a module for mains power input and logic-level output. For example this AC input, 5V logic output module from Opto22: If you were designing your own circuit, you could do an equivalent with an opto-...

13

If safety is a primary concern, rather than build that circuit up, you could consider purchasing a standard AC-input module for about $10-$15. They are UL, CSA, CE, and TÜV safety certified (it's still possible to go wrong and create a dangerous situation, especially if the wiring is sloppy, but less likely). Best to have someone knowledgeable look it over ...

12

The cheapest and simplest solution is just to buy a tiny mains-powered USB charger and wire up the USB +5 and ground lines to detect when the charger is powered by AC.

12

A relay is almost certainly NOT the right tool for the job. The first step in wiretapping an interface in order reverse-engineer it is to determine the nature of the signals you want to look at. For voltage signals, you need a high-impedance buffer amplifier (like the input of an oscilloscope) that will cause minimal disruption to the existing circuit. For ...

11

Choosing the series resistor for an LED: You need to know the forward voltage of your LED (Vf in datasheet) This will vary depending on the colour. For example a typical red LED has a VF of ~2V, a blue LED a Vf of ~3.5V. You then need to decide on the current you wish to run your LED at. It needs to be under the maximum continuous current (Imax) specified ...

11

Are you familiar with shift registers like 74HC595? It requires 3 pins from your RPI and you can control 8 output lines. You can easily cascade them effectively controlling n×8 output lines. Data is serially clocked into the shift register and once all 8 output bits are transferred, you latch the bits onto the outputs. I was about to add the datasheet here,...

11

It has been solved already. Some microcontrollers have built in pull-up and/or pull-down resistors that can be enabled via software. But these are not active when microcontroller has no firmware so for safety reasons you might still want to have external resistors to keep stable state during powerup, reset or firmware download.

10

To eliminate any possibility of surprise, and to generally make things more robust, I'd suggest using an optocoupler like 4N25. simulate this circuit – Schematic created using CircuitLab With this arrangement, you don't need to worry about how to combine the separate grounds of the two systems, because their grounds simply aren't connected. Also, if ...

10

I've been dabbling in electronics since the 1970s and had products used in nationwide broadcasting chains, reviewed (sometimes favourably!) in hi-fi magazines and (possibly soon) headed into orbit, and I would still consider breadboarding a Raspberry Pi a major project. Find a middle ground : take a look at an ARM CORTEX CPU running at 50 or 100 MHz and ...

10

simulate this circuit – Schematic created using CircuitLab Figure 1. Opto-isolated signal detector. An opto-isolator electrically isolates and protects your micro from the AC and eliminates any ground-loop issues. R1 limits the current to about 10 mA rms. D2 provides reverse voltage protection for the opto-LED, D1. D1 will illuminate on positive ...

10

I strongly suggest to reconsider using your circuit in favor of detection without direct connection to mains voltage. Some examples are: Photodiode to detect light Coil-based current transformer to detect current Current transformer with Hall effect sensor to detect current All of the above have the benefit that they do not trigger if your light bulb is ...

9

The input in question is "floating" until the button is pressed, due to its inputs being of very high impedance. You need to add a pull-down resistor to the pushbutton, 10k is commonly used, thus: That way, the Raspberry Pi input sees a false (0 Volts) until the button is pressed, then a true until released.

9

The components on the back of the motor are three capacitors to suppress the contacts, and a diode to protect whatever switched it from a back-emf. If you reverse the polarity without removing the diode, then you will just put the current through the diode not the motor, and possibly either destroy it or damage your power supply, or both. So you need to ...

9

1: Yes, you can do that. Essentially, that's how power supplies work. They can handle multiple parallel networks within their current capacity. As for the heatsink, that depends on the regulator, the current draw, the ambient temperature, how efficient it is, etc. It's not a simple yes or no. 2: The capacitors depend on the regulator as well. Some require ...

9

The Raspberry Pi's seriall port pins on the GPIO header are 3.3 volt logic levels direct from the processor. The processor will likely be damaged if you connect real RS-232 signals to those pins. You will need an RS-232 interface chip (MAX3232 or similar) to invert the RS232 signals, and convert them to 3.3 volt logic levels. Then you should use a ...

9

I resolved the problem, but it took re-manufacturing the board. The problem seemed to be with the routing and layer stack-up. The USB and Ethernet traces did not have correct impedance due to two reasons. Firstly, the track geometry was not correct for 90 ohm (USB) and 100 ohm (ETHERNET) differential impedance. If your layout software does not support ...

Only top voted, non community-wiki answers of a minimum length are eligible