Go to advanced search

by ddahms
Fri Aug 30, 2019 9:07 pm
Forum: Camera board
Topic: Custom lens shading tables
Replies: 81
Views: 13896

Re: Custom lens shading tables

Mrlbppy:

Try doing rpi-update now. The initial implementation of the new AWB algorithm had a bug which broke the lens shading tables. It has been fixed in the newest firmware which rpi-update will install.
by ddahms
Thu Jun 06, 2019 8:45 pm
Forum: Camera board
Topic: New AWB algorithm in test firmware
Replies: 22
Views: 2806

Re: New AWB algorithm in test firmware

I gave it a try. I have a v1 camera. On a sunny midday scene, I see no difference between mode 0 and 1. On a dusk scene, mode 0 has an overall reddish tint like it always did while mode 1 is less reddish, which is an improvement. There is one minor side effect: in mode 1, the version of Raspistill t...
by ddahms
Fri May 17, 2019 5:42 pm
Forum: C/C++
Topic: SparkFun LIS3DH SPI communication using wiringPi
Replies: 4
Views: 1161

Re: SparkFun LIS3DH SPI communication using wiringPi

One minor problem is that you declare buffer[10] but then put 11 things into it. However I think the problem is more basic than that. There is an app note on the Sparkfun site (here) that explains the registers and the initialization procedure.
by ddahms
Tue Apr 10, 2018 5:08 pm
Forum: Automation, sensing and robotics
Topic: how to control 24VDC valve with ULN2803A?
Replies: 25
Views: 2841

Re: how to control 24VDC valve with ULN2803A?

The "+24Vdc to pin 18 of the ULN 2803A" connection should be removed. Additionally you must attach the other wire from the +24V supply to the "GND of RPi to pin 9 of the ULN2803A" connection that you already made.
by ddahms
Mon Mar 12, 2018 2:14 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP3008 troubleshooting
Replies: 33
Views: 5262

Re: MCP3008 troubleshooting

I agree that it is highly unlikely you have managed to damage just the SPI section of the chip on two separate Pi boards. Are you moving the SD card back and forth between the two PIs? About all I can suggest now is to try a fresh install of minimal Raspbian, use raspi-config to enable SPI only, con...
by ddahms
Sat Mar 10, 2018 4:08 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP3008 troubleshooting
Replies: 33
Views: 5262

Re: MCP3008 troubleshooting

I ran the loopback test on my own Pi. Curiously, the C version passed but the Python version failed. This is because the C version sets the transfer speed and the Python version does not, so it runs at the default speed of 125MHz and it can't even keep up with itself. Slowing that down by inserting ...
by ddahms
Thu Mar 08, 2018 8:06 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP3008 troubleshooting
Replies: 33
Views: 5262

Re: MCP3008 troubleshooting

As I understand the situation, presently it works using software-SPI and returns believable values. With hardware-SPI, it always returns zeros, and Piscope shows the SPI signals don't even move. To me, this feels like a Pi software or configuration issue. Does the /dev/spidev0.0 file exist, with crw...
by ddahms
Thu Mar 08, 2018 2:43 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP3008 troubleshooting
Replies: 33
Views: 5262

Re: MCP3008 troubleshooting

I suggest one easy experiment--move your green wire to GND instead of 3,3V and see if your reading of 1023 changes to 0. This will tell you if the Pi is actually talking to the chip or not. If it does change, then try connecting 1 or 2 volts to pin 1 and see what reading it gives. You can create tha...
by ddahms
Sat Feb 24, 2018 2:47 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Reading Values from 12-bit ADC with Python with I2C
Replies: 7
Views: 2802

Re: Reading Values from 12-bit ADC with Python with I2C

The datasheet says to put a 2.2uF cap on Vref pin 20, and a 10uF and 0.1uF cap on REFCOMP pin 1. Perhaps your circuit is oscillating without these caps. It might not be the cause of your problem but it can't hurt.
by ddahms
Tue Feb 13, 2018 6:15 pm
Forum: Beginners
Topic: set up SSd1331 OLED for pi3. Please help.
Replies: 2
Views: 567

Re: set up SSd1331 OLED for pi3. Please help.

The python code in the repo uses different pins than you have specified. Several places in the code it says: SSD1331_PIN_CS = 23 SSD1331_PIN_DC = 24 SSD1331_PIN_RST = 25 which is different than your wiring. Those are GPIO numbers, not pins on the connector. Look carefully at the wiring diagram in th...
by ddahms
Tue Feb 13, 2018 4:35 pm
Forum: Beginners
Topic: i2c or spi?
Replies: 12
Views: 1416

Re: i2c or spi?

This repo has example code and a pictorial connection diagram.
https://gist.github.com/TheRayTracer/dd ... ecb9b8b47f
by ddahms
Thu Feb 08, 2018 5:34 pm
Forum: Beginners
Topic: i2c or spi?
Replies: 12
Views: 1416

Re: i2c or spi?

I think the board labels are confusing. The SSD1331 chip supports SPI (plus two archaic parallel modes) but not I2C. The SSD1331 datasheet and board schematic are in the rar. In SPI mode, data goes in on the D1 pin of the chip which is labeled SDA on the board. Clk goes in on D0 which is labeled SCL...
by ddahms
Thu Sep 28, 2017 4:19 pm
Forum: Camera board
Topic: 8mp Camera Optical Zoom Lens options
Replies: 2
Views: 2126

Re: 8mp Camera Optical Zoom Lens options

To use a lens like this, you have to remove the camera's existing lens, by unscrewing it from the camera body. Then you need a M12 lens holder to hold the new lens in position. Generic ones are readily available on eBay but they need some mechanical modifications to fit on a Pi camera. M12lenses.com...
by ddahms
Wed Aug 16, 2017 3:04 pm
Forum: Camera board
Topic: Custom lens shading tables
Replies: 81
Views: 13896

Re: Custom lens shading tables

Everything I tried seemed to have no effect, and I discovered why. The lens_shading_analyse program writes the file "ls_table.h" but RaspiStill.c includes the file "ls_grid.h" and completely ignores "ls_table.h". I had copied ls_grid.h from 6x9's repo along with the modified RaspiStill.c. Renaming m...
by ddahms
Sun Aug 13, 2017 9:32 pm
Forum: Camera board
Topic: Custom lens shading tables
Replies: 81
Views: 13896

Re: Custom lens shading tables

I gave this a try. It definitely changed the colors of the image but it still looks wrong. My camera is a v1.3 with a 3.6mm M12 lens (because I screwed up the original lens by trying to clean it). I think I followed your procedure correctly: point camera at white cardboard, run "raspistill -o std.jp...
by ddahms
Thu Apr 27, 2017 2:04 am
Forum: Camera board
Topic: Stripping the camera cable?
Replies: 3
Views: 1178

Re: Stripping the camera cable?

Try removing the insulation with some fine sandpaper wrapped around a wooden block. You must reapply that stiff 8x16mm blue plastic backer so the cable is sufficiently thick to engage with the connector. Just peel it off the original cable, flatten it out, and super-glue it to the back of the white ...
by ddahms
Sat Apr 22, 2017 2:26 am
Forum: Advanced users
Topic: Read 74HC595 State?
Replies: 4
Views: 1083

Re: Read 74HC595 State?

I agree with the previous posts--just keep the data in memory. It only takes one byte. However, if you really want to read it back, you don't need extra hardware. I believe you could read it back through SPI. Connect QH' (pin 9) to MISO on the Pi. Then do a one byte SPI transfer which will read the ...
by ddahms
Fri Mar 03, 2017 8:17 pm
Forum: Camera board
Topic: Disabling ISP processing blocks
Replies: 35
Views: 8619

Re: Disabling ISP processing blocks

FWIW I tried using this new feature to disable lens shading and it worked for me, in a tweaked version of raspistill.

It looks like “lens shading” includes both the software compensations for the red-to-cyan radial color gradient as well as the darker periphery of standard vignetting.
by ddahms
Mon Oct 17, 2016 7:32 pm
Forum: Automation, sensing and robotics
Topic: EMI suppression for inductive AC loads
Replies: 7
Views: 1808

Re: EMI suppression for inductive AC loads

Although my commercial sprinkler controller uses triacs, it has a MOV across each one. Its part number is S10K30 and it has a 47V breakdown voltage. They are available from DigiKey . You could try a 0.1uF capacitor across the load, without any series resistor. You do have the DC power to the Pi sepa...
by ddahms
Sat Oct 15, 2016 11:04 pm
Forum: Camera board
Topic: red circle in center of image
Replies: 3
Views: 724

Re: red circle in center of image

It sounds like you are seeing the dynamic lens shading problem. Try adding -st to your raspistill command line.

For more info, see this post. There is another potential fix described near the end
by ddahms
Sun Apr 24, 2016 2:55 am
Forum: Camera board
Topic: Cyan vignetting after rpi-update
Replies: 42
Views: 12647

Re: Cyan vignetting after rpi-update

6x9 -- I checked your new test firmware with "ov5647_acls=1" in /boot/config.txt and no -st flag. The images look good--no cyan vignette. However the overall color balance is a bit different. Adding -st again shifts it back.
by ddahms
Wed Mar 02, 2016 6:29 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Sampling LM35 with MCP3008 from distant
Replies: 12
Views: 2536

Re: Sampling LM35 with MCP3008 from distant

You would need to know the frequency distribution and amplitude of the induced noise to make a calculation, which you don't have. The 0.1uF cap is a commonly used value for general noise filtering, such as bypassing power supplies. It may be larger than absolutely necessary, but that's ok. There's a...
by ddahms
Tue Mar 01, 2016 7:15 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Sampling LM35 with MCP3008 from distant
Replies: 12
Views: 2536

Re: Sampling LM35 with MCP3008 from distant

The capacitor IS in parallel with the wire. The purpose of the capacitor is to eliminate the spurious noise that is being induced in the long wires without affecting the DC voltage level coming from the LM35.
lm35.png
this is what I mean
lm35.png (1.97 KiB) Viewed 2125 times
by ddahms
Sun Feb 28, 2016 6:27 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Sampling LM35 with MCP3008 from distant
Replies: 12
Views: 2536

Re: Sampling LM35 with MCP3008 from distant

No, the capacitor is not in series with the signal. The LM35 Vout still goes directly to the MCP3008 input as you already have it. The proposed capacitor goes from that same input to ground. It should be located near the MCP3008. Since your circuit works with a short wire and fails with a long wire,...
by ddahms
Sat Feb 27, 2016 7:38 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Sampling LM35 with MCP3008 from distant
Replies: 12
Views: 2536

Re: Sampling LM35 with MCP3008 from distant

An easy fix that might work is to put a 0.1uF capacitor between the MCP3008 input and ground.

Go to advanced search