Go to advanced search

by tlfong01
Tue Mar 05, 2019 6:54 am
Forum: HATs and other add-ons
Topic: I2C I/O PORT EXPANDER QUESTION
Replies: 37
Views: 2662

Re: I2C I/O PORT EXPANDER QUESTION

1. Sorry, I couldn't explain myself well. Let's try again. 2. control 260 ports that must output 5V (HIGH) when active not necessarily a LED, it could be a wire to a relay that activates something. (Just one output will be enabled at a time, so I don't worry about overloading the chip) 3. Pseudocod...
by tlfong01
Tue Mar 05, 2019 4:45 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

I built the magnet myself and want to run 12V into it, it has 2 ohm resistance so the current will be 6 A. Electromagnet DIY I am jealous of someone building an electromagnet himself. So I am also building one myself. I googled the Cool Magnet Man and found his tutorial very good. Electromagnets - ...
by tlfong01
Tue Mar 05, 2019 4:06 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

CONNECTING ELECTROMAGNET TO PI Postby jadel » 2019-Feb-26 Tue 10:50 pm 1. I want to control an electromagnet that I built with my rpi. I built the magnet myself and want to run 12V into it, it has 2 ohm resistance so the current will be 6A . 2. I couldn't find a relay board on the circuit making we...
by tlfong01
Tue Mar 05, 2019 3:23 am
Forum: HATs and other add-ons
Topic: I2C I/O PORT EXPANDER QUESTION
Replies: 37
Views: 2662

Re: I2C I/O PORT EXPANDER QUESTION

I want to control a LED state (HIGH/LOW), but I should be able to change the state between 260 GPIO's[/i] PCA9685 16 Channel PWM Driver Module You may like to consider this module: Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685 $15 https://www.adafruit.com/product/815 Tutoria...
by tlfong01
Tue Mar 05, 2019 1:29 am
Forum: HATs and other add-ons
Topic: I2C I/O PORT EXPANDER QUESTION
Replies: 37
Views: 2662

Re: I2C I/O PORT EXPANDER QUESTION

I've read that a Raspberry board has 2 SPI individual ports. Is there anyway to use 8x MCP23S17 on each of them? Using MCP23017 GPIO Pins to Select MCP23S17 Chips I almost never make use of Rpi's built in CE0/CE1 signals to chip select the devices on the SPI channels. My trick is using MCP23017 GPI...
by tlfong01
Tue Mar 05, 2019 1:10 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

I am 90% sure that you don't need any flyback diodes for the relays, because the relays are driven by ULN2803 octal darlingtons with built in flyback diodes. Just checking you mean I don't need it across the relay not the whole circuit, right? [/color] No flyback diodes across relay switch I am onl...
by tlfong01
Mon Mar 04, 2019 2:52 pm
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

tlfong01 wrote:
Mon Mar 04, 2019 2:26 pm

Energy stored in the electromagnet ZYE1

I have found the formula for energy stored in an inductor.

http://hyperphysics.phy-astr.gsu.edu/hb ... ndeng.html
...
by tlfong01
Mon Mar 04, 2019 2:26 pm
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

Inductance of Electromagnet ZYE1-P20/15 DC6V 0.5A = 3400uH Now I have measured the electromagnet to be 3400uH. Next step is to calculate the energy stored in the inductor and selection of the flyback diode which can swallow this energy when flyback. I am not sure if I need to calculate things inclu...
by tlfong01
Mon Mar 04, 2019 9:19 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

Now I don't know how to calculate the inductance. I need to watch the Rose Hullman video again, and also quickly read again the All-About-Circuits free eBook chapters on AC Circuits and Inductance (Chapters 2, 3). Inductance Calculation Results - Winner Winner Chicken Dinner! I fast forwarded the R...
by tlfong01
Mon Mar 04, 2019 8:10 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

Inductance Measurement - 100uH Second Trial Now I have got a pretty picture. Inductance Measurement - 200uH First Trial The 100uH picture does not look very good. So I connect another 100uH in series to make a 200uH inductance to measure. The results is displayed below. Below is a summary. --------...
by tlfong01
Mon Mar 04, 2019 7:03 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

I'll have to test it and see. Fingers crossed it works Problem Based Learning (PBP) Finger crossed it doesn't work. Then you have a problem to solve and can start doing Problem Based Learning (PBL). As I said earlier, you relay board has a couple of quad SMD resistor arrays. If you Rpi can switch o...
by tlfong01
Mon Mar 04, 2019 6:18 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

I am 90% sure that you don't need any flyback diodes for the relays, because the relays are driven by ULN2803 octal darlingtons with built in flyback diodes. Just checking you mean I don't need it across the relay not the whole circuit, right? No flyback diodes across relay switch I am only 90% sur...
by tlfong01
Mon Mar 04, 2019 5:57 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

Currently I am powering the relay board with a separate 12 V power supply. , ... PSUs for 144 Water Jet Music Fountain I am day dreaming of building a water feature in my rooftop garden. Currently I am using 1A, 2A PSUs to test the waters. I have more than 20 small Amp PSUs ready to fry, and anothe...
by tlfong01
Mon Mar 04, 2019 4:53 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

Now that I seemed to have successfully measured the inductance of the ZYE1-P20/15 electromagnet, I have gained some confidence. But I am only 50% sure that my steps are OK. So I decided to measure the 100uH core again. Inductance Measurement - 100uH Second Trial Now I have got a pretty picture. Lun...
by tlfong01
Mon Mar 04, 2019 4:45 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

My measurement procedure is summarised below. (1) By trial and error, select a frequency range, turn frequency trim pot to about middle, try a couple of discrete resistors to get a resistor value where Vr is roughly 0.7 of Vs. (2) Then fine tune frequency to get Vr/Vs ~= 0.7. It took me less than 1...
by tlfong01
Sun Mar 03, 2019 2:26 pm
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

https://www.amazon.co.uk/gp/product/B07568JFNV/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1 I only wanted to clarify that it was a board because I'm unsure how I would add a flyback diode across the relay. SaintSmart/Boladge 16 Channel 12V Low Trigger Relay 1. I am 90% sure that you don't need ...
by tlfong01
Sun Mar 03, 2019 9:16 am
Forum: Automation, sensing and robotics
Topic: Cat Home DIY Q&A - Solenoid How To
Replies: 35
Views: 3088

Re: Cat Home DIY Q&A - Solenoid How To

its likely of no significance in this circuit but the led diode in the transistor base will slow down the base discharge and delay the turn off. i.e. placing the transistor in linear mode. if anything i would suggest adding a 4k7 to gnd at the base. KY019 Relay Module NPN BJT S8050 Biasing Circuit ...
by tlfong01
Sun Mar 03, 2019 7:44 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

Inductance Measurement Frequency and Resistance Adjustment Newbie Tips I read a good eBook on AC circuits and now have a better idea of what is going on in the Rose Hullman inducance measurement. All About Circuits Free EE eBook I found the following All-About-Circuits' free EE eBook very good. I q...
by tlfong01
Sun Mar 03, 2019 6:57 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

Phase shift of L = Electromagnet ZYE1-P20/15 , R = 100Ω The phase shift appears to be 30 degrees, frequency ~= 200 kHz (H = 20uS). But I don't know how to do the calculation for this case! Inductance Measurement Frequency and Resistance Adjustment Newbie Tips I read a good eBook on AC circuits and ...
by tlfong01
Sun Mar 03, 2019 4:02 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

tlfong01 wrote:
Sat Mar 02, 2019 2:57 pm
Phase shift of L = Electromagnet ZYE1-P20/15 , R = 100Ω
The phase shift appears to be 30 degrees, frequency ~= 200 kHz (H = 20uS). But I don't know how to do the calculation for this case!

Finding Inductance of Electromagnet ZYE1-P20/15 DC6V 0.5A (Coil Resistance = 11.7Ω)
...
by tlfong01
Sun Mar 03, 2019 2:13 am
Forum: Automation, sensing and robotics
Topic: Running Raspberry PI with tip120
Replies: 5
Views: 395

Re: Running Raspberry PI with tip120

... The logic line from the TPL5110 connects to the Base of a darlington transistor TIP120 via a 2.2k resistor. The RPI 5V connects to POWER 5V and the ground connects to the Collector of the TIP120. The Emitter of the TIP120 connects to ground. I think your problem is that the collector-emitter vo...
by tlfong01
Sun Mar 03, 2019 1:53 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

Note - if you have already bought a 12V relay, you can use it, getting the same 12V power for electromagnet. This question might seem silly but I'm a bit confused by the phrasing. Does this mean I don't have to use an external power supply and just connecting the solenoid to the board will supply i...
by tlfong01
Sun Mar 03, 2019 1:10 am
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

the relay also needs a flyback diode. I forgot to mention I don't have a single relay. I'm using a "relay module driver board module with optocoupler", so I am using female to female pins to connect between the pi and the pins on the board. How would I add a flyback diode between them? Does that me...
by tlfong01
Sat Mar 02, 2019 2:57 pm
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

4. Or forget the 100uH, and try the electromagnet which I think should be 1000uH or more.[/i][/color] Phase shift of L = Electromagnet ZYE1-P20/15 , R = 100Ω The phase shift appears to be 30 degrees, frequency ~= 200 kHz (H = 20uS). But I don't know how to do the calculation for this case! :mrgreen...
by tlfong01
Sat Mar 02, 2019 2:14 pm
Forum: Automation, sensing and robotics
Topic: Connecting electromagnet to pi
Replies: 94
Views: 3963

Re: Connecting electromagnet to pi

1. What frequency is your sine-wave generator producing? 2. Given that the time constant of an inductance and resistance is given by t=L/R, 100μH and 100k that gives 10ns, so you're not going to see much phase difference at frequencies much lower than 100MHz 3. 100μH and 1k gives 100ns, so 10MHz ba...

Go to advanced search