Go to advanced search

by BudBennett
Mon Jul 21, 2014 11:49 pm
Forum: Automation, sensing and robotics
Topic: 24-bit 16Channel ADC with 16 digital I/O expansion PCB
Replies: 24
Views: 15444

Re: 24-bit 16Channel ADC with 16 digital I/O expansion PCB

Hi etrash, My system has been running, without any detectable errors, since November of last year. I consider it pretty stable since it controls the heating system for my home. My resolution is about 18 bits, or 2.5uVrms on a 3.3V reference (which is the supply). I will check to see if my PCB softwa...
by BudBennett
Tue Mar 25, 2014 6:01 pm
Forum: Automation, sensing and robotics
Topic: Controlled Shutdown at Power Failure
Replies: 72
Views: 54080

Re: Controlled Shutdown at Power Failure

I made my PCB a public project on OSH Park. Here's the link: http://oshpark.com/shared_projects. It is named "HoldUp2+RTC". Date on the PCB bottom is 9 Sept. 2013. C4,C5: 0805. C1, C3, C6: 0603. C2 is a radial electrolytic with 2mm pin spacing, 5mm dia. Resistors are 0603, except for R4: 0805. I use...
by BudBennett
Mon Mar 24, 2014 10:02 pm
Forum: Automation, sensing and robotics
Topic: Controlled Shutdown at Power Failure
Replies: 72
Views: 54080

Re: Controlled Shutdown at Power Failure

The 32.788 kHz crystal can be ordered from http://www.taydaelectronics.com. They have good prices on the DS1307+ as well. We had an 18" snowfall about 3 weeks ago. The power must have cycled at least 15 times over a 15 hour period. The circuit rode through all of it - even the 2-3 events that occurr...
by BudBennett
Tue Feb 25, 2014 4:59 am
Forum: Automation, sensing and robotics
Topic: 24-bit 16Channel ADC with 16 digital I/O expansion PCB
Replies: 24
Views: 15444

Re: 24-bit 16Channel ADC with 16 digital I/O expansion PCB

I don't know... If your 32 levels span the full range of the ADC, then you're right. If they only occupy a fraction of the range then you will need either more bits or an amplifier. In any case you should be able to get what you want from six 16channel analog multiplexers, an amplifier, and a cheap ...
by BudBennett
Tue Feb 18, 2014 1:30 am
Forum: Python
Topic: How to calculate moving average
Replies: 15
Views: 4093

Re: How to calculate moving average

Try this: from collections import deque class rolling_avg : ''' returns a simple rolling average of n most recent values ''' def __init__(self, n=5,debug=False): "determine lengh of roll at instantiation" self.n = n self.xqueue = deque('') self.debug = debug def rolling_avg(self,x): # if the queue i...
by BudBennett
Sat Feb 08, 2014 2:15 pm
Forum: Automation, sensing and robotics
Topic: Controlled Shutdown at Power Failure
Replies: 72
Views: 54080

Re: Controlled Shutdown at Power Failure

I wouldn't recommend this approach for an automotive system - you've got a large battery already as a backup power source. I think that there are other threads dealing with 12V automotive systems.

Bud.
by BudBennett
Mon Dec 30, 2013 5:06 pm
Forum: Automation, sensing and robotics
Topic: 24-bit 16Channel ADC with 16 digital I/O expansion PCB
Replies: 24
Views: 15444

Re: 24-bit 16Channel ADC with 16 digital I/O expansion PCB

I spent a few hours trying to measure the noise floor of the ADC. It’s difficult, with my setup, to get an accurate number when dealing with microvolts. Some results: 1. 500-600nV rms noise for shorted differential inputs with no signal conditioning. Input offset voltage ~ 0.5-1 uV. This is equivale...
by BudBennett
Fri Dec 27, 2013 9:15 pm
Forum: Automation, sensing and robotics
Topic: 24-bit 16Channel ADC with 16 digital I/O expansion PCB
Replies: 24
Views: 15444

24-bit 16Channel ADC with 16 digital I/O expansion PCB

I just got this up and running and so far it appears to be working well. It is a single PCB containing an 8/16 channel 24-bit ADC (LTC2499) coupled with a 16 channel digital I/O (MCP23017). It replaces 4 prototype boards that I had stacked on top of each other to get the same functionality. It is a ...
by BudBennett
Sat Dec 21, 2013 6:45 pm
Forum: Automation, sensing and robotics
Topic: Controlled Shutdown at Power Failure
Replies: 72
Views: 54080

Re: Controlled Shutdown at Power Failure

There is no danger that the shutdown procedure will be interrupted. Once the power is gone for 2 seconds then the circuit latches the power fail state until the supercaps are discharged. If the power returns before the end of the super cap discharge cycle, the circuit waits until the supercaps trip ...
by BudBennett
Fri Dec 20, 2013 6:25 pm
Forum: Automation, sensing and robotics
Topic: Controlled Shutdown at Power Failure
Replies: 72
Views: 54080

Re: Controlled Shutdown at Power Failure

The supercaps hold up the supply for at least 5 minutes before they cutoff the supply voltage to the Pi. The first 30-45 seconds or so the Pi is running at 500mA and the balance of the time is spent idling at around 100mA. I don't think that you could get away with much less than 300F for the each c...
by BudBennett
Fri Dec 20, 2013 5:49 pm
Forum: Automation, sensing and robotics
Topic: Controlled Shutdown at Power Failure
Replies: 72
Views: 54080

Re: Controlled Shutdown at Power Failure

I don't know what you mean by performance, but I'll give a short summary. I bought two sets of D-cell sized supercaps from Digikey. The first set (of 2) was Maxwell 350F, 2.7V max rating, 3.2mOhm series resistance: http://www.digikey.com/product-detail/en/BCAP0350%20E270%20T11/1182-1016-ND/3079280 T...
by BudBennett
Fri Dec 20, 2013 3:58 pm
Forum: Automation, sensing and robotics
Topic: Controlled Shutdown at Power Failure
Replies: 72
Views: 54080

Re: Controlled Shutdown at Power Failure

Plan B is working well. It has gone through several short power failures and kept the system up and running as designed. The only problem I have with it is that it doesn't protect against hot plugging something into the USB port - the Pi resets and I have to remove power and restart after the superc...
by BudBennett
Sun Dec 08, 2013 5:11 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: High resolution Analog to Digital Converter [FOUND!]
Replies: 12
Views: 6204

Re: High resolution Analog to Digital Converter [FOUND!]

I've implemented a multi-sensor data acquisition system using the LTC2499 demo board coupled with the raspberry pi. The $50 demo board is an easy way to implement a bread board concept without the hassle of a custom PCB which is beyond the capabilities of most amateurs. Here's a few caveats that I f...
by BudBennett
Thu Dec 05, 2013 5:15 pm
Forum: Automation, sensing and robotics
Topic: Low power MOSFET to Launch the Pi
Replies: 13
Views: 3856

Re: Low power MOSFET to Launch the Pi

No Pi is an island... If I had to guess, which I am, I suspect that your peripherals are not connected to the same ground as the Pi. Therefore, when you turn off the N-fet and the ground pins of the Pi float upward they forward bias the input protection diodes connected to said peripherals. You shou...
by BudBennett
Fri Nov 29, 2013 12:02 am
Forum: Automation, sensing and robotics
Topic: Detecting 250VAC voltage/current of deep well pump motor
Replies: 45
Views: 16774

Re: Detecting 250VAC voltage/current of deep well pump motor

I use Diptrace. It is free for non-commercial use under 300 pins. For simulation I'm using LTSpice - like everybody else. It is a bit of a pain to interface between the two because Diptrace just spits out a net list that must be imported into LTSpice, but it is workable. Diptrace has schematic captu...
by BudBennett
Tue Nov 19, 2013 3:39 pm
Forum: Automation, sensing and robotics
Topic: Sensing AC motor on/off condition
Replies: 8
Views: 3229

Re: Sensing AC motor on/off condition

There are several threads dealing with this in this forum. I've dealt with this problem and have proposed solutions to both 250VAC voltage sensing and motor current sensing. See this post, which also has a link to a rather deep discussion of the topic: http://www.raspberrypi.org/phpBB3/viewtopic.php...
by BudBennett
Sat Nov 09, 2013 8:03 pm
Forum: Automation, sensing and robotics
Topic: Raspberry Pi Home Automation Ideas...
Replies: 30
Views: 35719

Re: Raspberry Pi Home Automation Ideas...

Hi Chris, Sorry for the slow response - I have not checked the forum in a while. I cobbled together my current system from several sources: The ADC is a demo board of the LTC2499, a 16-channel 24-bit ADC with I2C interface. The digital I/O is a MCP23017 built on the Adafruit Pi Plate ( and the ADC d...
by BudBennett
Wed Sep 18, 2013 2:06 pm
Forum: Automation, sensing and robotics
Topic: Detecting 250VAC voltage/current of deep well pump motor
Replies: 45
Views: 16774

Re: Detecting 250VAC voltage/current of deep well pump motor

Well, I received my PCBs and rated components and built the board. It works well - measured Vout ~ 200mV when 250VAC is present. End of story. VmonPCB1-s.jpg The only problem is that it only reports half of the information that I need to determine the status of the well and cistern. It turns out tha...
by BudBennett
Sun Sep 15, 2013 3:01 pm
Forum: Automation, sensing and robotics
Topic: Using the Pi to measure Decibels
Replies: 9
Views: 25385

Re: Using the Pi to measure Decibels

I would look at a true RMS to DC converter. LTC makes a chip for this - the LTC1967:http://www.linear.com/product/LTC1967. It appears to be easy to use with few additional components required. The biggest problem might be dealing with the surface mount MSOP package, but it doesn't have a exposed pad...
by BudBennett
Tue Aug 27, 2013 10:34 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Sainsmart SSR Wiring?
Replies: 5
Views: 5172

Re: Sainsmart SSR Wiring?

You should be able to drive the SSR input directly with the GPIO output. It will turn on at about 1.5V if I am interpreting the schematic correctly. Here's a schematic of a single channel:
OneRelayChannel.png
OneRelayChannel.png (26.59 KiB) Viewed 4899 times
by BudBennett
Tue Aug 27, 2013 8:39 pm
Forum: Automation, sensing and robotics
Topic: Detecting 250VAC voltage/current of deep well pump motor
Replies: 45
Views: 16774

Re: Detecting 250VAC voltage/current of deep well pump motor

Opto-Isolator 250VAC detector: This is the circuit that I initially implemented: optoDetector.png Fairchild Semiconductor has a handy data sheet that covers multiple general purpose transistor output optos - you can find it here: http://www.mbari.org/mars/images/4N37.pdf. The data sheet specifies t...
by BudBennett
Tue Aug 27, 2013 8:32 pm
Forum: Automation, sensing and robotics
Topic: Detecting 250VAC voltage/current of deep well pump motor
Replies: 45
Views: 16774

Detecting 250VAC voltage/current of deep well pump motor

My Project Rationale : I have a home automation project that I am just beginning. A 600 foot deep well provides water to my house. The well only produces 8 gallons/hour. Therefore I also have a 1700 gallon cistern to store the water before it is pumped into the house for use. There is a float valve...
by BudBennett
Tue Aug 13, 2013 11:53 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Issue: RTC DS1307 module in Raspberry Pi
Replies: 5
Views: 3409

Re: Issue: RTC DS1307 module in Raspberry Pi

Check the power supplies that you are using. The DS1307 is specified at 4.5-5.5VDC. The Raspberry Pi I2C interface runs at 3.3VDC. You will need a level translator to effectively communicate between the two. edit: I checked the DS1307 datasheet - it should be compatible with the 3.3V logic levels. S...
by BudBennett
Sun Aug 11, 2013 1:33 am
Forum: Automation, sensing and robotics
Topic: Controlled Shutdown at Power Failure
Replies: 72
Views: 54080

Re: Controlled Shutdown at Power Failure

Hi PaulV, With respect to your MOSFET RDSon issue: 1. I checked out the first 3 FETs that you listed against their data sheets. All of them are specified with VGS = -10V. The load curves don't go below VGS=-4.5V. I suggest that you get a logic level FET. I used a Si2305DS in my circuit - its RDSon i...
by BudBennett
Wed Aug 07, 2013 1:28 pm
Forum: Automation, sensing and robotics
Topic: Controlled Shutdown at Power Failure
Replies: 72
Views: 54080

Re: Controlled Shutdown at Power Failure

Thanks Paul, Here's my original calculation for sizing the supercaps: I/C = dV/dt I = 700mA (max Pi supply current - headless) dV = 200mV (from 4.95V to 4.75V) dt = 45 seconds Plug all the numbers in to get C = 157F, but double it to get the capacitance of each supercap since they will be in series....

Go to advanced search