Go to advanced search

by ghp
Tue Jul 20, 2021 3:41 am
Forum: Python
Topic: python error
Replies: 6
Views: 266

Re: python error

ConnectionRefusedError: [Errno 111] Connection refused

Possibly there is no application running on the server HOST which accepts connections on port PORT.
by ghp
Fri Jul 16, 2021 5:49 pm
Forum: Automation, sensing and robotics
Topic: Need Help: Simple Home Power Status Detector
Replies: 13
Views: 482

Re: Need Help: Simple Home Power Status Detector

Be careful and never use mains voltage directly. As stated already, many UPS can monitor power. If you want to learn on this subject, use a AC/AC power supply, e.g. http://catalog.triadmagnetics.com/Asset/WAU060-2000.pdf ac_measurement.png The 6V AC on output is still above the range most ADC can ha...
by ghp
Wed Jul 14, 2021 8:12 pm
Forum: Automation, sensing and robotics
Topic: How to connect PC water coolant sensor to a Raspberry Pi
Replies: 31
Views: 916

Re: How to connect PC water coolant sensor to a Raspberry Pi

Perhaps better if you look for ready to use hardware and software. Example are https://www.microedgeinstruments.com/lpth-01.php, but there are many more.
by ghp
Wed Jul 14, 2021 5:49 am
Forum: Automation, sensing and robotics
Topic: How to connect PC water coolant sensor to a Raspberry Pi
Replies: 31
Views: 916

Re: How to connect PC water coolant sensor to a Raspberry Pi

For the NTC solution: This ADC board is not a bad choice ADC https://thepihut.com/collections/raspbe ... spberry-pi - schema available - there is a separate 3.3V regulator on board, so a stable, low noise ref voltage is available. You need to buy a 1206 resistor 10k for each of your NTC and solder i...
by ghp
Tue Jul 13, 2021 8:51 pm
Forum: Automation, sensing and robotics
Topic: How to connect PC water coolant sensor to a Raspberry Pi
Replies: 31
Views: 916

Re: How to connect PC water coolant sensor to a Raspberry Pi

According to the datasheet the sensor is a NTC-Thermistor. You can not connect it directly to a GPIO pin. Use a fixed 1% resistor (possibly 10k) in series and use an ADC to measure the voltage at junction point. To get precise measurements, a precision voltage regulator for the voltage divider and f...
by ghp
Tue Jul 13, 2021 5:14 pm
Forum: Python
Topic: PWM fan control for intel
Replies: 1
Views: 168

Re: PWM fan control for intel

There are spec on the net for the pwm signal, e.g. https://wiki.kobol.io/helios4/files/fan/4_Wire_PWM_Spec.pdf 2.3.1 PWM Output Signal The Hardware Monitor Devise is required to provide an open-drain or open-collector type output for the PWM signal on pin 4 (see Table 1 and Figure 8) with the follow...
by ghp
Mon Jul 12, 2021 6:56 pm
Forum: Automation, sensing and robotics
Topic: Pi Drip Irrigation System
Replies: 3
Views: 259

Re: Pi Drip Irrigation System

I have a 10000 mAh battery with UPS I plan on using. I'm no electrical engineer, so first thing, is this enough power storage? There are power consumption numbers here: https://www.raspberrypi.org/documentation/hardware/raspberrypi/power/README.md You are not specifying what you want to do with the...
by ghp
Sun Jul 11, 2021 6:05 pm
Forum: Other projects
Topic: How do you connect multiple devices to i2C on GPIO pins
Replies: 2
Views: 222

Re: How do you connect multiple devices to i2C on GPIO pins

You can connect multiple sensor/devices to I2C 'in parallel'. Restriction are that the bus address is different and of course all connected devices use same bus voltage of 3.3V.
Read more in https://en.wikipedia.org/wiki/I%C2%B2C
by ghp
Sun Jul 11, 2021 6:32 am
Forum: Python
Topic: Need a little help with my code (keyboard input listener and loops - almost got it).
Replies: 5
Views: 288

Re: Need a little help with my code (keyboard input listener and loops - almost got it).

In the launcher
- you should use 'python3' instead of python(2). Python2 is obsolete.
- add "export DISPLAY=:0" before starting the python app.

Or start your application with "desktop auto start". viewtopic.php?t=294014
by ghp
Sat Jul 10, 2021 10:34 am
Forum: Python
Topic: change from python 2 to python 3
Replies: 4
Views: 297

Re: change from python 2 to python 3

Simple solution: instead using the command python yourprogram.py use python3 yourprogram.py When installing additional packages, use pip3 install package_you_need Complex solution: change symbolic link which is usually python -> python2 to look like python -> python3. See https://www.raspberrypi.org...
by ghp
Sat Jul 10, 2021 10:26 am
Forum: Python
Topic: Need a little help with my code (keyboard input listener and loops - almost got it).
Replies: 5
Views: 288

Re: Need a little help with my code (keyboard input listener and loops - almost got it).

Let me propose an object oriented approach: ScreenAction, responsible for the screen switching (did not find the action when IDLE and then go back to ACTIVE) StateHandler is responsible to sort all keypress- and timeout-events. Instead of counting loop count, there is a Timer used. #!/usr/bin/env py...
by ghp
Wed Jul 07, 2021 1:24 pm
Forum: Other projects
Topic: Making: How to fill the gap
Replies: 3
Views: 256

Re: Making: How to fill the gap

I use kicad with freerouter. My notes on 'how to use' are: To get freerouting, install https://layouteditor.com/download Kical, pcb-tool: export spectra dsn start freerouter.pcb, read dsn Autoroute in freerouter, export ses session in kicad, pcb.tool, import session ... and then modify placement of ...
by ghp
Tue Jul 06, 2021 8:33 am
Forum: Automation, sensing and robotics
Topic: Motion sensor and CEC-Client
Replies: 2
Views: 212

Re: Motion sensor and CEC-Client

Please use 'code tag' when posting python code. See https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=84477 You already have the commands which work on the console, e.g. echo 'on 0.0.0.0' | cec-client -s -d 1 You can use this command in subprocess.run like subprocess.run( "echo 'on 0....
by ghp
Tue Jul 06, 2021 8:28 am
Forum: Automation, sensing and robotics
Topic: Help selecting P-channel MOSFET to be driven by Pi Zero
Replies: 6
Views: 311

Re: Help selecting P-channel MOSFET to be driven by Pi Zero

Looks good. See diagram datasheet "Fig. 6. Output characteristics: drain current as a function of drain-source voltage; typical value": for Vgs = -4.5 V (what you achieve in your setup) and Vds < -4V the transistor is 'fully on' and can handle high current. With more than enough margin.
by ghp
Tue Jul 06, 2021 7:34 am
Forum: Automation, sensing and robotics
Topic: Help selecting P-channel MOSFET to be driven by Pi Zero
Replies: 6
Views: 311

Re: Help selecting P-channel MOSFET to be driven by Pi Zero

A high side driver can be build like this: high_side_drive.png Pin numbers are random. The two resistor ensure that there is no current when GPIO is 'input' direction. This schema is suitable for low frequency switching. For high frequency switching gate driving current needs to be handled. Use mosf...
by ghp
Mon Jun 28, 2021 6:10 pm
Forum: Automation, sensing and robotics
Topic: Using resistors with ADS1115 to measure 12v battery
Replies: 5
Views: 336

Re: Using resistors with ADS1115 to measure 12v battery

You can switch on/off the voltage divider with a high side switch. Example: see https://www.vishay.com/docs/70611/70611.pdf, Figure 3 When Pi is off the voltage divider will not consume current from the battery. Of course you need a GPIO pin to control this. For a protective diode use a schottky e.g...
by ghp
Mon Jun 28, 2021 12:04 pm
Forum: Automation, sensing and robotics
Topic: Using resistors with ADS1115 to measure 12v battery
Replies: 5
Views: 336

Re: Using resistors with ADS1115 to measure 12v battery

When the ADS1115 is connected to the PI, you most probably power the ADC with 3.3V. Then the max allowed input voltage for the ADC input is 3.3V. So you need to bring down the 12V to 3.3V max. Better to have a slight margin for resistor value tolerances. voltage_divider.png Most batteries have a hig...
by ghp
Sat Jun 26, 2021 2:37 pm
Forum: Automation, sensing and robotics
Topic: MQTT data logger crash
Replies: 5
Views: 323

Re: MQTT data logger crash

There is a potential flaw in the code, here the scenario: - you receive one message for each topic "esp/bme280_01", "esp/tsl2561_01", "esp/scd30_02". - wait a while (30 sec at least), then receive a topic "esp/bme280_01" - database connection is opened, the &q...
by ghp
Thu Jun 24, 2021 11:14 am
Forum: Automation, sensing and robotics
Topic: River temperature monitoring station
Replies: 10
Views: 505

Re: River temperature monitoring station

There are weather station available which support at least some of the features
https://holfuy.com/de/shop
If you look around, you will find some more vendors.
by ghp
Thu Jun 24, 2021 8:30 am
Forum: Automation, sensing and robotics
Topic: What to place in between boards?
Replies: 7
Views: 555

Re: What to place in between boards?

Available from many vendors, here an image:
https://www.amazon.de/-/en/Plastic-Hexa ... 41&sr=8-14
by ghp
Wed Jun 23, 2021 4:56 pm
Forum: Automation, sensing and robotics
Topic: 3d printed Weather Station
Replies: 11
Views: 507

Re: 3d printed Weather Station

Hmm, not all code you find in the net is perfect (I know, as I post also my code to the net...). Took this anemometer code and a test harness. Connected the input pin to the output pin of the test code. Test code: #!/usr/bin/python3 import RPi.GPIO as GPIO import time test_output = 21 GPIO.setmode(G...
by ghp
Wed Jun 23, 2021 7:59 am
Forum: Automation, sensing and robotics
Topic: 3d printed Weather Station
Replies: 11
Views: 507

Re: 3d printed Weather Station

Connecting switches with long cables is a problem. Rule of thumb: - connect a 0.1uF capacitor across the switch, close to the reed switch. You use pulldown, so switch between Vcc and GPIO ? - connect 10nF cap between Vcc and GPIO close to the GPIO pin - use external pulldown of 1k - use twisted pair...
by ghp
Tue Jun 22, 2021 8:04 pm
Forum: General
Topic: Pi pico on r/c sub
Replies: 5
Views: 392

Re: Pi pico on r/c sub

I browsed through some user manuals of remote control systems and there seems to be a widely available 'failsafe' feature. In signal loss condition, then either last servo position is kept or a special 'fail' position can be programmed.

Go to advanced search