fbpx
01270 747 008 (UK)
Interconnected PWM

Bipolar PWM with Arduino

Our popular power PWM control circuits use a single transistor to pulse all sorts of loads for power control. The pulses control current in one direction only which is fine for most PWM applications. However sometimes it is required to have a bi directional pulse for driving an AC load such as a transformer.

Ideally a dedicated H-bridge circuit would be used, but it is possible to approximate this using a pair of our PWM circuits being controlled with an Arduino.

Using our Arduino library NanoPWMac we can drive two circuits with a pulse that is equal in length, but with only one circuit active at a time.

Below you can see a simplified diagram of what is happening with a normal single transistor PWM circuit. The pulse signal basically switches power on/off to the load by making and breaking the path for current from the PSU through the load.

Our PWM modules can be linked directly in a master/slave arrangement (see datasheet) so that when one is on, the other is off and visa-versa. This can be used to drive a transformer with AC, but it only really works if you want a 50% duty cycle. This is because if you set the master PWM to 10%, the other one will be 90% therefore driving the transformer unequally and not allowing for proper power control.

To dive a coil with AC and adjustable duty, an Arduino can be connected to two PWM circuits as shown below. The coil must be centre tapped so that each PWM will pull current in opposite directions.

For simplicity the power connections are not shown in the diagram. To link the Arduino to the PWM modules, the SIG jumper is removed from both modules, and a connection from the Arduino pins 9 and 10 is made to the SIG pin marked with a stripe on the OCXi.

The example program in the nanoPWMac library will take a reading from potentiometers connected to A4 and A5 so that these pots can be used to vary frequency and duty independently.

With this setup you can now pulse both circuits in opposition with a waveform like shown below.

DIY Tesla Coil Tuner

Tesla Coil TunerA DIY Tesla Coil Tuner

By Terry Fritz

The Tesla Coil Tuner (TCT) is a simple and low cost signal source that can be used to find the resonant frequencies of the primary and secondary circuits of Tesla coils. It uses simple commonly available parts. It can be assembled in a few hours with minimal electronic skills. The cost of all the parts is about .

The TCT is simply a LMC555 IC square wave generator. An audio taper pot and a 2% polypropylene timing capacitor control the 50% duty cycle oscillator’s frequency.

A bi-color LED in series with the output senses the current being drawn and a frequency dial indicates the frequency setting.

 

Qty Parts
2 Sets red/black alligator clips
1 Large Control Knob
1 Bi-Colour LED
2 10uF 16v tantalum capacitors
1 LMC555 CMOS IC timer chip
1 8 pin IC socket
2 470 ohm 1/2 watt resistors
1 10K Audio taper pot with switch
1 Plastic Box
1 Battery Clip
1 Battery Holder
1 Prototype Board

Assembly:

There are many ways to put the TCT together and it will work fine. For those less familiar with assembling things like this, I will describe how I did it.

I selected the plastic cover and located two points on the cover. The first was two inches from the bottom and the other one inch from the top. I drilled a 1/4 inch hole at the bottom mark and enlarged it a bit to fit the 10k pot. I then snapped the little tab off the pot with pliers and mounted the pot with the 2.25 x 2.25 inch scale under the nut. I then installed the knob using the off position for alignment. I connected a 470 ohm resistor to the center leg of the pot. I drilled a 3/16 hole at the top mark and was able to force the bi-color led into it. I added a bit of epoxy to hold it in place. I also epoxied the battery holder in the bottom half of the box. I drilled two 9/64 inch holes for two 8 inch lengths of wire to act as test leads in the bottom of the box. I tied and epoxied the leads to the box and installed alligator clips to the ends.

Tesla Coil Tuner Schematic

Tesla Coil TunerI used two other alligator clips to make a 6 inch jumper to short the spark gap for primary testing.

Circuit: Snap the two circuit boards in half and solder the 8 pin socket in the center of one. Following the schematic, solder the components to the circuit boards noting that S1, R2, R3, LED1, and the battery are mounted off the board. Use hookup wire to make the needed connections and bridge the pads with solder where needed. I put leads on the board for parts off the board.

Finish wiring the top and bottom of the box together following the schematic. See the picture for how the pot leads and switch are wired.

Install the battery and assemble the box top with the four screws.

Tesla Coil Tuner cct2 Tesla Coil Tuner cct Tesla Coil Tuner sw

Tesla Coil Tuner DialCalibration:

The provided scale will be fairly close. However, if you have a frequency counter or voltmeter with that function, you can calibrate your own scale

Operation:

The TCT is very easy to use for primary and secondary frequency measurements. Obviously, these test should be done will all power removed from the coil and all capacitors completely discharged! The procedures follow:

Insure all power is removed from the coil and all the capacitors are completely discharged!

Testing the TCT: To tests the TCT’s operation, connect the two test leads together. The LED should light and remain lit through the entire frequency range. Replace the battery if the light is dim.

Tesla Coil Tuner secondary coil testSecondary Fo: To test the secondary’s fundamental frequency, simply connect the TCT between the ground and the base wire from the secondary as shown below. Slowly turn the frequency through the range until the brightest spot is found. The lowest and brightest frequency spot is the fundamental. You may see the dimmer 3rd harmonic at ~3 x Fo. It is probably best to test the secondary frequency on the coil in the actual configuration since the secondary frequency is sensitive to the surrounding objects.

Tesla Col Tuner primary coil testPrimary Fo: To test the primary circuit’s frequency, simply connect the TCT across the primary cap and short the spark gap with the jumper. Slowly turn the frequency through the range until the dimmest spot is found and read the frequency on the dial. You may want to remove the secondary coil to prevent the secondary from affecting this test.

DIY Air Quality Meter

DIY Air Quality Meter & Emissions Tester

This little project shows how a simple hand held meter can be made for testing for air pollutants such as smoke and dust. It is based on the Sharp GP2Y1010AU0F sensor which measures light reflected from airborne particulates passing through the sensor. It is very similar in operation to the popular GP2Y0A21YK0F from Sharp which is used for measuring distance using reflected infrared light.

DIY Emissions Tester

This project came about as we were looking for a simple way of measuring car exhaust emissions. Searching online for other DIY Car Emission Testers did not bring up much, so we decided to create this device and share it here. There is lots of scope for improvement on this project, even in just some more advanced code for more functionality.

Emissions tester wiringWhat’s Inside?

Inside the box is the GP2Y1010AU0F sensor, a small fan, and our PDI-1 which is a simple Arduino based controller with an integrated LCD screen. The code provided should work on any compatible Arduino device such as a Nano, or Arduino Pro Mini. The advantage of the PDI-1 is simply that it already has a display, speaker, buttons, and a rotary encoder built in.

The outer enclosure is made from laser cut acrylic. If you have acress to a laser, you cam make use of the box design file provided. You might want to tweak the design a little as it did not leave much space inside for a battery. The 9V PP3 battery we used did not really give a good service life.

To get the reading, the microcontroller sends a pulse to the sensor. The sensor then takes a measurement and outputs an analogue voltage proportional to the amount of pollution detected. For a stable reading, we take multiple readings 10ms apart and then take an average value. The code then converts this value to be displayed on a graph.

Making use of the built in rotary encoder, it has been set up so that turning it adjust the scale on the graph allowing you to sort of zoom in for more precision on small changes. A single press of the encoder button will switch the graph from a bar chart, to a line graph.

Emission Test ResultsUsing The Meter to Test Car Emissions

For a good reading the sensor needs a continuous flow of air through it. To achieve this a small 40mm fan was mounted inside the box which blew air out of the underside. This created negative pressure in the box allowing the air from outside to be drawn in through the sensor. On the outside of the box a common 8mm barb pipe fitting was added which in part helps to prevent outside light interfering with the sensor and also allows for a silicone hose to be easily fitted. To take the measurements the free end of the silicone pipe was simply put into the car exhaust while observing the screen. In the image here you can see the difference in readings for clean air, the car idling, and when the engine is revved.

The reading given is currently just a number from the analogue input. To improve this project, the system could be calibrated to give an actual particle density value. However for our needs, a simple relative reading was all that was needed.

The code for this project is available here. If you have any suggestions for improvements or have your own examples, we would love to hear from you. Please post your comments using the form below.

 

DIY Solid State Tesla Coil

A Simple DIY Solid State Tesla Coil

This Solid State Tesla Coil is easy to build, upgradeable and gives great results with only a a little work! This project shows how to make a small Tesla Coil that can run on batteries or any other suitable low voltage DC supply. From as little as 12V input it is possible to make high frequency plasma sparks that even play music! The result of this high voltage, high frequency output is being able to make awesome looking sparks and arcs of plasma in the air.

high voltage danger logoWARNING: High Voltage Device! High Voltages can be very dangerous!

What is an SSTC (Solid State Tesla Coil)?
What it is and how it differs from a classical Tesla Coil (SGTC) which uses a spark gap.

Like all Tesla Coils, a Solid State Tesla Coil (SSTC) is a type of high frequency resonant transformer which can step up a low voltage DC input into a very high frequency AC output. The main difference between a SSTC vs a SGTC is that the SSTC has no spark gap an instead uses modern transistor technology to switch the current in the primary coil. If you are not familiar with them, check our article on how a Tesla Coil works. There are many forms of SSTC which vary by how the transistors are configured or how the system is resonated. In this version, just a single IGBT is used to switch current in the primary at the resonant frequency of the secondary coil. By using a specialised PWM circuit (our Power Pulse Modulator PWM-OCXi v2) it is possible to tune into the right frequency and then adjust the power level with the turn of a knob.

There are a lot of articles online showing how to make an SSTC, but we like to think that this one must be one of the simplest and most cost effective ways of making one and without compromising on performance. 

SSTC SchematicHow to make an SSTC
How to put the parts together to make a SSTC

If you choose to buy all the parts ready made then it is possible to get this Tesla Coil up and running in around five minutes! Only a few parts are required for this SSTC. These are detailed below along with how to put them together in a number of ways to make a simple mini solid state Tesla Coil.

For this project, you will need;

• Power Pulse Modulator PWM-OCXi v2 (Though it is feasible with only one OCXi, you will get a more stable and prolonged effect result with two!)

• A PSU with a voltage between 12V and 30V with a current of at least 5A. A large battery could also work, but take care not to let the voltage drop below 12V.

• A helical coil of around 750 turns (for the secondary coil)

• 10A (or larger) cable for winding primary coil

• A 1000uF, 50V (or more) electrolytic capacitor

• A 22pF timing capacitor (for the OCXi)

The Secondary Coil
The tall helical coil from which the sparks come

SSTC Secondary CoilThis part can be quite difficult and time consuming to produce yourself. If you do not want to wind your own, check out our helical coils or Tesla Coil Secondary coils which include a toroid. The exact size or number of windings are not critical as long as there is a relatively high number of turns on the secondary coil. Our coils use around 750 turns of 0.25mm magnet wire wound onto a PVC pipe of 53mm in diameter. This coil resonates at around 1MHz.

To make one yourself, find a suitable piece of pipe such as some drainage pipe or any other straight plastic tube that is around 20cm long. Start by fixing the start of your wire to one end of the coil then carefully turn the tube while holding the wire tight so that each turn lays right up against the previous turn. It is important to make all the turns tight and with no spaces or overlapping turns otherwise the coil may not operate efficiently. During winding it can be useful to add a small spot of super glue occasionally so that if you accidently let go, it wont all unwind and leave you with a tangled mess. When using magnet wire (enamel coated wire), it is necessary to scrape off the insulating layer at the ends so that a connection can be made. While this is not so important at the output side, it is essential at the base where there must be a good connection to RF ground.

The HV output will come from the top part of the coil. You should let a small bit of wire protrude away from the main body of the coil so that the electric field will be concentrated around it’s tip. The bottom of the coil must be connected to a suitable RF (radio frequency) Ground. This should not mains ground, or the GND connection of your power supply. This is because the high frequency can cause significant interference with other electronics. A suitable RF GND would be a connection to a metal filing cabinet, or a long metal stake in the earth.

The Primary Coil
Small coil pulsed with low voltage, high current

SSTC PrimaryThe primary coil simply consists of around four windings of thick copper wire wrapped around the base of the secondary coil. It is best to use something well insulated as it prevents corona leaking energy from the primary coil. In this example we used 10A silicone insulated wire as it is highly flexible, well insulated and easy to work with. Before coiling the primary winding onto the secondary coil, we wrapped a folded piece of A4 paper around the bottom and then coated the paper with insulating tape. This just helps to protect the fine secondary windings and also reduce corona leakage.

The ends of the primary coil connect directly to the PWM-OCXi’s output terminals (L+ and L-). The length of connecting wire between the OCXi and the base of the coil should be around 10cm. If it is too long, the extra inductance and resistance might reduce the performance of the SSTC.

HV PWM Control CircuitThe SSTC Drive Circuit
Connecting the PWM-OCXi to the primary coil and PSU

It is possible to just use a single OCXi drive circuit to make this work, but this will run the SSTC at a continuous 1MHz. While this will make a great silent plasma plume, it is really hard work for the IGBT in the circuit which means it will quickly heat up and could be damaged if allowed to get too hot. When used in this way it is sometimes refered to as a Continuous Wave SSTC (CWSSTC) due to the fact that the output is a continuous 1MHz high voltage waveform.

It is best to use one OCXi tuned to power the primary coil at 1MHz and then another OCXi (or another low frequency source) to modulate its output. By doing this we can make short 1MHz pulses that create a large spark while not dissipating too much heat over time in the IGBT on the OCXi drive circuit. The OCXi driving the coil will need to have the timing capacitor (C1) replaced with one rated for 22pF so that the frequency range is at the top end.

The diagram shown here shows two OCXi circuits in a Master/Slave setup. The circuits are powered from the same supply and a short wire is connected between the master’s DRV connection and the slave’s EN connection. More details about the master/slave setup can be found in the OCXi datasheet. The slave device is set to power the primary coil at 1MHz with around 50% duty, while the master OCXi is set to around 100Hz and 10% duty. Each time the master OCXi pulses high, the slave circuuit is momentarily activated. The resultant sparks look as good as they would with only one OCXi, but at only 10% of the power used!

It is important to connect a large capacitor such as a 1000uF 50V electrolyitic capacitor close to the power input terminals of the circuit driving the primary coil. This is used to help supply the high current pulses to the coil as a PSU or battery would not be able to do this alone.

DANGER: This device will create a lot of radio frequency interference!

Operating the Solid State Tesla Coil
Tuning and running the SSTC

First of all make sure it is set up in a clear space, and it is not near any sensitive electronics. This can cause a lot of interference with nearby electronics such as computers and phones. When doing this project, one of our computer screens around 10m away from the system would flicker when it was running! It would also cause significant problems when trying to make footage of this on our DSLR camera. Interference would reset the camera, or even corrupt the memory cards.

Before powering on the circuits, ensure that the duty setting of the slave OCXi is set to 0% while the frequency is set to maximum. If also using a slave circuit, set its duty to about 10% and the frequency to minimum.

Turn down the lights and then turn on the power to the circuits and slowly turn up the duty on the slave unit to around 50%. Watch the tip of the secondary winding for any glowing purple discharge and SLOWLY adjust the frequency control on the slave circuit until you get the biggest discharge you can. While doing this be make sure you regulary power off the system and check that the heatsink is not getting too hot on the OCXi. You may also notice that simply moving your hand near the circuit or secondary coil will alter the size of the glowing output. This is because moving near it actually alters the systems resonant frequency and therefore detunes if from what you have set on the controls.

Once satisfied with frequency the tuning, adjust the duty settings and frequency of the master circuit to give the desired effect.

Arduino SSTCMaking a Plasma Speaker
Making music come from the sparks of your SSTC!

The plasma at 1MHz makes almost no sound as 1MHz is well above the audiable range of human ears. When we modulate this frequency with another circuit, we are able to hear the frequency of that modulation. The sound comes from the air expanding around the plasma as it forms during each pulse. We can take advantage of this effect to make the SSTC play music without any speakers at all!

In this example we use an Arduino Nano (programmable circuit) loaded with some code meant to play music on a small speaker. Rather than connecting the output to a speaker, we connect it to the EN connection of the slave OCXi. Doing this causes the Tesla Coil plasma to be modulated at whatever frequency the music is.

SSTC Corona MotorIn the videos you can also see a spinning “corona motor”. This is made by simply bending a thin wire into an S shape and making a small loop in the middle so it can be hooked onto a supporting wire. As the plasma forms at the sharp tips of the wire, the air is heated and pushed away giving it some thrust. This will eventually cause the whole wire to spin quite quickly and give this cool looking effect!

DIY High Speed Flash

DIY High Speed Flash

This DIY project uses a high voltage system to create a very bright and short burst of light which is ideal for high speed photography. Standard flash guns will illuminate a subject for a relatively long time which will create a blur when photographing high speed events such as bullet impacts or exploding objects.

high voltage danger logo

WARNING: This project involves large high voltage capacitors. It is very very dangerous! One small mistake could kill instantly. Only experienced high voltage engineers should attempt this project.

By using this homemade high speed flash, it is possible to generate a very short burst of light which is bright enough to allow you to capture high speed events with a typical SLR or DSLR camera. 

AVAILABLE PARTS: Below you can find links to buy the key parts for this project

High Voltage Diodes (30kV 100mA)
Choke (85uH – 1mH)

How It Works

The flash of light comes from the electrical breakdown of ordinary air at atmospheric pressure. When a large enough capacitor is discharged through an air gap, the intense current will briefly generate a burst of electromagnetic radiation covering a wide spectrum. The optical part of this spectrum is seen as a white flash of light just as in lightning discharges.

The circuit uses two high voltage inverters which will convert 12V DC into about 20kV. One inverter is used to charge up a large high voltage capacitor which will be used for discharging energy as a flash of light. The second inverter circuit is used to create a brief high voltage pulse that will trigger the discharge of the main flash on demand.

The Charging and Trigger Circuit

High Speed Flash DiagramThe primary inverter consists of a Power Pulse Width Modulator circuit which is used as an ignition coil driver to power a small High Voltage Spark Coil. The output of the ignition coil is fed through a HV Diode and a small inductor so that it can charge up a bank of large high voltage pulse capacitors. The capacitor terminals are connected to a pair of electrodes that are spaced a little larger than the spark could normally jump when the capacitor is fully charged.

The second inverter circuit is used to briefly ionize the air around the two main electrodes which will allow the capacitor to discharge. Another Power Pulse Width Modulator circuit is set up to drive an ignition coil whenever it is activated by a button or sensor. The output of the ignition coil is directly connected to a wire which is placed near the main electrodes.

When the flash fires, the capacitors may not be fully discharged. It is possible to fit something known as a bleeder resistor between the capacitor terminals. This resistor will slowly discharge the capacitor when not in use. The resistance will have to be very high; something like 100M ohms should be suitable for this.

The High Speed Flash Tube

Fast Flash BulbThe high speed flash tube consists of two main electrodes on the outside of a small glass tube, plus a third electrode inside the glass tube so that it is isolated from the others.

The main electrodes are made by wrapping some wire around the outside of the tube. The wire used must be thick enough to withstand the high current and heat of the capacitor bank discharge. You could also use something else for the electrodes such as a pair of washers or nuts.


The cables from the electrodes need to be fixed so that they come away from the central tube and do not come close to each other, or anything else. They should be well insulated, especially once they are outside the tube. We used some silicon cable to feed directly from the capacitor to the electrodes and then added extra insulation by feeding the cable through some PVC tubing. This insulation was able to prevent any accidental discharge between the high voltage cables when in use, but should not be considered as safe for handling when live.

The third electrode is a piece of standard solid core wire which is stripped bare at the end. The length of bare wire should be about the length of the gap between the main electrodes. This wire is fitted inside the small glass tube so that the bare section is between the two main electrodes. The other end of the wire leads out of the tube and connects directly to the ignition coil. It can be quite useful to mount the high speed flash tube directly to the end of the HV coil so that it is not necessary to have another large insulated HV cable.

Using the Circuit

Before building the circuit, it is important to become familiar with the PWM Circuits being used for the ignition coil drivers. The setting of the duty control will determine the charge voltage and rate of charge. Setting this too high will overheat the the circuit or damage components.

The circuit should be powered from a 12V power source capable of delivering at least 3A. Check our notes on power supply considerations as there are tips that can help improve performance. This circuit is a high voltage circuit so the GND connection should be suitably earthed. If using a mains operated supply such as a lab bench PSU, this earth will most likely be built in.

The diagram above shows momentary push to make switches being used to charge and fire the circuit. To charge the flash, the ‘charge’ switch is held down for a few seconds. The exact time need will depend on number of capacitors used and the duty setting of the PWM. There is no built in method to determine if the capacitor bank is charged, so this will come down to user experience with the system. To fire the high speed flash the ‘fire’ switch just needs to be pressed briefly. It is possible to add a sensor instead of a push switch for activating the flash. The sensor just needs to be wired so that will pull low the INT connection of the trigger PWM when the flash needs to fire.

DANGER: The pressure waves from the discharging flash can cause the glass tubes to break. The tube should also be housed in a sturdy plastic case with reflector to direct the light and to capture any flying glass.

When using the system is is essential to have a clutter free work area, and to prepare for your photographs carefully. This will improve safety and also increase the chances of getting a good picture. The flash tube and capacitors should be fixed securely in position and mounted in such a way that someone could not accidentally touch or get too close to live parts.

To get the high speed photographs with an ordinary camera, the camera shutter needs to stay open so that an image is only exposed when the flash illuminates the subject. Most DSLR cameras will have a ‘bulb’ setting that allows you to keep the shutter open as long as is needed. It is of course essential that when performing DIY high speed photography like this, the room is totally dark (except during the flash) while the camera shutter is open.

The short bright flash from the tube when fired will be very bright and should never be viewed directly. It might also be helpful to wear sunglasses if the subject will be viewed when the flash is activated.

REMEMBER: This project involves high voltage, high current electrical discharges, potentially exploding glass shards, loud bangs, bright flashes, and must be operated in darkness! It is VERY dangerous! This project is here for educational purposes, we do not recommend that you attempt to replicate this project. You are entirely responsible for the way you use the information presented on this website.

DIY Robot II

A DIY Robot

This Arduino robot is built using the chassis from our old DIY Robot Project, but we have replaced the sensors and the electronics to use more modern parts. We intend to develop this robot as far as possible so there will be many updates to this which will be added to the article. Code and schematics are provided so we hope that if you use them you can post your project and any contributions here.

This project will be a continuation of the original MIRC and will keep the key concept of using ‘animal like’ responses and fuzzy algorithms while keeping logical “If/Then” actions to a minimum. The intention is that this approach will make the system more flexible and adaptable. 

Obstacle Avoider

diy Robot ChassisThis article will cover the initial stage of creating a system so that the robot will be able to get around and avoid obstacles. This requires a basic system for motor control, and also for reading and interpreting sensor information. The processing for this will be done using an Arduino Uno which is an open source electronics prototyping platform using an ATmega328 micro-controller. This has the advantage of being simple to program and interface with. There are also many code libraries available on the Internet which people have shared for making programming of common tasks even more simple.

Sensors

Starting with just four ultrasonic distance sensors the robot should be able to detect large obstacles such as walls, furniture, and people. The sensors are arranged on the front of the robot so that it can detect obstacles as it approaches them.

The sensors used are the HC-SR04 ultrasonic rangefinders. They were chosen due to the low cost and ease of use. They can connect directly to the Arduino without the need for any other electronics. These are a great alternative to the PING))) sensors from Parallax which cost around 5 times more. The HC-SR04 requires two digital channels on the Arduino which is its main disadvantage over the more expensive PING))) sensors which need only one. The SR04 sensors, when triggered, will emit a series of ultrasonic pulses and measure the time taken for the sound to reflect back. From this they will output a pulse with a duration proportional to that time. Knowing the speed of sound, it just takes some simple calculation to work out the distance of the obstacle from which the sound was reflected. There are a number of Arduino libraries for the SR04 sensors, but the one used here is an excellent one by Tim Eckel and is called NewPing. Using this library means that it just takes one line of code (after the setup) to get the distance in cm (or inches if you prefer) from any of the sensors. They will accurately return a distance reading from 2cm to 500cm with an accuracy of around 0.3cm. You can also limit the maximum distance if you do not need 5m and this will speed up measurement times as there is no need to wait for the return echo.

Motors and Drive System

The two back wheels are directly driven by some gear motors, that can turn independently so that steering is achieved by turning the wheels at different rates. The front wheels are just a pair of casters which move freely.

HC-SR04 distance sensorThe chassis for this robot is quite large and heavy because we intend to add much more to it later. This weight meant that the wheels should not be directly connected to the gearbox output shaft on the motor. Instead they were mounted on separate axles with a couple of bearings so that the weight is taken by them instead of the motor. If you want to replicate this part of the project, it could be done with a tiny robot as the Arduino and sensors are very small and lightweight.

diy Robot Motor EncoderTo the end of each axle is a rotary encoder. It was originally fitted to the motors shaft, but at a count of 64 pulses per turn, and a gearbox of 148:1, we felt that 9472 pulses per turn of the wheel was an unnecessary overhead for the small processor. The encoders were instead placed directly on the axle so that it would give 64 pulses per wheel rotation.

Any time the robot moves the wheel may slip slightly on the floor so this is an important consideration when using encoders to track the movement of the robot. To counter this problem, later versions will combine data from an accelerometer, magnetometer (compass), and the distance measurements with the encoder data to more precisely work out where the robot is and is moving.

Power and Wiring

diy Robot Fritzing layoutThe robot is powered by two 12V SLA batteries. One battery supplies power to the control electronics, while the other is used to power the actuators (motors). By having separate batteries, the high drain from the motor will not interfere with the accuracy of the sensors and control system. The battery for the control electronics feeds into a pair of voltage regulators (5V and 12V) so that the control electronics and sensors have the right voltage levels sent to them.

The power to the motors is controlled using a pair of LMD1800T H-Bridge drivers. They take 2 PWM signals from the Arduino, and two more for the direction of each motor. They also have an output for indicating current flow in each motor. This can be useful for detecting if a wheel is stuck as the current would increase significantly.

The diagram on the right shows the connections to the Arduino I/O ports. Connections for power are not shown for simplicity.

Source Code – Fuzzy Algorithms

The Arduino can be programmed in C# which is a simple and flexible language. In the first part of the code there are declarations for libraries, variables and constants that will be used later in the program. For this program the NewPing library is included so that the SR04 ultrasonic sensors are simple to use.

The main loop function will just be used to call other functions in the correct sequence. These functions are simply ReadSensors, AvoidWalls, SetMotors, and SerialDebug.

ReadSensors will ping all the sensors and store the measured distances in a set of variables. Later this function might also get the values from other sensors on the robot.

AvoidWalls is where all the numbers from the sensor readings are processed and the speeds for each motor are calculated. The algorithms used are known as ‘fuzzy logic’ because the relationship between the sensors and motors is continuously variable rather than any on/off conditions.

For example; To avoid a wall on the left of the robot, the speed of the right motor should decrease relative to the left motor, as it gets closer to the wall. This would have the effect of turning the robot away. The algorithms calculate an ‘urge’ to turn left or right, then these valuse are applied to the motor speeds.

newMotorSPD_L = basicVelocity + urgMotor_L + (urgTurn_R/4) – (urgTurn_L/2) + 60;
newMotorSPD_R = basicVelocity + urgMotor_R + (urgTurn_L/4) – (urgTurn_R/2) + 60;

Download the source code to see more.

When programmed in this way, the robot will simply stay still unless something tells it otherwise. If an object approaches it, then it will retreat from that object and try to maintain a distance from it. If you want the robot to drive around, then the value of basicVelocity should be set to a value above zero. This will give it a constant ‘urge’ to move forward while the algorithms will keep it away from obstacles. However, when moving like this, the robot can come to an equilibrium state when it is facing a corner. This is where the sensor values cancel out the basicVelocity and the robot will cease to move unless the obstacle changes.

SetMotors uses the speed values calculate in AvoidWalls to set the motor direction and PWM output values. It can also be used to accelerate the motors so that a soft start/stop is achieved. The rate of acceleration is determined by the value of urgFatigue which will add delays to the changing of the motor speed if this number is greater than 0. It is named urgFatigue as increasing this value will make the robot more sluggish and slow to respond. It should be noted that when accelerating the motors, delays are used and the sensor values are not being processed.

This system of urges and automatic obstacle avoidance will form the basis of a more advanced robot. Using serial communication, the urges will be manipulated by an external program running on a PC. The software on the PC will deal with more advanced processing such as mapping and route planning but will not directly control the motors. Instead it will simply calculate the relevant urges for the robot to move and then send them to the Arduino.

If you have any comments, questions, or suggestions, please add them using the button below.

DIY Induction Heater

DIY Induction Heater

This great little project demonstrates the principles of high frequency magnetic induction and how to make an induction heater. The circuit is very simple to build and only uses a few common  components. With the induction coil shown here the circuit draws about 5A from a 15V supply when a screwdriver tip is heated. It takes approximately 30 second for the tip of the screwdriver to become red hot!

The control circuit uses a method known as ZVS (zero voltage switching) to activate the transistors which allows for an efficient transfer of power. In the circuit you see here, the transistors barely get warm due to the ZVS method. Another great thing about this device is that it is a self resonant system and will automatically run at the resonant frequency of the attached coil and capacitor. If you want to save some time, we have an induction heater circuit available in our shop. You might still want to read this article though for some good tips on getting your system working well.

DIY Induction Heater WiringHow Does Induction Heating Work?

When a magnetic field changes near a metal or other conductive object, a flow of current (known as an eddy current) will be induced in the material and will generate heat. The heat generated is proportional to the current squared multiplied by the resistance of the material. The effects of induction are used in transformers for converting voltages in all sorts of appliances. Most transformers have a metallic core and will therefore have eddy currents induced into them when in use. Transformer designers use different techniques to prevent this as the heating is just wasted energy. In this project we will directly make use of this heating effect and try to maximise the heating effect produced by the eddy currents.

If we apply a continuously changing current to a coil of wire, we will have a continuously changing magnetic field within it. At higher frequencies the induction effect is quite strong and will tend to concentrate on the surface of the material being heated due to the skin effect. Typical induction heaters use frequencies from 10kHz to 1MHz.

HOTDANGER: Very high temperatures can be generated with this device!

DIY Induction Heater SetupThe Circuit

The circuit used is a type of collector resonance Royer oscillator which has the advantages of simplicity and self resonant operation. A very similar circuit is used in common inverter circuits used for powering fluorescent lighting such as LCD backlights. They drive a centre tapped transformer which steps up the voltage to around 800V for powering the lights. In this DIY induction heater circuit the transformer consists of the work coil and the object to be heated.

The main disadvantage of this circuit is that a centre tapped coil is needed which can be a little more tricky to wind than a common solenoid. The centre tapped coil is needed so that we can create an AC field from a single DC supply and just two N-type transistors. The centre of the coil is connected to the positive supply and then each end of the coil is alternately connected to ground by the transistors so that the current will flow back and forth in both directions.

The amount of current drawn from the supply will vary with the temperature and size of the object being heated.

Induction Heater Circuit DiagramFrom this schematic of the induction heater you can see how simple it really is. Just a few basic components are all that is needed for creating a working induction heater device.

R1 and R2 are standard 240 ohm, 0.6W resistors. The value of these resistors will determine how quickly the MOSFETs can turn on, and should be a reasonably low value. They should not be too small though, as the resistor will be pulled to ground via the diode when the opposite transistor switches on.

The diodes D1 and D2 are used to discharge the MOSFET gates. They should be diodes with a low forward voltage drop so that the gate will be well discharged and the MOSFET fully off when the other is on. Schottky diodes such as the 1N5819 are recommended as they have low voltage drop and high speed. The voltage rating of the diodes must be sufficient to withstand the the voltage rise in the resonant circuit. In this project the voltage rose to as much as 70V.

The transistors T1 and T2 are 100V 35A MOSFETs (STP30NF10). They were mounted on heatsinks for this project, but they barely got warm when running at the power levels shown here. These MOSFETs were chosen due to having a low drain-source resistance and fast response times.

Resonant CircuitThe inductor L2 is used as a choke for keeping the high frequency oscillations out of the power supply, and to limit current to acceptable levels. The value of inductance should be quite large (ours was about 2mH), but also must be made with thick enough wire for carrying all the supply current. If there is no choke used, or it has too little inductance, the circuit might fail to oscillate. The exact inductance value needed will vary with the PSU used and your coil setup. You may need to experiment before you get a good result. The one shown here was made by winding about 8 turns of 2mm thick magnet wire on a toroidal ferrite core. As an alternative you can simply wind wire onto a large bolt but you will need many more turns of wire to get the same inductance as from a toroidal ferrite core. You can see an example of this in the photo on the left. In the bottom left corner you can see a bolt wrapped with many turns of equipment wire. This setup on the breadboard was used at low power for testing. For more power it was necessary to use thicker wiring and to solder everything together.

As there were so few components involved, we soldered all the connections directly and did not use a PCB. This was also useful for making the connections for the high current parts as thick wire could be directly soldered to the transistor terminals. In hindsight it might have been better to connect the induction coil by screwing it directly to the heatsinks on the MOSFETs. This is because the metal body of the transistors is also the collector terminal, and the heatsinks could help keep the coil cooler.

The capacitor C1 and inductor L1 form the resonant tank circuit of the induction heater. These must be able to withstand large currents and temperatures. We used some 330nF polypropylene capacitors. More detail on these components is shown below.

Induction Heater CoilThe Induction Coil and Capacitor

The coil must be made of thick wire or pipe as there will be large currents flowing in it. Copper pipe works well as the high frequency currents will mostly flow on the outer parts anyway. You can also pump cold water through the pipe to keep it cool.

A capacitor must be connected parallel to the work coil to create a resonant tank circuit. The combination of inductance and capacitance will have a specific resonant frequency at which the control circuit will automatically operate. The coil-capacitor combination used here resonated at around 200kHz. 

It is important to use good quality capacitors that can withstand large currents and the heat dissipated within them otherwise they would soon fail and destroy your drive circuit. They must also be placed reasonably close to the work coil and using thick wire or pipe. Most of the current will be flowing between the coil and capacitor so this wire must be thickest. The wires linking to the circuit and power supply can be slightly thinner if desired.

This coil here was made from 2mm diameter brass pipe. It was simple to wind and easy to solder to, but it would soon start to deform due to excess heating. The turns would then touch, shorting out and making it less effective. Since the control circuit stayed relatively cool during use, it seemed that this could be made to work at higher power levels but it would be necessary to use thicker pipe or to water cool it. Next the setup was improved to tolerate a higher power level…

Wide range of parts available for induction heaters

Induction Heater Circuit IconPrebuilt Induction Heater Circuit  4mm Copper Pipe Icon4mm Copper Pipe
Coil Assembly IconPrebuilt Induction Heater Coil Assembly 30A Wire Icon30A Cable
Ceramic StandoffCeramic Standoff Ammeter IconCurrent Meter
PSU icon12V 15A Power Supply Ammeter IconVolt Meter
12v Pump Icon12V Water Pump Choke IconChoke
Radiator IconCooling Radiator Transistor Icon35A 100V Transistors
Pipe IconSilicone Pipe Heatsink IconTO-220 Heatsink
Resistors Icon240 ohm Resistors Fast Diodes IconFast Diodes
Polyprop CapacitorsPolypropelene Capacitors Transistor Icon12V Voltage Regulator

Induction Heating a boltPushing it Further

The main limitation of the setup above was that the work coil would get very hot after a short time due to the large currents. In order to have larger currents for a longer time, we made another coil using thicker brass tubing so that water could be pumped through when it was running. The thicker pipe was harder to bend, especially at the centre tapping point. It was necessary to fill the pipe with fine sand before bending it as this prevents it from pinching at the sharp bends. It was then cleared out using compressed air.

Induction heater tubingThe induction coil was made in two halves as shown here. They were then soldered together and a small piece of pvc pipe was used to connect the central pipes so that water could flow through the whole coil.

Less turns were used in this coil so that it would have a lower impedance and therefore sustain higher currents. The capacitance was also increased so that the resonant frequency would be lower. A total of six 330nF capacitors were used to give a total capacitance of 1.98uF.

Induction heater coilThe cables connecting to the coil were just soldered onto the pipe near the ends, just leaving room for fitting some PVC pipe.

It is possible to cool this coil simply by feeding water through directly from the tap but it is better to use a pump and radiator to remove the heat. For this, an old fish tank pump was placed in a box of water and a pipe fitted the outlet nozzle. This pipe fed to a modified computer CPU cooler which used three heat-pipes to move the heat.

The cooler was converted into a radiator by cutting the ends off the heat pipes and then linking them with PCV pipes to the the water would flow through all 3 heatpipes before exiting and going back to the pump.

If you do cut some heatpipes yourself, make sure to do it in a well ventilated area, and not indoors as they contain volatile solvents that can be toxic to breathe. You should also wear protective gloves to prevent skin contact.

DIY Induction Heater SetupThis modified CPU cooler was very effective as a radiator and allowed the water to remain quite cool.

Other modifications needed were to replace the the diodes D1 and D2 with ones rated for higher voltages. We used the common 1N4007 diodes. This was because with the increased current there was a larger voltage rise in the resonant circuit. You can see in the image here that the peak voltage was 90V (yellow scope trace) which is also very close to the 100V rating of the transistors.

The PSU used was set to 30V so it was also necessary to feed the voltage to the transistor gates via a 12V voltage regulator. When no metal was inside the work coil, it would draw about 7A from the supply. When the bolt in the photo was added, this went up to 10A and then gradually dropped again as it heated up beyond curie temperature. It would certainly go over 10A with larger objects, but the PSU used has a 10A limit. You can find a suitable a 24V, 15A PSU in our online shop.

The bolt you can see glowing red hot in the photo took about 30 seconds to reach maximum temperature. The screwdriver in the first image could now be heated red hot in about 5 seconds.

In order to go to higher power than this, it would be necessary to use different capacitors or a larger array of them so that the current was more distributed between them. This is because the large currents flowing and high frequencies used would heat the capacitors significantly. After about 5 minutes of use at this power level the DIY induction heater needed to be switched off so that they could cool down. It would also be necessary to use a different pair of transistors so that they could withstand the larger voltage rises.

In all this project was quite satisfying as it produced a good result from just a simple and inexpensive circuit. As it is, it could be useful for hardening steel, or for soldering small parts. If you decide to make your own induction heater project, please post your photos below. Please read through the other comments before making your own as it could save you time later on.

If you wish to simulate this project for testing different inductance values or transistor choices, please download LTSpice and run this DIY Induction Heater Simulation (Right click, Save as)

How hot will it get?

It is difficult to say how hot you will be able to get something as there are many parameters to consider. Different materials will react differently to induction heating and their shape and size will affect how the heat up or shed heat to the atmosphere.

You can get a rough idea using some basic calculations with the formula below, or if you prefer, we made a handy Heater Power Calculator that can work it out for you. This form includes materials (like water) that can not be directly heating using induction heaters, but it is still useful if you are trying to work out for example the power needed for heating a pan of water using a induction heater.

How hot will something get?


Choose the material being heated

Amount of matter in grams
g

Heating power in watts
W

No. of seconds heat is applied
s

Power lost as heat to surroundings
W

How long will it take for something to reach a specific temperature?


Choose the material being heated

Amount of matter in grams
g

Heating power in watts
W

Target temperature in °C
°C

Power lost as heat to surroundings
W

 

How much heater power is needed to heat something to a certain temperature?


Choose the material being heated

Amount of matter in grams
g

No. of seconds heat is applied
s

Target temperature in °C
°C

Power lost as heat to surroundings
W

 




EXAMPLE: How hot will 20g of Steel get in 30 seconds when heated with a 300W heater? (assuming 100W is lost to the surroundings)

Formulae: 
Q = m x Cp x ΔT
ΔT = Q ÷ m ÷ Cp 

Working: 
(300W – 100W) x 30s = 6000J 
6000J ÷ 20g ÷ 0.466J/g°C = 643.78°C 

Result: 
20g of Steel will increase in temperature by 643.78°C when heated with a 300W heater for 30 second(s).

Troubleshooting

If you have trouble getting this working, here are a few tips to help troubleshoot your home made induction heater project….

PSU (Power Supply)
If your PSU is unable to deliver a large surge of current when the induction heater is powered on, then it will fail to oscillate. The voltage from the supply will drop during that moment (although the PSU may not display this) and this will prevent the transistors from switching correctly. To help with this problem, you can place several large electrolytic capacitors in parallel with the supply. When charged they will be able to deliver a large surge current to your circuit. A good powerful supply would be our 24V 15A DC PSU.

Choke (inductor L2)
This limits the power to your induction heater. If yours is not oscillating, then you may need more inductance to prevent voltage drop in your PSU. You will need to experiment with how much inductance you need. Better to have too much, than too little as this will only limit the power of the heater. Too little may mean it wont work at all. If your inductor core is too small, high current will saturate it and cause too much current to flow and potentially damage your circuit.

Wiring
Keep the connecting wires short to reduce stray inductance and interference. Long wires add unwanted resistance and inductance to the circuit and can result in unwanted oscillations or poor performance. Our 30A power cable is well suited to this.

Components
The transistors chosen must have a low voltage drop / on-state resistance otherwise they will overheat, or even prevent the system from oscillating. IGBTs will proabbaly not work, but most MOSFETs with similar ratings should be OK. The capacitors must have a low ESR (resistance) and ESL (inductance) so they can tolerate the high current and temperatures. The diodes should also have a low forward voltage drop so that the transistors switch off correctly. They should also be fast enough to work at the resonant frequency of your induction heater.

Powering it up
When switching it on, do not have metal within the heating coil. This can lead to larger current surges which could prevent the oscillation from starting as mentioned above. Also do not try to heat large amounts of metal. This project is only suitable for small induction heaters. If you want to control or gradually turn up the power, you can use one of our power pulse modulator circuits. See post 5108 below for details.

Brain
You will need a brain that functions reasonably well to make this project safely. It can be very dangerous to build an induction heater, so if you are new to electronics, you should get someone to help you make it. Approach things logically; If it is not working, check the components used are not faulty, check connections are correct, read this whole article and all the comments, search Google if you do not understand any of the terms, or read through our Learn Electronics section. Remember: Hot things will burn you and can set things on fire; Electricity can electrocute you and also cause fire. Put safety first. 

Induction Heater CircuitInduction Heater Circuit available to buy

A fully assembled and tested Induction heater circuit is now available to buy from our shop. This circuit is a compact and efficient version of the circuit in this article. 

The circuit has in input for enable/disable of the power output so that it can be modulated by a PWM circuit for power control.

You can also buy the induction coil or parts such as copper pipelitz wirewater coolingcapactiors24V PSU and more.

DIY Vacuum Chamber

DIY Vacuum Chamber

DIY Vacuum ChamberThis is very simple to construct, and is made from low cost materials. The main chamber its self is the display case from a popular aftershave.

A bolt is inserted through the top of the plastic dome, and sealed with polymorph and rubberized glue. This bolt is used to allow electrical connection between the inside and the outside. A similar connection is made in the base of the chamber for a second electrode. The extraction pipe is also fitted in the base of the container.

The transparent dome can simply be lifted from the base (at normal pressure) and an o-ring is needed to seal it when the vacuum is on. The o-ring is simply placed in the groove for the dome with a bit of grease. If you can’t find an o-ring of the right size, a belt from a tape player, printer, or record deck may do the trick.

Although this setup could not contain a hard vacuum, it is perfect for plasma experiments, and other tests. As with any homemade device, great care must be taken when using this vacuum chamber. This device could implode if care is not taken to limit the pressure level.

Fusor Type PlasmaThis image shows the centre electrode of an asymmetrical dipole. This arrangement allows particles to be accelerated to a central point from all directions and is often used in experimental fusion rectors. Advance fusion reactors use toroidal (dohnut shaped) vacuum chambers known as a Tokamak

Click Here for more photos of high voltage plasma