Whats-App-Nachrichten mit Raspberry Pi versenden oder den Minirechner als digitalen Bildrahmen einsetzen. So wird es gemacht.
Whats-App-Nachrichten mit Raspberry Pi versenden oder den Minirechner als digitalen Bildrahmen einsetzen. So wird es gemacht.
Whats-App-Nachrichten mit Raspberry Pi versenden oder den Minirechner als digitalen Bildrahmen einsetzen. So wird es gemacht.
Whats-App-Nachrichten mit Raspberry Pi versenden oder den Minirechner als digitalen Bildrahmen einsetzen. So wird es gemacht.
Whats-App-Nachrichten mit Raspberry Pi versenden oder den Minirechner als digitalen Bildrahmen einsetzen. So wird es gemacht.
Whats-App-Nachrichten mit Raspberry Pi versenden oder den Minirechner als digitalen Bildrahmen einsetzen. So wird es gemacht.
Alle Python-Grundlagen, die Sie für Ihren Raspberry Pi 5, 4, 3 oder Zero brauchenProjekte mit Sensoren, Relais und AD-WandlernEinsatz von Peripheriegeräten wie Kameramodul und LautsprecherRaspberry Pi – der Mini-Computer zum ExperimentierenDer Raspberry Pi ist ein preiswerter Computer in der Größe einer Kreditkarte. In Kombination mit der Programmiersprache Python bietet er eine hervorragende Umgebung für die schnelle Realisierung technischer Ideen und Projekte. In diesem Buch lernen Sie alle Grundlagen, die Sie brauchen, um mit dem Raspberry Pi 5 oder dem Raspberry Pi Zero spannende Projekte zu realisieren.Die Programmiersprache Python als GrundlagePython ist – auch für Programmiereinsteiger – einfach zu lernen und deshalb Teil des Gesamtkonzepts des Raspberry Pi. Dieses Buch vermittelt Ihnen anhand vieler anschaulicher Beispiele sowohl die Grundlagen von Python als auch fortgeschrittene Techniken wie Objektorientierung, Internetprogrammierung und grafische Benutzungsoberflächen. Am Ende jedes Kapitels finden Sie Aufgaben und Lösungen, mit denen Sie Ihr Wissen festigen, erweitern und vertiefen können.Zahlreiche Projekte mit Sensoren, Kamera und mehrSie finden in diesem Buch eine Fülle von kleinen Projekten, die auf die besondere Hardware des Raspberry Pi und das Linux-Betriebssystem Raspberry Pi OS zugeschnitten sind. Dazu gehören sowohl Schaltungen mit Sensoren (Temperatur, Licht, Alkohol), Relais, AD-Wandlern und LEDs als auch die Verwendung des Kameramoduls und des 1-Wire- sowie SPI-Bus zur Datenkommunikation. Zahlreiche Illustrationen und einfache Beispiele zum Ausprobieren erleichtern das Verständnis.Aus dem Inhalt:Namen und ZuweisungenKontrollstrukturenKollektionen: Mengen, Listen, Tupel, DictionariesVerarbeitung von StringsFunktionenGrafische BenutzungsoberflächenDateien und Ressourcen aus dem InternetDatum und ZeitObjektorientierte ProgrammierungInternetprogrammierungHAT-Technik.
You can now create a dazzling display with your Raspberry Pi Model Zero/A+/B+/Pi 2/3/Pi 4 with the Adafruit RGB Matrix HAT. This HAT plugs into your Pi and makes it super easy to control RGB matrices such as those we stock in the shop and create a colorful scrolling display or mini LED wall with ease.
Arduino and Raspberry Pi are the most popular circuit boards opted for embedded and electronics projects. But to select one among these two can be confusing
I recently made a mini CNC laser engraver using two DVD drives salvaged from old computers and 50 mW (for comparison, a regular laser pointer is 1 mW), and make permanent damage to your eyes, kids' eyes, or pets' eyes. ALWAYS WARE A LASER SAFE GOGGLES when you are close to the working engraver. A suitable one for 650 nm laser should be green color. MAKE SURE THE ENGRAVER IS NOT ACCESSIBLE TO KIDS OR PETS. I would suggest everyone planning to build this should enclose the whole thing inside a large box or cover (however, mounting a little computer fan on the box would be nice for venting). Some people suggest that there should be a master switch on the box, so that unless the box is closed, the laser won't switch on. AGAIN, think TWICE before you make it. About the capability of the engraver Due to the size limit of DVD drives, the machine can only engrave within an area of 36 mm by 36 mm.. So it can do little pieces of wood, plastic board or part of iPhone cases, but not any larger. The laser used here is 200 mW 650 mm red laser diode. It cuts letter paper fine. But It is not powerful enough to actually cut through anything thicker and tougher. In fact, the working surface is preferred to be black color so that it can absorb as much laser power as possible. To engrave on transparent plastic board, as shown above in the coin size university icon picture, I have to use a black marker to paint the surface and clean the ink after engraving. However, I believe for a thin black foam sheet (<3mm thick), and given enough engraving time, the laser should be able to cut it through, as Groover showed in instructable. Now here is the instruction. Things required: 1. A raspberry pi (running Raspbian or what ever supports GPIO) 2. two DVD writable drives. To be able to engrave, you need 200mW laser diode from DVD writer. A DVD R or CD R will do nothing. A CD writer might be OK in term of power (~100mW), but the laser diode of a CD writer is infrared, which can be super dangerous (you can't see it!). 3. a TO-18 5.6mm laser housing (like this one http://www.ebay.com/itm/251316903193?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649) Make sure you get a 5.6mm one. There is another type 9mm. 4. Two dual channel H-bridges. A H bridge is a circuit containing four (effective) switches that can apply a voltage across a load (DC motor or one coil of a stepper motor) in either direction. Stepper motors from DVDs are 4 wire 2 phase bipolar stepper motors. They require truly reversible voltage on each pairs of the wire. You need two H bridges for each stepper motors. So total of four H bridges for two strepper motors. Some famous stepper motor controllers like ULN2003 are for the 5 wire stepper motors, so they cannot be used for controlling the DVD stepper motors. You can make your own H bridges by using 4 NPN and 4 PNP transistors and probably TTL converters (RPi's GPIO pin are 3.3V so logic TTL chips might be required). Or you can simply buy them. There are a lot of integrated H bridge circuits available in the market, such as L298. The ones I use are L9110s Dual H Bridge purchased on Ebay (like this one: http://www.ebay.com/itm/350877288713?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649). They are low cost (~$2 each), compact (.8"x1") and are powerful enough (~800mA). However, if you buy from a Chinese seller, shipping can cost 3 weeks. L9110s is also sometimes known as HG7881. Regarding the H bridge, you need to make sure that the continuous current limit of the circuit is greater than 500mA. Usually the stepper motor in a DVD drive is rated at 5V and each coil has a resistance of 10ohm. So the current through each coil would be 500mA! A very large current! 5. a LM317 regulator, a power NPN bipolar transistor (like E3055, should be able to handle continuous 200mA at least), some resistors, capacitors and a bundle of jumpers. The LM317 is for the laser driver. The power NPN is for making a switch for the laser. My lab has tons of these components so I don't have buy them. If you don't want to solder a driver by your own, you can surely buy a laser driver for 300mA and also put a heat sink on it. Schematics of the laser driver and the switch. Laser is on only when "Laser switch" port is logic high (>3V). Make sure you don't mess up the pin order of LM317 LM317 Laser driver Laser driver (top) and the E3055 power NPN (bottom) Laser diodes are very delicate device. They are extremely vulnerable to the condition applied on them. Unstable voltage or current, excessive current/voltage (even for very very short time) could damage them permanently. So always discharge yourself before holding the diode, and always use a constant current driver to power it. As pointed out by one of the reader (thank you, J super), you might also damage the diode by connecting the driver to power supply first and then connecting the diode to the driver. The diode should always be connected to the driver before applying any power to it. STEP 4: Assemble the machine Now you have two identical linear stages and it is time to put them together! There are a lot of ways to do this. For 2 axes CNC machine, I think the best way is the one given by Groover @ instructable. In Groover's configuration, the engraving sample is attached to x-axis so it only moves in x direction. The laser is attached to y axis so it only moves in y direction. This configuration minimizes the weight on each of the axes. Laser engraver I made I cut a 2"x2" steel board out of the DVD case and glued it to the x-axis stage as the sample support base. Since the DVD case is made from iron, you can use the strong magnets salvaged from the laser optical system to help you stabilize the engraving sample on the base. The laser diode will generate a lot of heat . And it is important to dissipate this heat. Otherwise the diode will die fast. I cut a 1inch cube heat sink from an old computer CPU heat sink and drilled a hole though it. The hole is perfectly large to hold the laser. I glue the heat sink on the y axis stages. The most important issue is the x axis, y axis and body of laser have to be perpendicular to each other. STEP 5: Connect H-Bridge to the stepper motors Four connect pins on a 4-wire-2-phase stepper motor. They are usually arranged in the following order: a1,a2,b1,b2. (a1 and a2 are the two leads of coil a; b1 and b2 are the two leads of coil b). Using a multimeter will help to verify this. The stepper motor in DVD is a 4-wire 2-phase bipolar motor. There are two independent coils inside. Each coil has a 10 Ohm resistance. Usually the DVD stepper motors are rated at 5V. Therefor the rated current through each coil is 500mA! The RPi GPIO pins can only output less than 20mA so RPi cannot control a stepper directly. H bridges are required. Here is a very good tutorial on Bipolar stepper motor Bipolar Tutorial Conceptual model of 4-wire 2-phase stepper motors, from Bipolar Tutorial.I renamed the pins It looks like I am using different names for pins of stepper motor. In writeups by most people, they define coil 1 and coil 2 and name 1a, 1b as the two leads of coil 1, and 2a, 2b as the two leads of coil 2. It doesn't matter, as long as we know what we are doing. At least in this post I will keep the terminology thing consistent. The central spinner of the bipolar stepper motor can be regarded as a bar magnet (actually it is circular). Obviously from the figure above that if we successively conduct current in coil a1, b2, a2 and b1, the spinner will spin in the desired sequence. To do this, we can apply a voltage sequence to a1, b2, a2, b1 as:1) high, low, low, low. So only a1 and a2 are activated. Since a1 a2 have same polarity (or opposite depending on how you define it), the spinner is pointing to a1 2)low, high, low, low. So only b2 and b1 are activated. Spinner is pointing to b2 3)low, low, high, low. So only a2 and a2 are activated. Spinner points to a2 4)low, low, low, high. Spinner points to b1. go to 1). Denote high as 1 and low as 0. The sequence can be written as 1000,0100,0010,0001 The advantage of this configuration is that it is very easy to understand and usually the stepper motor moves very precisely. However, since in each step only one pair of coils is activated, the torque applied on the spinner is not very great. To achieve high torque, a more popular way is to apply the following sequence: 1100,0110,0011,1001. And the spinner will be pointing to middle of a1 and b2, middle of b2 and a2, middle of a2 and b1, middle of b1 and a1 consequentially. And the torque is doubled. This is called full-step mode or high torque mode or two phase mode.. and is usually the mode used. If the torque won't be a problem then we can use a 8-step sequence: 1000,1100,0100,0110,0010,0011,0001,1001. The spinner will turn 8 steps instead of 4 steps to turn same angle. This doubles the resolution. And the cost is the non-uniform torque being applied on the stepper motor. This is called half-step mode. Usually for DVDs, the linear sliders moves about 0.15mm every full step stepper motor turn, corresponding to a resolution of ~170dpi. Good enough for home-made projects. If 8-step mode is implemented, then the resolution is 0.075mm/step or 340dp, similar to regular printer. For laser engraver, there isn't any serious load on the stepper motor so I choose the half-step mode or 8-step mode. As mentioned, RPi cannot drive the stepper motor directly because of the current limit. Actually, besides powering low power LEDs, the GPIO pins of a RPi usually serves as logic switches. In output mode, they are either logical High (3V) or logic low (<0.7V). A H bridges is a "translator" that translates these logic High or Low into power source that has high voltage or low voltage. A conceptual schematics of H bridge (from wiki) Above is a conceptual schematic graph of H bridge (has similar shape with letter "H"). One H bridge has two working mode: (S1 S4 close, S2 S3 open) and (S2 S3 open, S1 S4 close). In the first mode, current flows rightwards through the motor and in the second mode, current flows leftwards through the motor. In reality, this H bridge is never used. A common way is to use transistor as electric switches. See figure below. A very very simplified conceptual schematics of NPN PNP H bridges. NEVER build an H bridge based on this graph, because You will probably burn the transistors or even the Pi. A practical H bridge requires current limiting resistors, reverse diodes and logic TTL chips. Please consult more from other sources if you would like to build a working H bridge from scratch. When A is logic low (0V) and B is logic high(+V), then transistor 1 and 4 are conducting while 2 and 3 are open; when A is logic high (+V) and B is logic low (0V), then transistor 1 and 4 are oepn while 2 and 3 are conducting. When both A and B are logic high, 2 and 4 are conducting, 1 and 3 are open, the motor stalls; when both A and B are low, 1 and 3 are conducting, 2 and 4 are open, the motor stalls. Therefore by setting A and B high or low, we can control the current direction through a load. For each 4 wire 2 phase stepper motor, there are two independent coils we need to control. So a total of 4 H bridges are required to control the two stepper motors. There are a lot of integrated H bridge available on the market. For my case, I need 500mA through each H bridge so L9110S suffices (L9110S can afford 800mA through each H bridge). Each L9110S contains two H bridge so two of them are enough. There are L9110S modules for "Document properties" => "Page", under the "Custom Size" box, change the "Units" to "mm" (millimeter) and then put 36 and 36 in both "Width" and "Height". Then close the dialog. You will see the blank page becomes a small square box. Zoom into that box. Step 7-3: plot, text, create, a lot of fun~ You can type texts, plot graphs, or even paste png/bmp in the box. Press "Ctrl" and "A" to select everything plotted, under "Path", click "Object to Path". Or simply press "Shift" + "Ctrl" +"C". This steps is required if you have text or other external objects. Convert objects to path Step 7-4: Generate G code Goes to "Extensions" => "Laserengraver" and click "Laser...". A dialog box will jump up. You can select "Directory", "Unites" and modify other preference under "Preference". Under "Laser", type the file name (should appended by .nc extension). Then click "Apply". Convert the object to G code A dialog box will say "laser working, please wait..". If "Draw additional graphics to debug engraving path" is checked under "Preferences" before clicking "Apply", Inkscape will plot a lot of arrows on top of the plot, showing the moves given by the generated G code. G code is successfully generated! A lot of arrows. Step 7-5: Pass the G code to RPi If you use a laptop/desktop to generate the G code, then you have to pass the G code to RPi using ssh or other tools. The G code should be placed under the same folder together with the python routines. Step 7-6: Make necessary modification to the python code and then engrave! At least you want to change the G code file name in Gcode_executer.py (line 25). Some other changes, say, pin numbers (line 29, 31, 32), resolution (line 35, 36), engraving speed (38), can be changed if you understand them. Type "sudo python Gcode_executer.py" in terminal to run the python routines and have fun!
Learn how to install webmin.
About Raspberry Pi for Beginners Since 2012, the Raspberry Pi has revolutionised home computing around the world, providing people with a portable, affordable and incredibly versatile piece of tech to do with as they see fit. Now available in a variety of flavours, from the tiny Pi Zero to the powerful Pi 3 Model B, the mini computer’s popularity shows no signs of slowing. For those looking to try their hand at coding and custom computing for the first time, Raspberry Pi for Beginners will help you select the ideal model for your needs, set up your new device and take your first steps in this exciting new world. Once you have mastered the basics, we even provide plenty of fun projects to sink your teeth into, as well as offering guidance on Python and Scratch programming. With guides suitable for adults and children alike, read on to join the Raspberry Pi community today! Featuring: The basics - Select the right model for you, navigate your new gadget and install the latest OSs. Projects - Make the most of your Raspberry Pi and put your skills into practice with practical projects. Programming - Master the basics of Scratch and Python by learning the jargon and building sample games. Troubleshooting, FAQs & glossary - Fix common problems for hardware and software, and use the glossary and FAQs as reference.
A new version of the awesome RetroPie software has been released this week in the form of RetroPie 3.0, providing an easy way to transform a Raspberry Pi mini PC
Kodi Raspberry Pi 4 - Neue Anleitung für den Raspberry Pi 4 - Einfach Schritt für Schritt erklärt. Kodi installieren.
I recently made a mini CNC laser engraver using two DVD drives salvaged from old computers and 50 mW (for comparison, a regular laser pointer is 1 mW), and make permanent damage to your eyes, kids' eyes, or pets' eyes. ALWAYS WARE A LASER SAFE GOGGLES when you are close to the working engraver. A suitable one for 650 nm laser should be green color. MAKE SURE THE ENGRAVER IS NOT ACCESSIBLE TO KIDS OR PETS. I would suggest everyone planning to build this should enclose the whole thing inside a large box or cover (however, mounting a little computer fan on the box would be nice for venting). Some people suggest that there should be a master switch on the box, so that unless the box is closed, the laser won't switch on. AGAIN, think TWICE before you make it. About the capability of the engraver Due to the size limit of DVD drives, the machine can only engrave within an area of 36 mm by 36 mm.. So it can do little pieces of wood, plastic board or part of iPhone cases, but not any larger. The laser used here is 200 mW 650 mm red laser diode. It cuts letter paper fine. But It is not powerful enough to actually cut through anything thicker and tougher. In fact, the working surface is preferred to be black color so that it can absorb as much laser power as possible. To engrave on transparent plastic board, as shown above in the coin size university icon picture, I have to use a black marker to paint the surface and clean the ink after engraving. However, I believe for a thin black foam sheet (<3mm thick), and given enough engraving time, the laser should be able to cut it through, as Groover showed in instructable. Now here is the instruction. Things required: 1. A raspberry pi (running Raspbian or what ever supports GPIO) 2. two DVD writable drives. To be able to engrave, you need 200mW laser diode from DVD writer. A DVD R or CD R will do nothing. A CD writer might be OK in term of power (~100mW), but the laser diode of a CD writer is infrared, which can be super dangerous (you can't see it!). 3. a TO-18 5.6mm laser housing (like this one http://www.ebay.com/itm/251316903193?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649) Make sure you get a 5.6mm one. There is another type 9mm. 4. Two dual channel H-bridges. A H bridge is a circuit containing four (effective) switches that can apply a voltage across a load (DC motor or one coil of a stepper motor) in either direction. Stepper motors from DVDs are 4 wire 2 phase bipolar stepper motors. They require truly reversible voltage on each pairs of the wire. You need two H bridges for each stepper motors. So total of four H bridges for two strepper motors. Some famous stepper motor controllers like ULN2003 are for the 5 wire stepper motors, so they cannot be used for controlling the DVD stepper motors. You can make your own H bridges by using 4 NPN and 4 PNP transistors and probably TTL converters (RPi's GPIO pin are 3.3V so logic TTL chips might be required). Or you can simply buy them. There are a lot of integrated H bridge circuits available in the market, such as L298. The ones I use are L9110s Dual H Bridge purchased on Ebay (like this one: http://www.ebay.com/itm/350877288713?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649). They are low cost (~$2 each), compact (.8"x1") and are powerful enough (~800mA). However, if you buy from a Chinese seller, shipping can cost 3 weeks. L9110s is also sometimes known as HG7881. Regarding the H bridge, you need to make sure that the continuous current limit of the circuit is greater than 500mA. Usually the stepper motor in a DVD drive is rated at 5V and each coil has a resistance of 10ohm. So the current through each coil would be 500mA! A very large current! 5. a LM317 regulator, a power NPN bipolar transistor (like E3055, should be able to handle continuous 200mA at least), some resistors, capacitors and a bundle of jumpers. The LM317 is for the laser driver. The power NPN is for making a switch for the laser. My lab has tons of these components so I don't have buy them. If you don't want to solder a driver by your own, you can surely buy a laser driver for 300mA and also put a heat sink on it. Schematics of the laser driver and the switch. Laser is on only when "Laser switch" port is logic high (>3V). Make sure you don't mess up the pin order of LM317 LM317 Laser driver Laser driver (top) and the E3055 power NPN (bottom) Laser diodes are very delicate device. They are extremely vulnerable to the condition applied on them. Unstable voltage or current, excessive current/voltage (even for very very short time) could damage them permanently. So always discharge yourself before holding the diode, and always use a constant current driver to power it. As pointed out by one of the reader (thank you, J super), you might also damage the diode by connecting the driver to power supply first and then connecting the diode to the driver. The diode should always be connected to the driver before applying any power to it. STEP 4: Assemble the machine Now you have two identical linear stages and it is time to put them together! There are a lot of ways to do this. For 2 axes CNC machine, I think the best way is the one given by Groover @ instructable. In Groover's configuration, the engraving sample is attached to x-axis so it only moves in x direction. The laser is attached to y axis so it only moves in y direction. This configuration minimizes the weight on each of the axes. Laser engraver I made I cut a 2"x2" steel board out of the DVD case and glued it to the x-axis stage as the sample support base. Since the DVD case is made from iron, you can use the strong magnets salvaged from the laser optical system to help you stabilize the engraving sample on the base. The laser diode will generate a lot of heat . And it is important to dissipate this heat. Otherwise the diode will die fast. I cut a 1inch cube heat sink from an old computer CPU heat sink and drilled a hole though it. The hole is perfectly large to hold the laser. I glue the heat sink on the y axis stages. The most important issue is the x axis, y axis and body of laser have to be perpendicular to each other. STEP 5: Connect H-Bridge to the stepper motors Four connect pins on a 4-wire-2-phase stepper motor. They are usually arranged in the following order: a1,a2,b1,b2. (a1 and a2 are the two leads of coil a; b1 and b2 are the two leads of coil b). Using a multimeter will help to verify this. The stepper motor in DVD is a 4-wire 2-phase bipolar motor. There are two independent coils inside. Each coil has a 10 Ohm resistance. Usually the DVD stepper motors are rated at 5V. Therefor the rated current through each coil is 500mA! The RPi GPIO pins can only output less than 20mA so RPi cannot control a stepper directly. H bridges are required. Here is a very good tutorial on Bipolar stepper motor Bipolar Tutorial Conceptual model of 4-wire 2-phase stepper motors, from Bipolar Tutorial.I renamed the pins It looks like I am using different names for pins of stepper motor. In writeups by most people, they define coil 1 and coil 2 and name 1a, 1b as the two leads of coil 1, and 2a, 2b as the two leads of coil 2. It doesn't matter, as long as we know what we are doing. At least in this post I will keep the terminology thing consistent. The central spinner of the bipolar stepper motor can be regarded as a bar magnet (actually it is circular). Obviously from the figure above that if we successively conduct current in coil a1, b2, a2 and b1, the spinner will spin in the desired sequence. To do this, we can apply a voltage sequence to a1, b2, a2, b1 as:1) high, low, low, low. So only a1 and a2 are activated. Since a1 a2 have same polarity (or opposite depending on how you define it), the spinner is pointing to a1 2)low, high, low, low. So only b2 and b1 are activated. Spinner is pointing to b2 3)low, low, high, low. So only a2 and a2 are activated. Spinner points to a2 4)low, low, low, high. Spinner points to b1. go to 1). Denote high as 1 and low as 0. The sequence can be written as 1000,0100,0010,0001 The advantage of this configuration is that it is very easy to understand and usually the stepper motor moves very precisely. However, since in each step only one pair of coils is activated, the torque applied on the spinner is not very great. To achieve high torque, a more popular way is to apply the following sequence: 1100,0110,0011,1001. And the spinner will be pointing to middle of a1 and b2, middle of b2 and a2, middle of a2 and b1, middle of b1 and a1 consequentially. And the torque is doubled. This is called full-step mode or high torque mode or two phase mode.. and is usually the mode used. If the torque won't be a problem then we can use a 8-step sequence: 1000,1100,0100,0110,0010,0011,0001,1001. The spinner will turn 8 steps instead of 4 steps to turn same angle. This doubles the resolution. And the cost is the non-uniform torque being applied on the stepper motor. This is called half-step mode. Usually for DVDs, the linear sliders moves about 0.15mm every full step stepper motor turn, corresponding to a resolution of ~170dpi. Good enough for home-made projects. If 8-step mode is implemented, then the resolution is 0.075mm/step or 340dp, similar to regular printer. For laser engraver, there isn't any serious load on the stepper motor so I choose the half-step mode or 8-step mode. As mentioned, RPi cannot drive the stepper motor directly because of the current limit. Actually, besides powering low power LEDs, the GPIO pins of a RPi usually serves as logic switches. In output mode, they are either logical High (3V) or logic low (<0.7V). A H bridges is a "translator" that translates these logic High or Low into power source that has high voltage or low voltage. A conceptual schematics of H bridge (from wiki) Above is a conceptual schematic graph of H bridge (has similar shape with letter "H"). One H bridge has two working mode: (S1 S4 close, S2 S3 open) and (S2 S3 open, S1 S4 close). In the first mode, current flows rightwards through the motor and in the second mode, current flows leftwards through the motor. In reality, this H bridge is never used. A common way is to use transistor as electric switches. See figure below. A very very simplified conceptual schematics of NPN PNP H bridges. NEVER build an H bridge based on this graph, because You will probably burn the transistors or even the Pi. A practical H bridge requires current limiting resistors, reverse diodes and logic TTL chips. Please consult more from other sources if you would like to build a working H bridge from scratch. When A is logic low (0V) and B is logic high(+V), then transistor 1 and 4 are conducting while 2 and 3 are open; when A is logic high (+V) and B is logic low (0V), then transistor 1 and 4 are oepn while 2 and 3 are conducting. When both A and B are logic high, 2 and 4 are conducting, 1 and 3 are open, the motor stalls; when both A and B are low, 1 and 3 are conducting, 2 and 4 are open, the motor stalls. Therefore by setting A and B high or low, we can control the current direction through a load. For each 4 wire 2 phase stepper motor, there are two independent coils we need to control. So a total of 4 H bridges are required to control the two stepper motors. There are a lot of integrated H bridge available on the market. For my case, I need 500mA through each H bridge so L9110S suffices (L9110S can afford 800mA through each H bridge). Each L9110S contains two H bridge so two of them are enough. There are L9110S modules for "Document properties" => "Page", under the "Custom Size" box, change the "Units" to "mm" (millimeter) and then put 36 and 36 in both "Width" and "Height". Then close the dialog. You will see the blank page becomes a small square box. Zoom into that box. Step 7-3: plot, text, create, a lot of fun~ You can type texts, plot graphs, or even paste png/bmp in the box. Press "Ctrl" and "A" to select everything plotted, under "Path", click "Object to Path". Or simply press "Shift" + "Ctrl" +"C". This steps is required if you have text or other external objects. Convert objects to path Step 7-4: Generate G code Goes to "Extensions" => "Laserengraver" and click "Laser...". A dialog box will jump up. You can select "Directory", "Unites" and modify other preference under "Preference". Under "Laser", type the file name (should appended by .nc extension). Then click "Apply". Convert the object to G code A dialog box will say "laser working, please wait..". If "Draw additional graphics to debug engraving path" is checked under "Preferences" before clicking "Apply", Inkscape will plot a lot of arrows on top of the plot, showing the moves given by the generated G code. G code is successfully generated! A lot of arrows. Step 7-5: Pass the G code to RPi If you use a laptop/desktop to generate the G code, then you have to pass the G code to RPi using ssh or other tools. The G code should be placed under the same folder together with the python routines. Step 7-6: Make necessary modification to the python code and then engrave! At least you want to change the G code file name in Gcode_executer.py (line 25). Some other changes, say, pin numbers (line 29, 31, 32), resolution (line 35, 36), engraving speed (38), can be changed if you understand them. Type "sudo python Gcode_executer.py" in terminal to run the python routines and have fun!
It's super easy.