Go to advanced search

by danjperron
Tue Sep 17, 2019 2:21 pm
Forum: General discussion
Topic: New Raspbian Buster and Thonny idle, "hate at first sight"
Replies: 15
Views: 390

Re: New Raspbian Buster and Thonny idle, "hate at first sight"

Hippy gives the answer in front of your nose.

in python3 it is tkinter
by danjperron
Mon Sep 09, 2019 12:32 am
Forum: Other projects
Topic: RFID/Electromagnetic Lock
Replies: 16
Views: 8305

Re: RFID/Electromagnetic Lock

I did made a presentation but I lost the video. This is my link about what I did https://dl.dropboxusercontent.com/s/tmec1wtix6e4nyv/RFID.pptx https://github.com/danjperron/MFRC522-python https://github.com/danjperron/modbusMFRC522 And one video from 2014 https://dl.dropboxusercontent.com/s/ihw0cqis...
by danjperron
Wed Sep 04, 2019 9:57 pm
Forum: General discussion
Topic: Mjpg-Streamer
Replies: 46
Views: 108944

Re: Mjpg-Streamer

@TheQWERTYCoder You do realize that you comment something I wrote in 2014! And yes at that time it was for an USB camera. The application mjpegstreamer is for mjpeg usb cam anyway. Why I will use that application with a none mjpeg camera. B.T.W. Is still the best web cam application for video stream...
by danjperron
Wed Sep 04, 2019 12:06 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI will not work with ADS8353
Replies: 7
Views: 256

Re: SPI will not work with ADS8353

You can't use xfer!

Like I said on my previous post
Then you need 48 clocks ( 6 bytes) to read the data. you need to use xfer2 in python.
xfer toggles the chip select on every byte. xfer2 won't! It will wait until the last byte is transferred.
by danjperron
Wed Aug 28, 2019 3:32 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI will not work with ADS8353
Replies: 7
Views: 256

Re: SPI will not work with ADS8353

but Raspberry can not communicate with ADC (only read data from ADC). You can't write ADC ! just read! Do you mean you can't write the configuration register! where is your code? If you want to read both ADC into the same SDI you need to set 32-CLK, Single-SDO Mode (CFR.B11 = 0, CFR.B10 = 1) Then y...
by danjperron
Tue Aug 27, 2019 12:56 am
Forum: Python
Topic: Help understanding 74HC595
Replies: 3
Views: 176

Re: Help understanding 74HC595

1.) Why exactly does 0x01 correspond to output 1, 0x02 correspond with output 2, etc? is the binary weight The 74HC595 is a shift register. When you clock the pin, bit 0 go to bit 1 and so on. bit 0 = 2 power 0 = 0x1 bit 1 = 2 power 1 = 0x2 .... bit 7 = 2 power 7 = 0x80 (128 in decimal) The binary ...
by danjperron
Sat Aug 24, 2019 12:08 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C - read_byte_data() error 121 with DC motor
Replies: 5
Views: 286

Re: I2C - read_byte_data() error 121 with DC motor

Could you put the motor controller on another power supply. At least put a LC filter at the power of your motor's driver. Add capacitors to your power line between 0 and 5V! 0.1µF in parallel with a 100µF. Also add a 0.1µF next to your i2c chip (gnd and digitial VCC has close has possible). Motor cr...
by danjperron
Wed Aug 21, 2019 2:52 pm
Forum: General discussion
Topic: 12 v for driving electromagnets PCA9685
Replies: 31
Views: 1076

Re: 12 v for driving electromagnets PCA9685

It looks ok but if you put your Mosfet on pcb this is another level! No needs for a terminal block!

But this is way ahead.

First you should try with one coil and one mosfet and see how much current and how much heat it dissipate.
by danjperron
Wed Aug 21, 2019 1:05 pm
Forum: General discussion
Topic: 12 v for driving electromagnets PCA9685
Replies: 31
Views: 1076

Re: 12 v for driving electromagnets PCA9685

You will drive a lot of current from your power supply. The wire from the power supply will be a big gauge to handle the amount of current or you will have multiple power supply with all the ground attached together. If you look at an electrical panel the main wire are attached to a metal plate whic...
by danjperron
Wed Aug 21, 2019 11:14 am
Forum: General discussion
Topic: 12 v for driving electromagnets PCA9685
Replies: 31
Views: 1076

Re: 12 v for driving electromagnets PCA9685

Do you think this circuit is ready for run with the components: Not using a breadboard! All your 12V wire should be on single point bus! All your GND wire should be on single point bus! The reason is the current. Take the current of a single coil and multiply it by the number of coil!. You bread bo...
by danjperron
Wed Aug 21, 2019 1:30 am
Forum: General discussion
Topic: 12 v for driving electromagnets PCA9685
Replies: 31
Views: 1076

Re: 12 v for driving electromagnets PCA9685

I don't know if it's a good idea to just let that current go to ground, without any load on? Maybe a small resistor in series with the Diode? What will be the maximum current on the coil? What is the frequency of you PWM ? What will be the inductance of the coil. The 1N4004 is able to handle 30A on...
by danjperron
Tue Aug 20, 2019 11:05 pm
Forum: General discussion
Topic: 12 v for driving electromagnets PCA9685
Replies: 31
Views: 1076

Re: 12 v for driving electromagnets PCA9685

The diode is needed to kill the back emf but it needs to be inverted. Cathode on V+ , Anode to drain.

When you remove the power on the coil it will create inverse voltage and the diode will kill it. Otherwise you risk the chance to burn your mosfet.
by danjperron
Tue Aug 20, 2019 3:11 pm
Forum: Other projects
Topic: Controling very narrow Laminer flow / water jets
Replies: 13
Views: 594

Re: Controling very narrow Laminer flow / water jets

Wonder?

Water is electrically polarized. It is possible to create an electric field to deviate water flow.

How complicate it will be??? I just don't know what is the voltage needed to bend a small water flow. If it works then it could be cheaper and no valve at all.
by danjperron
Tue Aug 20, 2019 1:22 am
Forum: General discussion
Topic: 12 v for driving electromagnets PCA9685
Replies: 31
Views: 1076

Re: 12 v for driving electromagnets PCA9685

Yeah the RFP30N06LE is now obsolete.

Check your electronic part provider. Mouser, Digikey or Newark in Canada have parametric search.

Maybe the IRL2703PBF could be a good replacement part.
by danjperron
Mon Aug 19, 2019 10:37 pm
Forum: Python
Topic: MFRC522 input
Replies: 3
Views: 1065

Re: MFRC522 input

if RFID.input == 3: print("3") GPIO??? An old version from Alexs reads the RFID card and executes a command found in the file /etc/RC522.conf. If you mean turn ON/OFF some GPIO using a RFID card this is what you need. I made an updated version of the original code. https://github.com/danjperron/rc5...
by danjperron
Mon Aug 19, 2019 5:25 pm
Forum: Other
Topic: How to get Temperature - [SOLVED]
Replies: 6
Views: 1029

Re: How to get Temperature

The welcome scripts are in /etc/update-motd.d Check the script "30-sysinfo". function getboardtemp() { if [ -f /etc/armbianmonitor/datasources/soctemp ]; then read raw_temp </etc/armbianmonitor/datasources/soctemp 2>/dev/null if [ ! -z $(echo "$raw_temp" | grep -o "^[1-9][0-9]*\.\?[0-9]*$") ] && (( ...
by danjperron
Mon Aug 19, 2019 3:35 pm
Forum: General discussion
Topic: 12 v for driving electromagnets PCA9685
Replies: 31
Views: 1076

Re: 12 v for driving electromagnets PCA9685

You should use something else than the IRF520 mosfet. Use a mosfet with a lower Vgs like RFP30N06LE. There is a kit from amazon. https://www.amazon.ca/gp/product/B0154KMLUC B.T.W. if you are using PWM you will have to check how much the mosfet heat since it won't be a clear ON/OFF. Do not forget to ...
by danjperron
Mon Aug 19, 2019 1:01 pm
Forum: Python
Topic: RFID MFRC522 Change Card Type (Wrong UID)
Replies: 5
Views: 2164

Re: RFID MFRC522 Change Card Type (Wrong UID)

Hum, The library from mxgxw is for the 4 bytes mifare! looks like you have a 7 bytes mifare card! Also this library print the four bytes in decimals using a comma to separate them. I don't see the comma between the numbers on your UID. Try to use my library which is based on mxgxw but modified to re...
by danjperron
Sun Aug 18, 2019 12:43 pm
Forum: Automation, sensing and robotics
Topic: Zwave usb stick for Pi4
Replies: 3
Views: 1157

Re: Zwave usb stick for Pi4

Aeon Labs Aeotec Z-Wave Z-Stick, Gen5 Z-Wave Plus - ZW090 I have this one with home assistant on my Pi3. This stick controls my Homeseer Hs-ws100 and Hs-wd100 switches. I connect the stick on my Pi4 and it is listed with the lsusb command. pi@PI4:~ $ lsusb Bus 003 Device 001: ID 1d6b:0002 Linux Foun...
by danjperron
Sat Aug 17, 2019 11:48 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: solid state relay
Replies: 16
Views: 1588

Re: solid state relay

I'm with pcmanbob.! SSR input are opto coupler with build-in resistor in series. If you add a resistor you will limit the current at the led of the opto coupler and it could misfire the trigger on the triac on the output side of the SSR. Since you are using a 2n2222 use 12V to the + input , connect ...
by danjperron
Thu Aug 15, 2019 4:30 pm
Forum: Troubleshooting
Topic: VPN installation
Replies: 3
Views: 143

Re: VPN installation

I do have Openvpn on my Pi3 and I used that simple curl script. curl -L https://install.pivpn.io | bash from this site: http://www.pivpn.io I do have 2 openvpns home . One for my android tablets and one for my PC, Mac and linux machine. Tablets use "tun" device but on all the other I use tap which a...
by danjperron
Wed Aug 14, 2019 4:12 pm
Forum: Automation, sensing and robotics
Topic: Troubles with HC-SR04 control?
Replies: 3
Views: 883

Re: Troubles with HC-SR04 control?

Use pigpio!

There is an example with the HC-SR04 http://abyz.me.uk/rpi/pigpio/examples.html Check under the python code.


P.S. if you have a Pi4 read this
https://www.raspberrypi.org/forums/view ... 9#p1497499
by danjperron
Wed Aug 14, 2019 12:03 am
Forum: C/C++
Topic: Measuring stepper motor distance travelled with PWM
Replies: 7
Views: 3122

Re: Measuring stepper motor distance travelled with PWM

I did something like you want to do on a test. More or less I specify the number of microstep to do. Then it should be easy to implement a stop function and count the number of step done or check on the fly the number of step. https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=86502&hilit=stepp...

Go to advanced search