Welcome! I am sorry to say you are light on the 50 watt (5 * 10 = 50) power supply, here is why: (Ohm's law states volts * amps = watts). Your Pi needs about 3 amps or 15 watts. You now have 7 amps or 35 Watts remaining. Next you have 5 meters of leds at 18 watts per meter (per your link) so that is (18 * 5) 75 watts. You had 35 watts left after the Pi so ...
Tried BCM2835 out and it does the job, below is quick-start for those who need it:
BCM2835 is the MCU chip of the Raspberry Pi, whose library can often be used to access the GPIO on BCM 2835 chip. You can use the librarty to control the rigistors of a BCM2835 chip directly just like using STM32 library to control an STM32 chip. in contrast, the libraries ...
May not be a complete answer to your question but useful to know.
If you really need fast GPIO or GPIO which is "real time" (meaning that you can guarantee, for example, how long a signal stays high / goes low for, then you should not be using a non-RTOS (Real Time OS) device, such as a Raspberry Pi with Linux kernel. (Or if you need particularly &...
First: Give your best effort to making the hardware fail-safe. For example, magnet valves and relays should be wired such that the water does not flow unless there is a positive signal from the controller (your RPi).
Second: Get a reliable watchdog timer that will give you the ability to either reboot or power down your system in the event your program, or ...
If you're running your Pi from an SD Card it's likely to die after a number of unplanned reboots (SD Card corrupted, often beyond repair) so in my experience running/booting from an SSD is much more reliable. At the end of the GPIO near the USB ports there are a couple of holes and above it says 'RUN'. If you're handy at soldering you can install header pins ...
It does not matter whether the relay is powered from the Pi or independently. You will however need sufficient power for both devices, a 3A PSU should be sufficient.
Yes the GPIO pins are limited to provide 16mA individually and no more than 50mA or so in aggregate. You cannot address this limitation without some transistor circuitry to provide current gain....
In fact the Pi3 (or more precisely the SOC) has 2 UART.
See How do I make serial work on the Raspberry Pi3 or later
One is connected to the Bluetooth module the other can be used and is accessible on pins 8, 10. These can be switched but only one is accessible.
The Pi4 has 6, 4 in addition to the 2 on earlier models, but only 4 can be used due to conflicting ...
You CAN power external components; indeed for some this is recommended.
It is (generally) essential to share Gnd connections (opto-isolated devices are a possible exception).
There is actually no need in this case, as the Pi 5V can easily supply the current needed by 2 relay coils.
HOWEVER if you are using a relay module similar to that pictured they are ...
Yes - you can definitely do that. Two things you must keep in mind:
The RPi and the external battery-powered hardware must operate at a common reference potential. This is easily accomplished by connecting the two GROUND points together.
RPi GPIO pins are biased at 3.3V, and they are rather fragile. You must properly interface them to your external ...
In general, yes this is possible.
You must connect the grounds of both power supplies together at some point.
You must also make sure that no 5 V logic signals that come from your 5 V logic are connected to pins on the Pi, as this can permanently damage the Pi. There is no danger of damage if GPIO outputs from the Pi are connected to logic inputs in the 5 V ...
The Pi has 3 "components" the CPU, GPIO and Video Core which are relatively independent. Even when the Pi is shutdown the Video Core continues to run, and the GPIO pins retain their state; only the CPU is not running.
According to the Foundation the Pi Zero draws 55mA on shutdown; the ZeroW would be expected to draw more, as would any connected ...
I found a solution for that. Even though /proc/cpuinfo says:
Hardware : BCM2835
Revision : a020d3
Serial : 00000000d10b2364
Model : Raspberry Pi 3 Model B Plus Rev 1.3
In fact it is BCM2837, because changing GPIO base address from 0x20200000 (which is correct for BCM2835) to 0x3F200000 (BCM2837) made it work.
Looks like there is quite a ...
I can't see anything obviously wrong. Perhaps the peripheral base is different for the Pi3B+.
Here is some code to compare against.
gcc -o minimal_gpio minimal_gpio.c
I am using encryption on my SSD with Pi but the idea of automatic decryption based on the combination of your GPIO pins state is ... a bit against your encryption. It will be enough if someone checks your script that is checking this combination and... encryption is gone ;-)
LUKS encryption allows you to use either password or the keyfile so to be able to ...
The DS18B20 uses the 1-wire bus system developed by Dallas Semiconductors (the DS part of the device). Multiple 1-wire bus devices may be connected to the bus. By default the bus uses GPIO4 on the Pi. However you can specify which GPIO to be used by setting a value in /boot/config.txt.
The DHT22 uses a 1 wire protocol but it is not compatible with the ...
[Edit:] This solution doesn't work, since the RRC Battery switches on Alarm_Mode every 60 seconds if it doesn't get reset according to the documentation:
The ALARM_MODE bit is automatically cleared by the Smart Battery electronics every 60 seconds so that any accidental activation of this mode will not be persistent. A SMBus Host which does not want the ...
It's not clear from your question that you need to measure current. As a practical matter, measuring voltage is often easier.
@Dougie comment suggesting an [opto-coupler (a.k.a. opto-isolator)] is a good one as it provides galvanic isolation - an important safety consideration working with mains voltages. As you've seen in the comments, there are various ...
You have been told this is an EE question but some problems; opto isolators/ LEDs have a very low reverse rating (6V) and need protection.
You will have a 50/60Hz pulsed output which needs filtering.
Both of these can be minimised with a bridge.
I would use something like the following with a 4N28 opto isolator as a generic AC detector.
The values shown are ...
In my younger years (long before microprocessors) I spent some time working on automotive electronics. This is a HOSTILE environment - motorcycles are an order of magnitude worse.
It is possible BUT is somewhat a specialist field. You NEED an isolated supply, extensive shielding, all inputs should ideally be galvanically isolated and any connections need ...
Any GPIO which is not connected to a voltage will float between high and low.
You need to give the GPIO a fixed voltage by supplying a pull to 3V3 or a pull to ground.
The weak internal pulls (about 50kohm) can easily be overcome by noise.
Try adding an external pull of around 5kohm or lower until the GPIO is stable in your environment.