Electronic Parts – How To

For both the Portable Roaring Kitten (Ver 0.9) and the Desktop Lazy Cat (Ver 0.9).

The Ingredients

Common ingredients for both versions (Desktop and Portable)

  • An arduino mini or mini pro. Acutally we have tried arduino minis from 3-4 different suppliers and apart from some marginal changes they all were interchangable. The pinout was the same for what we need.
  • 2x 10kΩ resistors (R1,R2), 1x 4,7kΩ (R3), 2x 100Ω (R4,R5), 1x 150/220Ω (R6). One 10KΩ (R7) linear potentiometer. of those only the 4,7KΩ is important to be precise. The 2 10kΩ can be adjusted in the arduino sketch. If you dont have a 1% margin 4,7KΩ, just measure a bunch and choose the most precise one.
  • 1x 250-470μF (C1) electrolytic cap, 1x 10-33μF (C2) electrolytic cap (all at least 16V), 1x 100nF ceramic cap (C3).
  • 1x Mosfet (Q1) . we started with an expensive mosfet IRF1404 while we aimed for constant PWM but most probably the quite cheaper IRFZ44N is as much of a good option even for future PID control of the heating element. For bang bang control even cheaper Mosfets would be ok.
  • 16 pins. 12 for the arduino connecting to the board and 4 for the arduino header connecting to the  usb2serial adapter. Usually pins are provided with the arduino mini.
  • An usb2serial adapter to connect to the arduino mini (some arduino minis have usb connection, so for those a usb2serial adapter is not needed..
  • 2x 5mm bright LEDs. One red , one green (or whatever color you would like to). Actually any LED is suitable the bright ones make a more strong effect. If you change the LED , change the respective resistances (ie the 220Ω for the red and the 100Ω for the green).
  • A 100KΩ NTC thermistor like the ones used in the reprap community capable of measuring upto 300C. Usual precision is 1% and beta 3950.
  • A board. you can etch your own using the source files, or you can make everything on a perf board if you like 🙂
  • The code.

Ingredients specific for the Portable Version (Roaring Kitten) 

  • A li-ion battery charger based on the TP4056 chip (you can find them cheaply on the internet).
  • A 3pdt switch. Actually thats 3 switches connected together. The switch should have 9leads on the bottom. That will serve as a ON/off(charging) switch which at the same time will put the batteries in parallel (for charging) and in series (for using).
  • Two li-ion 18650 batteries, a type that can handle 2A current draws. Around 2000mAh of capacity will give you more than an hour of usage. If you choose to use old laptop batteries just measure them first so that they can withstand the 2A needed by the device, they don't get hot, have a big drop in voltage etc.

Ingredients specific for the Desktop Version (Lazy Cat)

  • A DC jack and plug combo. Any type you have available will do.
  • A switch to turn the vaporizer on/off. We used round on/off rock switches.
  • A power supply. Actually an old laptop power supply is the best choice. Ideal choices are between 12-16V. Check the respective article on the preparation in order to understand the amperage needed for every choice.
  • A 5V linear voltage regulator (like LM7805) and the respective capacitors if your power supply is more than 12V. Again check the respective article on the preparation for the parts needed.
  • The 2 10KΩ resistors (R1,R2) are optional for the desktop. They are used to check the battery voltage and if low to switch off the heating element. If you skip them be sure to delete the voltage measuring code in the arduino sketch. If you are unsure about it, just add them they dont do harm.  Also the C1 capacitor can be ommited as you will use (input/output) capacitors in the linear voltage regulator circuit.

Preparation

The Board

(1-2hours)

Electronic Parts

Specific for The Portable (Roaring Kitten) Version (2-3hours)

Electronic Parts

Specific for The Desktop (Lazy Cat) Version (1-2hours)

Preparing The Thermistor (10-20min)

The usual 100KΩ thermistors have naked leads so you have to insulate them some way. So first use some heatshrink tubes in order to protect the naked cables from short circuiting (PTFE tubes are a good option also). Then solder two thin cables on the thermistor leads. Using Lead free solder works better as it has a higher melting point. The thermistor eventually will get hot. Probably not hot enough to melt the solder (the wool insulation will help), but its better to be on the safer side. Once put into place and glued, the thermistor will be a pain in the ass to replace again.

DSC00636

Preparing The Board

You can etch  a board using this image. Instruction on how to etch are all over the internet (even kids can do it). If you are not into etching, you can buy a board from us. We have a few boards to sell if you are interested send an email to waste (at) lionvap.org (7euros per board, postage included) will try to order some more. The same board applies for both the portable and the desktop versions of the vaporizer.

IMG_2763

board4etching

Portable The Arduino Mini (5-10min)

Start by soldering 4 pin on the serial port of the arduino (that is on the shorter side of the board. You actually need to solder, GND,VCC,TX,RX (all 4 of them are close together). then connect the cables between usb2serial and arduino mini. Connect Vcc on the arduino mini with Vcc 5V on the usb2ser, GND to GND. Then TX on the one to RX on the other and the other way round.

On the picture below you can see the 4 serial pins protruding from the arduino mini.

IMG_2779 

 

Installing arduino IDE and communicating with the mini

Install the Arduino IDE on your computer. In debian/ubuntu linux this is as straight forward as writting  sudo apt-get install arduino . Make sure though you are running arduino as root with sudo or that you add your user to the dialout group in order to be able to access the serial port sudo usermod -a -G dialout yourUserName . There are many tutorials on the internet on how to do it.

Plug the USB2ser on your laptop. LEDs will light up on both devices. Open arduino ide, load the sketch, choose arduino mini 16Mhz 5V on the boards, choose the right serial port. What you want to do next, is define on the sketchth temperatures you want for the Low / Med / High settings. When you feel satisfied with your changes, its time to upload. It can be a little bit tricky but once you get the hang of it, its easy.

Press the reset button on the arduino mini and keep it pressed. Press upload on the arduino sketch. The sketch will compile and then try to be uploaded. Just a bit before finishing compiling, depress the reset button on the arduino mini. Sometimes this process is not successful so you need to repeat it. If successful you will see done on arduino IDE. You can now open the serial monitor and check if data is coming in. As nothing is connected to the arduino yet, the data dont make sense.

You can also do adjustments on the temperature later if you want. For testing reasons we used the 3 set temperatures at 100 (low) 150 (med) 200 (high). You can put your desired temperatures by changing the numbers in the sketch

#define lowtempset 100
#define medtempset 150
#define hightempset 200

 

Troubleshooting:

If you cannot upload a sketch. Check that you are superuser (or you have sufficient rights). Check that the cables between serialport and arduino are connected in the right way. Check that you are using the correct serial port, the correct arduino mini 5V 16MHz, the correct programmer (AVRISP mkII). If ALL these are correct, try to synchronize your reset button depressing on the arduino mini, with the upload button pressing on arduino ide. If you get it correctly you will see more than the usual LED blinking on the serial port for some seconds.

 

 

Preparing The Voltage Regulator (only for Desktop Version) (10-20min)

If you choose to use a power supply over 12V, the internal voltage regulator of arduino mini wont make it. So you need an external voltage regulator to power the arduino. A simple LM7805 will do the job. Follow the circuit below if you are not familiar, or just watch this supperb video if you want to learn more details about voltage regulators.

7805-circuit

IMG_2875

1. Input    2. input capacitor (C1),    3. LM7805 Linear Regulator.     4. Output Capacitor.     5.Output Cable (5V).    6. Ground

 

 

Finding an appropriate Power Supply (Desktop Version)

Upcycling is our favorite game, so using an old unused laptop power supply became something llke an obsession (its also cheap, you cant get cheaper than free).  So we did a small test using both 30W and 40W heating elements on different Voltages. As you can see using a 40W heating element on a 19V power supply will draw 5Amps, which is usually too much for most power supplies. We found out that a sweat spot between quick heat up and not extra-ordinary amperage is between 12-16V using a 30W heating element.

Voltage Amperage
Variety 30W 40W
6.6 1.3 1.8
7.8 1.5 2.0
12 2.43 3.2
16 3.3 4.2
19 3.8 5.0

If you dont have 1% precision 100K resistors, just measure them with an Ohmeter before you populate them. Choose the ones closer to the stated value. If this error is +-1% then go on.

Populating the electronics can be a fun job. Start with the flatest parts, ie resistors. Resistors dont have polarity so placing them either way is not a problem. Solder them and then populate the pins. If the pins fall off before you solder them, you can use some tape to secure them.

Proceed with the capacitors. The two electrolytic capacitors have polarity. The usually white line on the capacitor is the -. The - or ground plane on the board is the biggest one (actually the one covering most of the board.

Then populate the LEDs.  You can solder the LEDs straight on the board (portable version), or on cables so you can place them further away from the board (most of the cases desktop version). The middle hole (number 2) is the cathode. On the LEDs the shorter lead is the cathode. Both LEDs use the same cathode hole. The first hole (number 1) is for the anode of the green LED, the last (number 3) is for the anode of the red LED.

The MOSFET (Q1) should be placed with the flat surface (the heatsink) on the outside of the board.

Finish by placing the wires. Actually place 3 wires on the 10K potentiometer as the potentiometer will be placed away from the board into the case. Also solder the Vin cables.

Don't solder yet the Heating element cables, the thermistor cables or the 5Vin cable (if you use an external votage regulator for the desktop version). You will need to solder those after you have completed step 4 of the mechanical How To.

Check the photo for reference. Leave also the arduino for later.

IMG_2779

Complete the mechanical part up until step 4. Then continue from there according to the version of your wishes.

So, now its time to start the cable salad. Try to get the cables long enough so that everything fits, but not too long because they wont fit inside the small housing. Take it as a Zen exercise 🙂 

IMG_2841

The easiest part of the cable salad will be the potentiometer (number 3 in the picture above). This is quite straight forward. The middle of the 3 cables will go to the middle of the 3 pins of the potentiometer. The other two will go to their respective ends. There is one small detail though. Place the cable attached to the ground plane on the side of the potentiometer you wish to mark as LOW. On the portable housing its easier to mount the potentiometer upside down, so be carefull not to place the low/med/high the other way round. Its not going to be the end of the world if you do though and its quite easy to fix (our first prototype had this issue).

Number 4 on the picture is the Li-ion Charging circuit. It has a bat+ and a bat- , its not easy to mix up.

Number 1 and number 2 are the + and - cables for the battaries. Which brings us to the elephant in the room, which is the 3PDT switch (number 5). Ok This wont be so easy (hence the cable salad), but this 3PDT switch is actually the part that does all the magic. It switches the device on and off (charging), but at the same time, it places the batteries in series (on position), and in parallel (off/charging position).

If you look closely on your 3PDT switch you will notice that it has 9 leads. Actually the 3 in the middle row are the main ones. When the knob is switched on either side, that means that the 3 main ones connect to the 3 leads on side which the knob rests, respectively. To make things easier we made a diagram below on how to make the connections. The knob on the 3PDT swich is rocking up/down in the diagram. Down is Off(charging), Up is on.

lion_connection1

Note that all the ground cables on the diagram connect to each other (on the first photo, actually, all connect to the bat- of the charger) . Start by soldering on the 3PDT switch all the cables that will go to the batteries, but dont solder the cables ON the batteries yet. Soldering with live wires is way more tricky (and sparky lol). Then solder the cables that go to the board (Vin) and the Li-Ion charger (bat+ bat-). Then solder all the grounds together on the bat- of the Li-Ion charger, and if everything went according to plan, you will have something quite similar like on the first photo. Use heatshrink tubes everywhere in order to leave as fewer exposed leads as possible.

If you reached that point and you are sure that nothing shorts, just be brave and solder the leads on the batteries.  Be careful not to mix up the bat1 and bat2 cables.

But WAIT. Before you solder them. Make a small test. Turn the switch to the off/charging position. Connect the cables to the batteries using your hands (you need more than two). Check if the batteries get really hot (ie short circuit). If not repeat the experiment with the switch on the on position. Now the vaporizer should turn on and start to heat up. If the batteries stay cool , everything is fine. You can solder them.

Again take care so that the cables are long enough to fit everything in the housing but short enough in order not to worsen the cable salad situation. Be really careful when soldering Li-Ion batteries. On every 18650 battery the positive lead is a very small part and the negative pole is actually the whole of the battery. So dont short circuit everyhting.

Soldering cables on Li-Ion batteries is usually not advisable, but according to my experience (dozens of batteries soldered), if you are careful and an adult you wont burn down your house or anything. Li-Ion batteries are not so unstable as Li-Poly ones. And I usually stay clear of Li-Poly. So the trick in soldering 18650 batteries is to go hot and hard with the soldering gun so you dont have to wait too long for everything to heat up. A good trick is to place the batteries in the fridge overnight inside a container. Take them out as long as everything is ready for soldering. Using flux always works better and sanding lightly the leads on the battery before soldering is also advisable.

If you finished that part without any sparks and any battery overheating (from short circuit), then you are mostly ready. by switching the 3PDT switch on/off you should see the vaporizer turning on and off by now. Congrats. You are really close to the finishing line.

The last part consists of placing eveything inside the housing. Place the 3d printed housing in front of you the opening facing you. The 3PDT switch goes on the left, the potentiometer on the right and the li-ion charger in the middle. The 2 batteries go on their respective places on the far left and far right of the housing. place the door/wood/board in front of the housing wood facing up. It will help you put everything in place. Screw the 3PDT and the potentiometer on the housing, tight enough for them not to move, but not too tight. Plastic breaks easier than the nut 🙂

Place th li-ion charger in the middle and put some hot glue at the bottom so it doesnt move. Do the same hot glue trick for the 2 batteries. Then put some hot glue on the leads of the 3PDT switch (optional for better electrical insulation). Then just screw the door of the housing with the wood and the board  on the housing (4screws 3mm wide 7-10mm long) . Take care not to let any component touch any other. If you were careful enough not to use too long cables, then the cable salad will be minimal and everything will fit with no extra force. Place the top border from the top, and READYYYYY

If the cable salad is too messy dont  be extremely dissapointed. On the first 2 prototypes we had to actually duct tape the door on the housing in order to fit everything inside. But here is a picture of how it is supposed to be. 🙂

IMG_2851

 

Some finishing touches. The charging circuit has a blue and a red LED for ready/charging indicators. Unfortunately these are mounted in a way thats not possible to see them through the ABS housing. The solution we found for this, was to use a small piece o fiber optics. The cheap kind you find in toys like lights.

unbranded-fibre-optic-fountain-light-silver

So you take a thread from this fiber optic, you cut it, bend it, make it double or triple thick and then glue it with some instant glue above the red LED of the charging circuit and the other end through the small whole in the housing. There two small holes in the housing just above the USB hole, but actually its mostly the RED LED thats important to be able to see. If you look carefully in the picture below you will notice the the fiber optic and a small pink 3d printed part who acts like a guide (experimental still)

IMG_2853

 

When the whole combo of test tube / heatsink / heating element /  thermistor is ready and inside the wood, the heating element and the thermistor on the board soldered (refer to mechanical parts desktop version step 4), its time to solder the arduino board.

IMPORTANT

If you chose a power supply over 12V, then you should cut the pin that goes to RAW on arduino (the first pin from the side of the MOSFET). This will prevent the arduino from sucking more than 12V which will fry the linear regulator on the board. For power supplies over 12V this is also the time to solder the output cable of the linear regulator on the 5Vin of the board so we can power the arduino with it (number 4 on the picture below).

Be careful to place the arduino on the correct side (the serial port pins should be on the side of the big capacitor). Actually the correct side to solder is the one that has the VCC GND A0 A1 A2 and 10 11 12 pins. When done it's actually time to check if you have done everything correctly. Because actually now your vaporizer is functional. Place some power (anything between 6,5V and 12V is ok) on the Vin (check polarity first) of the board´s and check if everything behaves as it should. The red light should turn on and the vaporizer should start getting hotter. You can also check the serial monitor on arduino IDE. It outputs voltage, low-med-high setting and temperature. Let the vaporizer heat enough so that the light turns green. Then let the vaporizer burn for 10-15 minutes. You may see a little bit of smoke on the first run, as small threads of the t-shirt can burn around the mounting screw.

IMG_2779

Lets give a little attention to our cable salad now.

IMG_2797a 

IMG_11

Time to solder the potentiometer (number 3 on the picture above) which is actually quite easy and straight forward. The middle of the 3 cables will go to the middle of the 3 pins of the potentiometer. The other two will go to their respective ends. There is one small detail though. Place the cable attached to the ground plane on the side of the potentiometer you wish to mark as LOW. On the portable housing its easier to mount the potentiometer upside down, so be careful not to place the low/med/high the other way round. Its not going to be the end of the world if you do though and its quite easy to fix (our first prototype had this issue).

Now take the positive cable of the Vin and the input cable of the voltage regulator and solder it on the one side of the on/off switch (number 2). Take a second cable and solder it on the second lead of the on/off switch. On the on position the two leads of the on/off switch should have an electrical connection. On the off, they should not. And now to the last part of the electrical connections. Take the other lead of the cable coming from the on/off switch and connect it to the middle pin of the DC plug (number 1). Take the ground cables of the board and the voltage regulator and solder them to the outer connector of the DC plug.

Do the same thing on the power supply. Check and double check for polarity. Normally the middle part of the jack is the positive and the outer part is the ground. The wrong polarity can fry many things on your electronics.

If you want to be extra secure you can connect a P-Chanel MOSFET as reverse polarity protection. For more information on how to do it, follow this amazing video tutorial. (yes we love afrotechmods).

Well you are mostly done. Actually plug the power supply to your power plug, and connect the DC jack on the DC plug (with the switch turned on off). Turn on the whole thing and enjoy your vaporizer working.

5 Comments

  1. I would like to send me a copy of the pcb design in the right size so i can print it.

  2. Hi, I didn’t understand the part on selecting power supplies, specially that chart. Isn’t the formula for power W = IV ?

    • welcome. The chart of the power supplies for the desktop is the MINIMUM power supply needed for the two different heating elements.

      Heating elements are practically resistors and they come in two different flavors. 30W and 40W. This measurement has to do with the nominal voltage for the 3d printer (12V). So a 30Watt heating element when powered by a 12V power supply will draw around 30W/12V=2.5A So if you plan to power your vaporizer with a 12V power supply you will need one that can draw AT LEAST 2.5A

      Many people though choose to power their vaporizer with higher voltages. I for example use an old apple power supply which is 16V. Being a resistor, the heating element will draw more Amps when you feed it with 16V actually around 3.3Amps . The power supply I have is 3,7A so I’m good to go.

      Using higher voltages makes the vaporizer reach the desired temperature quicker (my desktop goes from ambient temperature to ready in less than 1 minute and 30seconds), but also needs a more hefty power supply.

      I hope I helped with my explanation, if you have further questions dont hesitate 🙂

      PS1 dont forget to use an external linear regulator for the arduino if you use over 12V . the internal one will burn
      PS2 you can get away with marginal power supply, but you risk burning it (the power supply).

Leave a Reply

Your email address will not be published. Required fields are marked *