Ser SHOW

Have you ever needed to look at what is going on on a serial port and not have a PC/smartphone around because the location was a bit inaccessible? I did not need this until now, but now I do, so I was looking for a solution. After building this, I think that it would be a good addition to the modified programmer.

This is a quick and dirty solution, i scavenged of the build of the ESP8266 test rig which uses the XMEGA header board. It’s using a IL9341 driven 2.2″ 320×240 LCD connected over SPI on PORTC (see code for exact details). I used a rather small font(10×16) to be able to show a reasonable amount of text, 20 lines and 24 characters per line. The LCD is used in portrait mode, since it only supports hardware driven scroll on the vertical and I did not want to spend time with more complicated code to copy memory.  Even the hardware scrolling functions were missing from the ASF driver implementation for Xmega. Without hardware scroll feature, there would be a lot of time wasted moving data around the memory, and getting a reasonably fast response would require a lot of SW optimization.

Two hardware UARTs are used to monitor a bidirectional serial port communication between 2 devices, the one on PORTC and the one on PORTE. This allows the micro to know from where to where the data is going and display both in different colors, white or green, color matched to the input wires.

Since it needs to be portable, it is powered by 3xAA batteries. Current consumption is under 50mA, so that should be over 50 hours of operation. Additionally the micro supply is brought out, so it can be powered by the external circuit or provide power to it.

Here are a few pictures of the build and a video of booting up a router:

 

DSC_3939

DSC_3940

DSC_3957

 

Quiet 3D printer

Intro

I have recently purchased a 3D printer, mostly because  I was interested in learning about 3D printing, and of course, because I wanted one. Between buying a ready to print one and sourcing all parts individually, I went for a complete kit. I though getting a kit that needs assembly would allow me to learn more about it and I would enjoy assembling it. So, I went for a prusa i3 steel, because i wanted something capable of both ABS and PLA from the start and should have reasonable endurance.

The Noizzzz

Clearly, the thing is noisy, without any tuning it was constantly over 70dB, peaking at 75dB for some motions. Since I keep it next to my computer desk where I spent most of the time, I am troubled by it. So i made some changes to try and reduce the audible noise. For noise measurements I have used my smartphone with Audio Tool app and an IMM-6 calibrated microphone placed about 1m from the printer.

1. Support. Place the printer on something as rigid and heavy as possible. I found that tables are not that great, but a drawer set works better.

2. Decouple from the support, in order to minimize vibration transmission. Apart from a layer of foam, I used 4 furniture support feet placed under the Y carriage, which means that now the 3d printer touches the ground in less and smaller points than before. This helped a lot.

DSC_3769

3. Play with printing speed. As a mechanical system, the whole printer is prone to have certain resonant frequencies and it turned out that the default 50mm/s speed was the loudest possible.

Speed 1

4. Change the motor drivers. The biggest change I have managed to make in terms of noise was to swap the original A4988 X and Y drivers with DRV8825. While these produce a high pitch wine, the mechanical noise is strongly reduced, i managed to get about 8-10dB.

DSC_3923

5. Fix the power supply fan. The most annoying thing about it is that it cycles ON/OFF, not continuously variable according to the temperature. Of course  this is acceptable for an industrial power supply, but not for home use. I could have replaced the control with a variable speed one, but there is not much to gain here either: the fan is small and placed in a closed space. The solution i settled for was to replace it with a 9cm fan, the largest I found in my parts collection. After cutting out the previous guard, I mounted the fan as far away from the case as my screws allowed and sealed the area around with duck tape. This is to allow the air to flow easier and keep the fan blades away from the big aluminum plate which would cause noise. Of course, no fan is complete without a red guard on top, with a bit of scaling. I left the original control in place, but I added a 50 ohm resistor as well, to keep the fan turning at lower speed. My goal is for the original thermostat that puts the fan at full power to never trigger. Some tests have shown that this performs as desired, even the outside of the power supply stays cooler then before. This is clearly beneficial and should increase the life span of what is not such a great quality power supply. Check below for the build pictures below.

What is inside the typical not so high quality, 360W, 12V LED power supply:

DSC_3901

For thermal regulation, the power supply uses a simple mechanical thermostat placed inside the filter inductor, which switches the fan on at 45°C and switches it off at 33°C. Since the printer does not draw much power, the fan cycles ON and OFF, which is not that great for all the components, since they keep cycling between the 2 temperatures.

DSC_3906

I have removed the original fan and cu the grill to improve airflow as much as possible. The fan is placed at about 1cm further away from the case to reduce noise.

DSC_3910

 

DSC_3912

Tape is used to seal the gap

DSC_3915

I connected an extra wire to the positive supply of the fan to be brought outside in order to add a resistor to keep the fan at idle speed.

DSC_3914

Ending with some experiments for idle speed

DSC_3920

Of course, no fan installation is complete without a red grill

DSC_3921

Note: The E3D fan is small and it’s quite noisy, if the printer does not print. Otherwise there is no difference in noise with or without it, so there is no need to replace this one with something larger.

5UP – simple 5V UPS

Intro

Raspberry pi, routers, wireless nodes, NAS, some lights, all of mine have one thing in common: they need 5V power supply and could use one that is backed up. Now, I am not looking for hours of backup since i find the local electricity very reliable, I cannot remember when power was out for more than 10 minutes, but 1h should be ok for extreme cases. Since everything is already powered from a 5V supply with ample power reserve, i thought that a 5V in, 5V out version is best.

First fail

At first I tried using my 4×18650 batteries portable phone charger with both charger in and output on. It turns out that it will only work for some hours: as the step up converter is drawing power from the battery, even though it gets charged, the charger has a timeout. No matter what, the charger gives up and you are left consuming the battery and then it’s over. This takes more than a day if I start with a full battery, so it might fool you at the beginning. I tried looking for options to power the step up converter from the 5V input directly, but it turned out the compact PCB was making things worse.

Parts bin

I turned to my parts bin and searched for ingredients that would be needed to make one: A battery charger, a battery, and a step up converter. A 2.5Ah 18650 battery was just right, but i did not have a case for it so I 3d printed this one. The step up is an unknown DC/DC converter from ebay, it claims to be able to supply 5V at 1.2A, from a lithium battery, but that is about it. The charger is a 1A charger, which would charge the battery fast, while not overloading my 5V 2.4A supply.

Important: LiIon batteries can be very dangerous if mistreated, because of this I have used a protected cell: the battery contains over voltage, over current and over temperature protection circuits inside it, so in case something happens from the outside, it is safe. Please use a protected cell if you are replicating this design. I am not responsible for any consequences resulting from somebody using the information presented here, you are at your own risk!

Next up, let’s build the schematic:

5UP schematic

 

I have not been able to find this design online, hence the article. It is pretty straightforward: a step up DC/DC converter gets its input either from the battery or from the original 5V supply. When 5V_IN is available, because  the battery is a lower voltage than this, D2 conducts and provides power to the converter while D1 blocks the battery from discharging. There is about 0.3V dropped on the diode and some on the cable, in my tests the input of the converter dropped till 4.5V. If power fails, there is no 5V_IN available and D1 conducts and powers the converter.

Precisely for this voltage drop, I decided to use the step up converter after generating the uninterrupted supply at the common cathode of the diodes. I could have connected the schottky diode D2 between the output and input, and provide power to the output through it. This is seen in some other designs online. The drawback is that it requires the step up converter to be tuned to a voltage that is always lower than the supply reaching the UPS, otherwise the battery might supply the pi. With 4.5V from a nominal 5 reaching the UPS, I would have to tune the step up to about 4V which might not be enough for some attached peripherals, while running on backup battery.

The build

I plugged everything on a prototype board and started doing a couple of tests. I loaded  the circuit to about 1A mimicking a Pi and some things around it, with a 4.9Ω resistor(precise measured value). After a while it looks like the step up module reached a stable temperature of about 75°C maximum. This is rather high, so i recommend using it in a well ventilated enclosure, possibly with forced cooling. This is an extreme case, the Pi will be the greatest consumer at about 0.7A. On the right you can see the output voltage, on the left the battery voltage, in this case it is being charged.

DSC_3877

 

The LEDs on the modules provide a good impression of the status: the one on the step up converter signals power is available to the PI and any of the ones on the charger(charging/full) signal AC power.

Time for Pi tests:

DSC_3881

Efficiency results: Normally, the pi draws 2.8W from the mains while being idle, with a HDMI screen connected and Ethernet. While using the ups, after the battery is charged the total power draw is 3.2W, which means an efficiency of 87%. The actual lost power means 3.5KWh/year.

Idle power: Just the UPS alone draws 0.2W from the mains, after the battery is charged. All power numbers include the first 5V power supply, they are measured directly as power drawn from the mains with my sensitive power meter.

Backup time: as mentioned in the above test, the pi with only display and Ethernet is backed up for about 2 hours with a single 2.5Ah battery. The precise number of my 2 experiments is always between 2 and 2:15 hours, as I checked the status every 15 minutes.

Trust: I really don’t trust these eBay modules for a long time operation, the thing here is just for a proof of concept. As soon as I will get the chance I will purchase some “brand name” ICs to rebuild this with proper quality components.

Note: at some point i have used some step up modules that did not have a common ground between input and output. I suggest avoiding those.