Shop

I sell on Tindie

Saturday, September 25, 2021

MATLAB - Family of Curves (Vectorization)

MATLAB Techniques

Written by Larsha Johnson
9/25/2021

Linear Signals and System, matrix operation fundamentals. This example illustrates a techniques called vectorization. Algorithm vectorization uses matrix and vector operations to avoid manual repetition and loop structures. With simultaneous creation of curves one can maximize the use of matrix applications. 
The result here is a 201 x 11 matrix with identical columns. 

%% Matrix Operations - Family of Curves 
r = [1 0 0] 
A = [2 3;4 5;0 6] 
c = r' B = [c A] 
B(1,2) 
B(1:2,2:3) 
B(2,:) 
A = [1 -2 3;-sqrt(3) 1 -sqrt(5);3 -sqrt(7) 1]; 
y = [1;pi;exp(1)]; 
x = inv(A)*y x1 = det([y,A(:,2:3)])/det(A) alpha = (0:10); 
t = (0:0.001:0.2)'; 
T = t*ones(1,11); 
H = exp(-T*diag(alpha)).*sin(2*pi*10*T+pi/6); 
plot(t,H); xlabel('t'); ylabel('h(t)'); 
[R,P,K] = residue(B,A) 
[R,P,K] = residue([1 0 0 0 0 pi],[1 -sqrt(8) 0 sqrt(32) -4]); 
R.', P.', K title('Family of Curves - Vectorization')

Try this code out to graph this figure! Modify freely and comment on this post if it helps. Thanks for reading.

Saturday, September 18, 2021

Create a Logic Circuit in NI Multisim - Snippet

Ladder Logic in Multisim

Written by Larsha Johnson
9/18/2021

Software

  • Multisim

In Linear Control Systems Lab the topic of programmable logic controllers was introduced. There is a variety of software available on the web to try PLC yourself, in this blog I used NI Multisim 14.2 

๐Ÿ™‹Before arriving to this blog you may have asked yourself...how do I implement a logic circuit using ladders within the Multisim environment? Is there any way to learn about ladder logic using a simulated circuit environment such as Multisim?

The answer:

The Education edition of Multisim lets you capture and simulate Ladder Diagrams. These diagrams are electrically based, as opposed to the binary/digital representations employed by ladder logic. Diagrams of this type are used extensively for industrial motor control circuits.

Ladder Diagrams are able to drive output devices or take input data from regular schematics and embed the instructions on how input states affect output states in either the same schematic or separate hierarchical blocks or subcircuits that contain the Ladder Diagram.

Note: Refer to the Multisim User Guide for a complete description of hierarchical blocks and subcircuits.

๐Ÿ“ŒAn example of how to create this ladder logic in Multisim is as follows:

1. Select Place/Ladder Rungs.
      
The cursor appears with the rung’s left and right terminators attached.

2. Click to place the first rung and continue clicking and placing until you have placed four rungs as shown below. Right-click to stop placing rungs. 


๐Ÿ”To add components to the rungs:
1. Select Place/Component, navigate to the Normally Open Relay Contact
(RELAY_CONTACT_NO) click OK.

Note: This device is found in the Ladder Diagrams Group - Ladder Contacts Family.

2. Drop the relay contact directly onto the first rung.

3. Continue in this manner until all relay contacts have been placed. (X4 must be placed and
then wired separately). 

4. Place the lamps (Group - Indicators; Family - Lamp).

5. Place relay coils M1 and M2 on the third and fourth rungs (Group - Ladder Diagrams;
Family - Ladder Relay Coils). 

6. Place switches J1 and J2.
7. Double-click on each switch, select the Value tab, and change the key for J1 to 1 and the
key for J2 to 2. 

๐Ÿ”To change the controlling device reference for X2 and X4:
1. Double-click on X2 and click the Value tab.
2. Enter M2 in the Controlling Device Reference field and click OK. Repeat for X4. The completed Ladder Diagram appears as shown below.




Embed the circuit file within a PNG image file using a Multisim Snippet and let your peers drag and drop the circuit into Multisim instead. This tutorial explores the new technology and ways to take advantage of it.

๐Ÿ‘Œ Please try our snippet out for yourself and practice designing logic gates own your own.

Sharing Multisim circuit files has never been easier. You can now see a graphical preview of the circuit design before opening, and you no longer need to attach and save files on supported web browsers. This saves you valuable time and increases your productivity.

I sell on Tindie

Wednesday, June 23, 2021

555 Timer - LED Flasher with conductive 3D Filament - Astable Mode

555 Timer - LED Flasher with conductive 3D Filament

Written by Larsha Johnson
6/23/2021

Bits4Bots, LLC



 
 Rapid circuit prototype with a 3D printer and conductive filament. This project features a simple circuit designed to explain the working and use of a 555 timer IC. The connection used is credited to this blog LED Flasher Circuit 
 The 555 timer was one of the first IC chips I learned to use in a project back when I attended community college. I learned to read the datasheet and create my first flashing LED! This is a good place to start for those new to electronics. *I recommend reading the 555 timer datasheet to learn more!


Supplies

3D printer
Proto-Pasta filament
eSun PLA filament
555 timer IC
5mm LED or similar i.e 3mm, 10mm
1uF capacitor - C1 * Can be SAT (selected at testing)
x2 resistors (1K) - R1 & R3
1 resistor (100K) - R2 *Can be SAT (selected at testing)
9V battery
9V snap connector

Download and print the 3D file(s) here or from Thingiverse I designed the assembly for one single print

(1hr 30min) or in two parts 45min each:

Base 30mm x 30mm
Traces for testing purposes (different Z-axis height layers for various conductivity)
For TinkerCad users see link: Tinkercad

Note: When the print is 7% to 8% complete, the conductive filament should follow. Here is a great Instructable for welding 3D filament Filament Fuser.

*I simply snipped off the colored PLA with a wire cutter, then guided the conductive filament into the 3D printer until the extruder accepted (grabbed) it.

After the print is complete the top layers of the board should have 3mm+ conductive filament.

Pin 2 and 6 are connected. All other pin connections will need to be made manually.

Place 555 timer onto 3D printed board and press firmly to make a strong connection. Careful not to bend the legs!

1. Connect pin 4 and 8 together with a male to male jumper or wire. *tinned wire for optimization
2. Connect LED ground leg to pin one.
3. Connect R3 (1K ohm) to +itive lead of LED, and then to pin 3.
4. Connect R1 between pin 6 and 7
5. Connect R2 between pin 7 and 8
6. Place C1 between pin 1 and 2 *-itive lead to pin 1 (for polarized capacitors)
7. Note: Pin 5 will not be connected (this is also called floating)

The last step is to power the circuit. 5V-9V is a good value to use for the power supply. Here I used a 9V battery and snap connector.

Connect negative lead to pin 1. Connect positive lead to pin 8

Please like, share, or comment. Find us on all social media! Check us out on Tindie

**Did we make a mistake? Let us know :)

Before we designed our 555 timer circuit we conducted a search for conductive 3D filament. There are several companies that you can choose from. We decided to go with Proto Pasta. The details for conductivity are below:

Volume resistivity of molded resin (not 3D Printed): 15 ohm-cm
Volume resistivity of 3D printed parts perpendicular to layers: 30 ohm-cm
Volume resistivity of 3D printed parts through layers (along Z axis): 115 ohm-cm
Resistance of a 10cm length of 1.75mm filament: 2-3kohm
Resistance of a 10cm length of 2.85mm filament: 800-1200ohm

CHALLENGE:

Now that the resistivity is known the next challenge is to calculate the resistance in each trace used.

I measured 2k Ohms in the curved traces on pin 1 and on pin 8. These are the traces that connect the power supply.

The shortest traces measure 1k Ohms. Pin 4 and pin 5.

The trace from pin 2 to pin 6 is 1.5k Ohms.

The T-shaped trace, pin 3 (trigger) and pin 7 around 1.5k Ohms.

***Increased layers on the Z-axis = increase the resistance. Less layers can be used to best resemble standard wires such a copper or other metals presented in general printed circuit boards. This portion of the 3D PCB is a work in progress.

In addition, advanced users can accurately determine exact wire (3D trace) resistance via circuit simulation software that can perform line calculations i.e. NI Multisim, ADS (Keysight), and others.

Calculate LED Flash Time

For the 555 Timer IC you, the designer, will calculate on/off flash time. The link below is a great way to calculate your design or check your math work. 555 Astable Circuit Calculator

Notes:

Increasing C will increase the cycle time (and hence, reduce the frequency).
Increasing R1 will increase Time High (T1), but will leave Time Low (T0) unaffected.
Increasing R2 will increase Time High (T1), increase Time Low (T0) and decrease the duty cycle (down to a minimum of 50%)
By hand you can use these formulas to calculate the LED time on/off in seconds.

Time high (on) = 0.7 * (R1 + R2) * C1

Time low (off) = 0.7 * R2 * C1

Monday, May 17, 2021

Thingiverse page


Hello Makers,

We are now adding 3D makes to our new Thingiverse page. See you there!


 




Raspberry Pi Pico W - 2 Quick Projects to Get You Started

July 1st 2022 ๐Ÿ’–We love new arrivals! Here are two quick projects to get you started with the Raspberry Pi Pico W. Tips :  Get the latest fi...

Popular Post