Go to advanced search

by danjperron
Wed Apr 24, 2019 2:52 pm
Forum: Français
Topic: Transmission de données
Replies: 2
Views: 43

Re: Transmission de données

Deux méthodes, Méthode 1 . Base SQL. Enregistre les données dans un banque de données. Ensuite tu n'auras qu'a utiliser PHP pour questionner ta banque de données. Méthode 2. MQTT Utilise un serveur mosquitto pour envoyer et recevoir les données de tes capteurs. Il est aussi très facile de lire les "...
by danjperron
Wed Apr 24, 2019 2:33 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: [Solved] How to read MIFARE DESfire EV2 tags with MFRC522 properly?
Replies: 9
Views: 1186

Re: [Solved] How to read MIFARE DESfire EV2 tags with MFRC522 properly?

@atika13. No need for a tuto it is straightforward. (Also there is a lot of doc , a little bit out of date, on the net). - enable SPI sudo raspi-config , 5 Interfacing option, P4 SPI, Yes, finish You could test if the SPI is enabled using this command ls -l /dev/spi* if /dev/spidev0.0 and /dev/spide...
by danjperron
Wed Apr 24, 2019 1:28 pm
Forum: Beginners
Topic: is dead 3V3 a widespread issue?
Replies: 13
Views: 293

Re: is dead 3V3 a widespread issue?

I do have a lot of Raspberry Pi . From the first model to the latest one. They all have been abused but the only one I did manage to damage was the PI3B+. I hook up a protoboard without disconnect the power on the PI and the coupling capacitor on the protoboard was enough to blow the 3.3V on it. Sin...
by danjperron
Tue Apr 23, 2019 7:15 pm
Forum: Python
Topic: Controlling LED strip from GPIO Help?
Replies: 4
Views: 83

Re: Controlling LED strip from GPIO Help?

There is a third one using the SPI.

viewtopic.php?f=44&t=182755&hilit=neopixel
by danjperron
Tue Apr 23, 2019 2:38 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: [python] MCP3021 resolution
Replies: 1
Views: 43

Re: [python] MCP3021 resolution

First you need to read 2 bytes without command byte. Check page 18 from http://ww1.microchip.com/downloads/en/DeviceDoc/20001805C.pdf SMBus doesn't support it! You need to use IOCTL. #!/usr/bin/env python import io import fcntl import time I2C_SLAVE_COMMAND=0x0703 i2c_address = 0x4d FileHandle = io....
by danjperron
Mon Apr 22, 2019 11:21 pm
Forum: Troubleshooting
Topic: Dropout of text via serial connection to pi zero via TTL cable.
Replies: 14
Views: 198

Re: Dropout of text via serial connection to pi zero via TTL cable.

The CP2102 USB-UART chip is 3.3V TTL. Look up the specs for yourself if you don't believe me. Thanks I believe that your USB to serial TTL is 3.3V, But since you are not the one with the problem I can't tell if his USB adapter is 3.3V or 5V. jjo998 didn't put any link to his model just a generic na...
by danjperron
Mon Apr 22, 2019 10:49 pm
Forum: General discussion
Topic: analog output with raspberry pi (not PWM)
Replies: 3
Views: 109

Re: analog output with raspberry pi (not PWM)

MCP4822 are cheap and are 12bits. This is what I used to control 0..5V Motors controllers.


PWM is still valid if you add a RC filter.
by danjperron
Mon Apr 22, 2019 7:44 pm
Forum: Troubleshooting
Topic: Dropout of text via serial connection to pi zero via TTL cable.
Replies: 14
Views: 198

Re: Dropout of text via serial connection to pi zero via TTL cable.

Yes but be sure that the TTL going to your GPIO15(RXD0) is 3.3V and not 5V. It will work and suddenly stop working.

If it is the case a simple 2K/3k resistor divider will do the trick.

What is the specific part of that USB to serial adapter ?
by danjperron
Mon Apr 22, 2019 7:02 pm
Forum: Troubleshooting
Topic: Dropout of text via serial connection to pi zero via TTL cable.
Replies: 14
Views: 198

Re: Dropout of text via serial connection to pi zero via TTL cable.

Hum are you sure that this serial usb to ttl is 3.3v? If it is 5V there is good chance that you burned the pi zero gpio.
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: 166

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: 87

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: 481

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: 89

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: 89

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: 1552

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: 41414

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: 41414

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: 1842

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: 1842

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: 1842

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: 1842

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: 1842

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: 193

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: 166

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: 1842

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...

Go to advanced search