Go to advanced search

by maurice1
Tue Nov 24, 2020 9:46 am
Forum: Automation, sensing and robotics
Topic: Water Meter
Replies: 3
Views: 274

Re: Water Meter

I have done this in Python I opened the meter and glued a tiny shard of magnet to the 0.1 litre dial, I then used a reed switch to pickup revolutions. I tried different methods and finally used Joan's pigpio. This worked perfectly and still matches the actual meter readings after a couple of years I...
by maurice1
Thu Sep 03, 2020 3:08 pm
Forum: C/C++
Topic: Reading different channels from MCP3008 with pigpio
Replies: 4
Views: 1521

Re: Reading different channels from MCP3008 with pigpio

Thanks Joan for the Python code. After spending time on Rpi.GPIO and GpioZero your PiGPIO code worked straight off. Python #!/usr/bin/env python import pigpio def read_MCP3008(adc, channel): count, data = pi.spi_xfer(adc, [1, (8+channel)<<4, 0]) value = ((data[1] << 8) | data[2]) & 0x3FF return valu...
by maurice1
Mon Apr 20, 2020 10:32 am
Forum: Automation, sensing and robotics
Topic: Read 4-20mA industrial current loop sensor
Replies: 4
Views: 613

Re: Read 4-20mA industrial current loop sensor

I tried that using MCP3008 and current transformers, but I got spurious readings. In the end I used an Arduino nano to measure the analogue inputs and py serial to read the Arduino connected to Pi via USB. I found this most successful and being running for years and don't get an odd reading. I found...
by maurice1
Tue Dec 03, 2019 9:52 am
Forum: Python
Topic: Converting Arduino code to Python Code
Replies: 10
Views: 1712

Re: Converting Arduino code to Python Code

Maybe try, Very easy just plug anduino into rasp pi usb. from nanpy import (ArduinoApi, SerialManager) I've used it for years to read analogue inputs from my nano arduino. Readings are quite precise. I did try the MCP3008s but could never get them to be precise enough. Could have been a power supply...
by maurice1
Fri Aug 09, 2019 4:01 pm
Forum: Troubleshooting
Topic: Trying to get RioRand 433MHz RF Link receiver to work on Pi3
Replies: 5
Views: 701

Re: Trying to get RioRand 433MHz RF Link receiver to work on Pi3

Not sure about your amazon receiver, but I use Joan's
https://www.raspberrypi.org/forums/view ... p?t=124663
and it works perfectly with the older type 433mhz receivers and transmitters.

Very simple to setup up reading with putty and python for sending
Might be of some help to you
by maurice1
Tue Jan 22, 2019 7:51 am
Forum: Off topic discussion
Topic: Wind Turbine: possible power supply
Replies: 11
Views: 2648

Re: Wind Turbine: possible power supply

Would an old alternator from a small car with a 12v battery and buck converter be an idea?
by maurice1
Thu Dec 20, 2018 1:58 pm
Forum: Automation, sensing and robotics
Topic: Alarm System using existing DSC wiring
Replies: 13
Views: 7048

Re: Alarm System using existing DSC wiring

I Have an existing 10 Zone Aritech alarm system which works fine but I wanted the email remote set/unset and SMS if it went off. I found the easiest way was to use an arduino nano plugged into the pi by USB. 1.This gives the analog inputs that most alarms need for inertia sensors on the windows and ...
by maurice1
Wed Oct 17, 2018 4:29 pm
Forum: Automation, sensing and robotics
Topic: Yet Another Raspberry Thermostat
Replies: 8
Views: 5246

Re: Yet Another Raspberry Thermostat

For Logging only,
I used Anita2r (Member here) instructions.
They were easy to follow and my 18 x DS18B20 have been running fine for about 4 years

Everything is done on the pi
About 10th post down
viewtopic.php?t=26466
by maurice1
Wed Aug 22, 2018 7:56 am
Forum: Media centres
Topic: Raspberry Pi 3B+ Media center build
Replies: 7
Views: 8506

Re: Raspberry Pi 3B+ Media center build

When you use the official Pi Hub that is in the shape of a raspberry, there is an USB to firewire cable to connect the hub to the pi USB. Your 10 port hub doesn't look like it has a firewire outlet. I don't think the 5v power USB on the Pi carried data. I presume you have tested it without the box a...
by maurice1
Wed Aug 22, 2018 7:23 am
Forum: Python
Topic: I2C / IOerror 24
Replies: 11
Views: 1268

Re: I2C / IOerror 24

Hi Jean, Here is an idea for a Band-aid which should at least get you an approx time of when your script fails and restarts it. Make a script /home/pi/nohupstart.sh Copy code below into /home/pi/nohupstart.sh Edit Crontab with */3 * * * * sh /home/pi/nohupstart.sh Restart Cron Check you can send an ...
by maurice1
Thu Jul 12, 2018 11:45 am
Forum: Other projects
Topic: Utility meter reading using raspberry pi
Replies: 8
Views: 10338

Re: Utility meter reading using raspberry pi

I just ordered one from ebay. I note that there is more info from https://www.navitron.org.uk/forum/index.php/topic,12168.75.html One of the guys there proves that it uses 433mhz and links to https://www.en4rab.co.uk/onzo/ which has some onzo downloads. I think they are for windows not linux I bough...
by maurice1
Sun May 06, 2018 1:19 pm
Forum: Raspberry Pi OS
Topic: Log file monitoring
Replies: 3
Views: 842

Re: Log file monitoring

Hi Dan, Script below checks if a file time stamp has updated in the last 10 minutes and sends an email if it hasn't Script is called by cron Is that the sort of thing you are looking for? #!/usr/bin/python import os from datetime import datetime, timedelta file_name = "/var/1w_files/test" file_mod_t...
by maurice1
Sun Feb 04, 2018 8:41 am
Forum: Advanced users
Topic: using the SCT-013 with the pi via the MCP3008
Replies: 6
Views: 10074

Re: using the SCT-013 with the pi via the MCP3008

Did anyone get this working. Have a few spare channels on my MCP3008 free and also have a couple of SCT Current transformers and would like to get them working. Found https://pypi.python.org/pypi/enerpi There is a fair amount on https://community.openenergymonitor.org/search?q=mcp3008 My SCTs work f...
by maurice1
Wed Apr 12, 2017 12:19 pm
Forum: Python
Topic: button pressed > popup on webpage
Replies: 5
Views: 3842

Re: button pressed > popup on webpage

Hi sboerhoop I'm not quite sure what you require but maybe the following is a different way of thinking about your challenge. Regarding your index.php and wanting a button to show to show the state of a switch perhaps using a iframe buttonstate.php embedded in index.php. If buttonstate.php has <meta...
by maurice1
Fri Mar 24, 2017 7:04 pm
Forum: Troubleshooting
Topic: AM2320 per I2C with RPi3
Replies: 16
Views: 9749

Re: AM2320 per I2C with RPi3

Figured it out the humidity part was faulty.
Plugged in new one and readings were too high but after a couple of minutes settled down and gave realistic readings
by maurice1
Wed Mar 22, 2017 6:30 pm
Forum: Troubleshooting
Topic: AM2320 per I2C with RPi3
Replies: 16
Views: 9749

Re: AM2320 per I2C with RPi3

Hi Terraferrma I can replocate your error if I unplug the AM2320. Otherwise github.com/Gozem/am2320/blob/master/am2320.py copied into a folder under home/pi worked straight away after making executable. However when I run it pi@raspberrypi:~ $ python /home/pi/AM2320/am2320.py 23.6 1.0 pi@raspberrypi...
by maurice1
Thu Feb 23, 2017 4:28 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Speed up Refresh / Readout Rate of DS2482
Replies: 3
Views: 2138

Re: Speed up Refresh / Readout Rate of DS2482

Interesting idea, never knew of DS2482-800 IC I just use php for about 18 DS1820b attached to GPIO4 with 2 resistors in parallel maybe 20 metres away from my pi. I use a php webpage and $flow = file_get_contents('/sys/devices/w1_bus_master1/28-0000034660e5/w1_slave'); $outside = file_get_contents('/...
by maurice1
Mon Nov 14, 2016 12:27 pm
Forum: Other projects
Topic: Up to 2048 additional GPIO pins or 128 Analog Inputs
Replies: 5
Views: 1592

Re: Up to 2048 additional GPIO pins or 128 Analog Inputs

Interesting JD thank you for sharing
by maurice1
Thu Sep 22, 2016 10:26 am
Forum: Beginners
Topic: Car box preventing Phone use | ideas
Replies: 7
Views: 1261

Re: Car box preventing Phone use | ideas

Maybe using an alarm vibration sensor like on a window, with a MCP3008 analogue to digital convertor attached to a pi. Those 2 components should be around £10. The MCP could be programmed to any level of vibration eg. When the car is stationary or stationary with engine switched off, unless you driv...
by maurice1
Mon Aug 22, 2016 8:20 am
Forum: Troubleshooting
Topic: SSH Slow to respond
Replies: 8
Views: 5680

Re: SSH Slow to respond

Could it be something else on your lan trying to use the same ip address and the asus is confused. Think I had a similar problem a long time ago switching sd cards between rpis.
by maurice1
Sat Jun 25, 2016 7:05 pm
Forum: Python
Topic: How to read (rb) a *.txt file and o/p depend on 1 or 0?
Replies: 14
Views: 3582

Re: How to read (rb) a *.txt file and o/p depend on 1 or 0?

pythons linecache is a good way to read character/s from a text file eg.

X = int (linecache.getline('/var/www/html/Aritech.txt', 1))


Use
linecache.clearcache() when you want to clear it
by maurice1
Mon May 30, 2016 5:13 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 3 x MCP3008 Gpiozero RPi3
Replies: 0
Views: 410

3 x MCP3008 Gpiozero RPi3

Hi I have 3 x MCP3008 testing Gpiozero on a RPi3 I have 3 scripts one each to read each MCP3008. #!/usr/bin/env python from gpiozero import MCP3008 import time while True: V0 = MCP3008(channel=0, select_pin=25) V1 = MCP3008(channel=1, select_pin=25) V2 = MCP3008(channel=2, select_pin=25) V3 = MCP300...
by maurice1
Thu May 26, 2016 1:15 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi1 vs Pi3 MCP3008
Replies: 0
Views: 417

Pi1 vs Pi3 MCP3008

Been using 3 x MCP3008 on a Pi1 for a couple of years for ADC to read 20 zone inputs on an alarm panel. Worked perfectly. Values were consistently about 600 - 700 /1023 when doors / windows closed and dropped to ~150/1023 when opened. Power came from 12vdc Alarm panel Battery stepped down to 5Vdc Ch...
by maurice1
Wed Feb 17, 2016 8:25 am
Forum: Other projects
Topic: Stream audio Android over WiFi to in-car USB port,
Replies: 7
Views: 3291

Re: Stream audio Android over WiFi to in-car USB port,

Maybe the USB is the complicated way to think about your problem. How about; A: using a Rpi like an internet radio and using the headphone jack into the aux on your radio. I have found that sony android is superior at "throwing" sound to media players vs samsung android B: Just using Bluetooth adapt...
by maurice1
Tue Feb 16, 2016 6:04 pm
Forum: Automation, sensing and robotics
Topic: A few questions about my 433MHz automation plan
Replies: 8
Views: 3562

Re: A few questions about my 433MHz automation plan

I tried this https://github.com/dmcg/raspberry-strogonanoff and it works fine for the maplin http://www.maplin.co.uk/p/remote-controlled-mains-sockets-5-pack-n38hn However it does need wiring pi In the end I just used an arduino uno with ethernet shield and set it up as a webserver. I use the cron o...

Go to advanced search