Go to advanced search

by techpaul
Mon Mar 31, 2014 8:13 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI noise based on CPU load
Replies: 5
Views: 1901

Re: SPI noise based on CPU load

All still suggests pickup noise and wiring/screening issues. Your median filter could be right and normal wrong. Median meaning the middle value of 'n' where 'n' is usually an odd number. Changing the delay is changing the sampling frequency and will have affect especially if capacitance on inputs i...
by techpaul
Sun Mar 30, 2014 9:34 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI Chip Select line (CE0) goes low after transmittin
Replies: 8
Views: 6150

Re: SPI Chip Select line (CE0) goes low after transmittin

Mostly likely this is end of programme and the spidev closing the SPI port and reverting to some previous state. Also affects CLK as well with glitch

What happens on a trace if you put a time.sleep( 100 ) before the return? (need to import time as well)
Most likely this CS going low will move.
by techpaul
Sun Mar 30, 2014 9:30 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI noise based on CPU load
Replies: 5
Views: 1901

Re: SPI noise based on CPU load

Would need to see hardware setup as the audio output could be interfering with your analog inputs and nothing to do with CPU load but electrical/magnetc interference in your setup. If the wiring of the audio output is not run cleanly and your analog inputs are not shielded or grounded properly they ...
by techpaul
Fri Mar 28, 2014 5:30 pm
Forum: Automation, sensing and robotics
Topic: Switch Sansmart Relay with 2N5551 or 2N5401?
Replies: 18
Views: 5148

Re: Switch Sansmart Relay with 2N5551 or 2N5401?

One GND connection on ULN2803 connected to Pi gnd and power supply for the opto side of the relay card.

You dont need the resisitors they are internal to the ULN2803, wire from GPIO to inputs of ULN2803.

Makes wiring easier

Plenty of examples with ULN2803 about can be found with searches.
by techpaul
Wed Mar 26, 2014 10:26 am
Forum: Python
Topic: Bit banging to read/write RDS info
Replies: 141
Views: 17407

Re: Bit banging to read/write RDS info

joan wrote:The funny little pseudo code was based on that found at the end of http://www.robot-electronics.co.uk/acat ... orial.html
Note that source uses two open drain GPIO on that micro for driving signals, and a further two GPIO inputs for reading.
by techpaul
Wed Mar 26, 2014 9:29 am
Forum: Python
Topic: Bit banging to read/write RDS info
Replies: 141
Views: 17407

Re: Bit banging to read/write RDS info

Personally this thread is less to do with Python and more to do with I2C interfacing
by techpaul
Wed Mar 26, 2014 9:22 am
Forum: Python
Topic: Bit banging to read/write RDS info
Replies: 141
Views: 17407

Re: Bit banging to read/write RDS info

The funny little pseudo code was based on that found at the end of http://www.robot-electronics.co.uk/acatalog/I2C_Tutorial.html I recommend that as a source. That explains some of the quirks I found odd like excessive delays in start function, as a lot of bit banging I2C code does, it makes a few ...
by techpaul
Mon Mar 24, 2014 11:48 pm
Forum: Python
Topic: Bit banging to read/write RDS info
Replies: 141
Views: 17407

Re: Bit banging to read/write RDS info

drlucas wrote:Must be late in the day...or my math sucks...

My address in base 10 is 214, so do I double that to get 428 than convert to base 16 0X1AC and use just AC as the value?
Read back through the thread where I say I2C addresses are only 7 bit
by techpaul
Sun Mar 23, 2014 1:44 pm
Forum: Automation, sensing and robotics
Topic: Switch Sansmart Relay with 2N5551 or 2N5401?
Replies: 18
Views: 5148

Re: Switch Sansmart Relay with 2N5551 or 2N5401?

Put capacitors (6V or greater working voltage) across the (+) and (-) rails on your breadboard close to where the power comes in from power supply. These provide smoothing of power by allowing current to flow out during minor dips in power and absorb some of the spikes. Using two values in parallel ...
by techpaul
Sun Mar 23, 2014 1:27 pm
Forum: Python
Topic: Bit banging to read/write RDS info
Replies: 141
Views: 17407

Re: Bit banging to read/write RDS info

Plenty of examples good bad and indifferent out there, in many languages. Try google "bit banging I2C" for a start, this could be a good start point http://hackaday.com/2013/08/11/bitbanging-i2c-by-hand/ or this application note http://ww1.microchip.com/downloads/en/AppNotes/00001488B.pdf or even th...
by techpaul
Sun Mar 23, 2014 12:48 am
Forum: Python
Topic: Bit banging to read/write RDS info
Replies: 141
Views: 17407

Re: Bit banging to read/write RDS info

The problem with bit banging I2C even with software control is really need external logic and for SDA have an open collector/drain driver for what the Pi sends and another pin to read the data back, send the data slowly and serialise it in software. There are many examples around the net and this ca...
by techpaul
Sun Mar 23, 2014 12:29 am
Forum: Automation, sensing and robotics
Topic: Switch Sansmart Relay with 2N5551 or 2N5401?
Replies: 18
Views: 5148

Re: Switch Sansmart Relay with 2N5551 or 2N5401?

Hi techpaul, You are right, with the 2,2 kOhm I can measure 1,4mA at the base. But I see some strange issues arising when using the same power-supply for the Pi and the relay. With inductive loads (relays/motors) it is often better to use a seperate psu for the relay power and as the board has opto...
by techpaul
Sat Mar 22, 2014 11:56 pm
Forum: Automation, sensing and robotics
Topic: Switch Sansmart Relay with 2N5551 or 2N5401?
Replies: 18
Views: 5148

Re: Switch Sansmart Relay with 2N5551 or 2N5401?

Ok, I think I found the issue, I made the micro usb cable shorter and a direct connection without temporary clamps etc and now it seems to be stable again :oops: But still when the Pi is shut down / rebooting / turns on the relay also turns on. (the leds light up on the relay board for the channels...
by techpaul
Sat Mar 22, 2014 10:57 am
Forum: Automation, sensing and robotics
Topic: Switch Sansmart Relay with 2N5551 or 2N5401?
Replies: 18
Views: 5148

Re: Switch Sansmart Relay with 2N5551 or 2N5401?

I tried the following setup: ... GPIO 17 -> 10 kOhm -> GND GPIO 17 -> 2,2 kOhm -> Base Emitter -> GND Collector -> IN1 (Relay) Assuming you are using 2N5551 as you said earlier When I switch on the power for the relay it starts and all relays are off. (indicator LED is not shining per channel) I sw...
by techpaul
Fri Mar 21, 2014 10:01 pm
Forum: Beginners
Topic: More Python SQLite syntax problems
Replies: 10
Views: 2530

Re: More Python SQLite syntax problems

Did you keep a copy of previous working version ?

If so try that first

Then check each line for differences or use command line utility 'diff' to give you list of actual differences

This assumes you do keep old working versions as any good programmer would.

Also how did you delete the old table?
by techpaul
Fri Mar 21, 2014 7:49 pm
Forum: Beginners
Topic: More Python SQLite syntax problems
Replies: 10
Views: 2530

Re: More Python SQLite syntax problems

If table already exists have you manually added an extra column with a default value like 0 ?

You may be trying to write more columns than table has
by techpaul
Fri Mar 21, 2014 7:46 pm
Forum: Automation, sensing and robotics
Topic: Switch Sansmart Relay with 2N5551 or 2N5401?
Replies: 18
Views: 5148

Re: Switch Sansmart Relay with 2N5551 or 2N5401?

In this case you are using it as a switch and the collector current is limited by the resistro on teh Sainsmart elay board opto coupler. As long as you get a good gain on the transistor you will find a wide spread of resistor values will work in this situation. Assume hfe of about 100 and aim for ba...
by techpaul
Fri Mar 21, 2014 11:26 am
Forum: Other projects
Topic: RS-232 Console server
Replies: 3
Views: 1021

Re: RS-232 Console server

The smaller footprint and power consumption configuration is 6 x MAX3232 each to its own DB9, this avoids relay contact switching and bouncing giving erroreous break and other problems to your servers (eg random CTRL-C or CTRL-Z or CTRL-D). TTL multiplexers using something like 74xx151 for RX data m...
by techpaul
Fri Mar 21, 2014 11:09 am
Forum: Automation, sensing and robotics
Topic: Switch Sansmart Relay with 2N5551 or 2N5401?
Replies: 18
Views: 5148

Re: Switch Sansmart Relay with 2N5551 or 2N5401?

Probably because with 8 opto couplers each using 15 to 20 mA on their opto, you get 8 x 15ma = 120 mA to 8 x 20mA = 160mA. All of which means with all on the chances of overheating and other out of spec limits for GPIO. Putting a buffer in is sensible to avoid issues of overloading the GPIO current ...
by techpaul
Fri Mar 21, 2014 9:43 am
Forum: Automation, sensing and robotics
Topic: Switch Sansmart Relay with 2N5551 or 2N5401?
Replies: 18
Views: 5148

Re: Switch Sansmart Relay with 2N5551 or 2N5401?

Hi techpaul, I didn't like the idea of skipping the fuses and just am using the USB power with a customized cable that connects to a switching power supply: The diagram you linked to was connecting to TP1 and TP2 not the USB connector. TP1 and TP2 are the same as the GPIO pins after the fuse for th...
by techpaul
Fri Mar 21, 2014 12:48 am
Forum: Python
Topic: Bit banging to read/write RDS info
Replies: 141
Views: 17407

Re: Bit banging to read/write RDS info

Unfortunately too far for me :D
by techpaul
Fri Mar 21, 2014 12:45 am
Forum: Automation, sensing and robotics
Topic: Switch Sansmart Relay with 2N5551 or 2N5401?
Replies: 18
Views: 5148

Re: Switch Sansmart Relay with 2N5551 or 2N5401?

First suggestion if adding power not via USB, then instead of soldering to TP1 and TP2, It would be easier to use P1 pins 2 for 5V and 6 or 14 or 20 or 9 or 25 for GND, its the same points on the circuit.
by techpaul
Fri Mar 21, 2014 12:37 am
Forum: Python
Topic: Bit banging to read/write RDS info
Replies: 141
Views: 17407

Re: Bit banging to read/write RDS info

If folks knew where you are they might be able to help in person or suggest someone.

Not knowing where you are makes it difficult to put on another test bench
by techpaul
Thu Mar 20, 2014 7:59 pm
Forum: Teaching and learning resources
Topic: Official Raspberry Pi/Programming Curriculum available?
Replies: 3
Views: 2701

Re: Official Raspberry Pi/Programming Curriculum available?

Also search exam boards like AQA and OCR for recipes and examples.

I know OCR have a bunch I wrote some of them :D

Go to advanced search