Go to advanced search

by danjperron
Sat Apr 20, 2019 9:50 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 32 digital optocoupled inputs cheap solution
Replies: 4
Views: 151

Re: 32 digital optocoupled inputs cheap solution

Thank you for your suggestion! Maybe I will try this in another project. Meanwhile, do you have any links to projects using any of these setups? CANBUS I was using 1 cpu to control a lot of things but after readings an article I change my mind and use mutliple cpus with a bus. Doing this help me to...
by danjperron
Tue Apr 16, 2019 7:26 pm
Forum: Graphics, sound and multimedia
Topic: RPI control WS2812B LEDS with pwm chip
Replies: 3
Views: 73

Re: RPI control WS2812B LEDS with pwm chip

Could you explain the PWM hack you don't want.


This is the SPI hack.
viewtopic.php?f=44&t=182755&hilit=neopixel
by danjperron
Sun Apr 14, 2019 10:02 pm
Forum: Français
Topic: Securiser mon acces exterieur du Raspi
Replies: 8
Views: 448

Re: Securiser mon acces exterieur du Raspi

pour un openpvn, j'ai fait une présentation sur ce sujet.
https://www.dropbox.com/s/xww3ou8ityebh ... .pptx?dl=1

Daniel
by danjperron
Fri Apr 12, 2019 10:31 pm
Forum: Troubleshooting
Topic: AM2302 (dht22) quit
Replies: 4
Views: 83

Re: AM2302 (dht22) quit

this is what I found about this device. If it doesn't work , power it off and it works again.
by danjperron
Fri Apr 12, 2019 7:00 pm
Forum: Troubleshooting
Topic: AM2302 (dht22) quit
Replies: 4
Views: 83

Re: AM2302 (dht22) quit

This is a known problem with the DHT22. Sometimes for no reason it just stop.

This is why I used pigpiod python script version and not Adafruit version. The pigpiod version use another pin to power the DHT22. If the reading failed the script power cycle the DHT22 and it is working again.


Daniel
by danjperron
Thu Apr 11, 2019 11:11 am
Forum: Troubleshooting
Topic: Value too large for defined data type on files larger than 2GB
Replies: 8
Views: 1523

Re: Value too large for defined data type on files larger than 2GB

On rar and unrar ,could you pipe the output to the split command ? When I compress file using zip for example I used the split command. ex: To image partition1 of an hard disk I used the command. dd if=/dev/sda1 | gzip -1 -c | split -b 1GB - sda1.img.gz. and to restore cat sda1.img.gz.* | gzip -dc |...
by danjperron
Sun Apr 07, 2019 5:43 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: DS18B20 Max Distance
Replies: 41
Views: 41300

Re: DS18B20 Max Distance

Maybe I'm a little out of topic but did you consider to use another bus system. I did make some module using RS-485 using Pic and Arduino board. The RS-485 could be up to 1200 meters in distance and it you will able to send or receive any kind of IOs. Maybe you want to check water tank level, humidi...
by danjperron
Fri Mar 29, 2019 3:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: DS18B20 Max Distance
Replies: 41
Views: 41300

Re: DS18B20 Max Distance

Yes a small cap at the the power and gnd of each sensor is a good idea. This reduces the spike when the sensor transmit data. The gnd wire is affected and could cause voltage drop. The best way to check your problem will be with an oscilloscope. This way you could check voltage drop, rise time and a...
by danjperron
Wed Mar 27, 2019 3:52 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI CS/CE with active high
Replies: 38
Views: 1807

Re: SPI CS/CE with active high

My son was at Mannheim for three month last year ;-) when he was doing is Europe tour. Since I don't know where is the inversion located for you, on the write part switch the byte for i in range(len(data)//2): data16bits.append(data[i*2+1] | data[(i*2)] << 8) instead of for i in range(len(data)//2):...
by danjperron
Tue Mar 26, 2019 4:15 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI CS/CE with active high
Replies: 38
Views: 1807

Re: SPI CS/CE with active high

What for an analyzer do you use ? I bought an oscilloscope Hantek DSO5202D . I Got some problems with it but in overall it does the job. On Bangood you have a cheaper version which is MSO5202D. Looks the same! I paid a couple of hundred , $CA money, more than the current price three 3 years ago. Bu...
by danjperron
Tue Mar 26, 2019 11:35 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI CS/CE with active high
Replies: 38
Views: 1807

Re: SPI CS/CE with active high

IF this log file is yours then everything works!

What kind of logic analyzer? did you set the system for CMOS 3.3V?

The picture I posted from my scope , I did set then digital pins to CMOS and put the trigger at 1.6V!
by danjperron
Mon Mar 25, 2019 1:01 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI CS/CE with active high
Replies: 38
Views: 1807

Re: SPI CS/CE with active high

The latest script is for 8 bits. So big or little endian doesn't matter. Only one byte.
by danjperron
Mon Mar 25, 2019 11:08 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI CS/CE with active high
Replies: 38
Views: 1807

Re: SPI CS/CE with active high

Please take a picture of your setup. Try 8 bits also. #!/usr/bin/python3 import eerom93CX6 file=open("eerom.dat","wb") eerom = eerom93CX6.eerom93CX6(9346,org=0,CS=22,SK=23,DI=24,DO=25) for i in range(eerom.size): v = eerom.read(i) if i % 8 == 0: print("{:03X} : ".format(i),end="") print("{:02X} ".fo...
by danjperron
Sat Mar 23, 2019 9:40 pm
Forum: Python
Topic: Solved: Formatting an integer to be passed to Serial as a single char.
Replies: 7
Views: 175

Re: Formatting an integer to be passed to Serial as a single char.

maybe

ser.write(AK.to_bytes(1,byteorder='big'))
by danjperron
Sat Mar 23, 2019 9:20 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 32 digital optocoupled inputs cheap solution
Replies: 4
Views: 151

Re: 32 digital optocoupled inputs cheap solution

Why not using some esp8266 or esp32 in wifi mode or arduino using an RF24L01 transmitter. it simplifies the wiring by a lot and no problem to isolate each devices. MQTT protocol using mosquitto on the PI is very easy to install. All devices will send and receive data from it and the Pi will control ...
by danjperron
Fri Mar 22, 2019 10:38 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI CS/CE with active high
Replies: 38
Views: 1807

Re: SPI CS/CE with active high

I got a 93C46B from microchip. it works but only on 16 bits. the org pin is N.A. The Holtek works fine but the map is split by MSB and LSB value. pi@PiA:~ $ python3 write93C46.py Hello.dat From file Hello.dat to eerom. BitMasK= 32 addressRange= 6 size= 64 Writing eerom 000 : FEFF 0048 0065 006C 006C...
by danjperron
Fri Mar 22, 2019 10:58 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI CS/CE with active high
Replies: 38
Views: 1807

Re: SPI CS/CE with active high

- do you have connected the unused pin 7 from the 93c46 to GND or is your open ? No I let it open. - from where are the hex values 0xFEFF comming at address 0x00 ? I understand that's a byte order mark. But is this only from your converting or will this value automatic set while the EEPROM write op...
by danjperron
Fri Mar 22, 2019 2:36 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI CS/CE with active high
Replies: 38
Views: 1807

Re: SPI CS/CE with active high

Ok I tried my latest code with 8/16 bits capability. I had no problem at all. Both of my old Raspberry Pi model B are in use but my Pi model A was available! https://dl.dropboxusercontent.com/s/mnbx7ouyg30kicn/EEROM93C46_on_PIA.jpg I'm using 2K/3K3 on DO to reduce the 5V to 3.3V. I used the same col...
by danjperron
Thu Mar 21, 2019 2:53 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI CS/CE with active high
Replies: 38
Views: 1807

Re: SPI CS/CE with active high

OK! you are using 16 bits. I'm using 8 bits ! you should split your 16 bits into two 8 bits. My ORG pin is at GND for 8 bits operation. I will have to check , on 16 bits, what is the memory bank behavior. I hope that 16 bits address 0 is 8 bits address 0(LSB) and 1 (MSB). Daniel Note to myself . I C...
by danjperron
Thu Mar 21, 2019 11:15 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI CS/CE with active high
Replies: 38
Views: 1807

Re: SPI CS/CE with active high

In your screenshot it is good to see that your script begin the transfer with the bit combination 0110 (CS is high and the SK with rising edge). If I understand the Atmel guide correct the read operation should start with the bit sequense 110 (not with the first 0). You have to read between the lin...
by danjperron
Thu Mar 21, 2019 2:55 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI CS/CE with active high
Replies: 38
Views: 1807

Re: SPI CS/CE with active high

Mario, I didn't check your python script yet but I had 2 errors on my post. #1 Error on Fritzing design. pin1 of 93CX6 needs to be on GPIO12 not on GND. (Correct in the python script). #2 Error on write93C56.py line 9 I should have used bracket and not parentheses. I was using the default file eerom...
by danjperron
Wed Mar 20, 2019 6:19 pm
Forum: Advanced users
Topic: Why is or are PCF857x IO expansion modules always low trigger for output?
Replies: 2
Views: 103

Re: Why is or are PCF857x IO expansion modules always low trigger for output?

Pcf8574 are kind of open collector output.

This allows the pins to be an input when the ouput is high because there is a small pullup current.


Use MCP23017 instead!
by danjperron
Mon Mar 18, 2019 7:54 pm
Forum: Troubleshooting
Topic: RFID-RC522
Replies: 2
Views: 71

Re: RFID-RC522

Tu peux essayer ma version. j'ai modifié la version pour utiliser spidev au lieu de SPI et python3. 1 - vérifie si le SPI est fonctionnel! sudo raspi-config , interface, SPI Tu peux vérifier avec la commande pi@Pihome:~ $ ls -l /dev/spi* crw-rw---- 1 root spi 153, 0 fév 9 22:29 /dev/spidev0.0 crw-rw...
by danjperron
Thu Mar 14, 2019 2:41 pm
Forum: Troubleshooting
Topic: Ultrasonic sensor stops working a few minutes later.
Replies: 2
Views: 77

Re: Ultrasonic sensor stops working a few minutes later.

No wonder.

You should put timeout in your loop


The Raspberry Pi is not a real time os. It could have execute another task and when it returns to continue this task it missed the pulse.

Go to advanced search