Hao Jie Chan's Kingdom: Arduino
SD Wing Zero Custom is done! Click here to check it out!

Ad 468 X 60

built of paper.
Showing posts with label Arduino. Show all posts

Sunday, October 30, 2016

Arduino Uninterruptible Power Supply (UPS) Improved

A reader left a comment on my UPS post, he asked me to share the ‘improved’ design.

I would not really categorise it as an ‘improved’ design because I simply removed the P-MOSFET.

I also added a switch when they would not want the Arduino to be powered on.

Schematic

Arduino UPS

The UPS was meant to power up an Arduino Nano, from USB or a Li-Ion Battery.

I hope this blogpost will be helpful for anyone doing a small UPS for Arduino. Cheers


Read More »

Friday, April 29, 2016

Magnetic Levitation with Arduino

Hello guys! I posted my Magnetic Levitation project on Hackster.io! It is really a great site to share your own project!
Here is the link to my project: https://www.hackster.io/chanhj/magnetic-levitation-8c3ad0?ref=custom&ref_id=45065&offset=4

Magnetic Levitation

Even though I’ve posted some brief intro and instructions there, they are not very detailed. But then I am a lazy guy, so if you need more details, just leave a comment, maybe I can improve the post?
It's made with a U3503 Linear Hall Effect Sensor, a MOSFET and a LED. :D It is that simple.

Magnetic Levitation Circuitry

Magnetic Levitation Circuitry Interfaced with Arduino UNO


My code is copied directly from another guy listed in my hackster project. All credits go to him, I only edited the PID parameters. However, his code does not compensate for the field generated by the coil itself, maybe I can research more on that, keep planning... Less doing, all the time...


I have since then found another levitation project to make, it’s a rotating globe, with blinking LEDs! Who doesn’t love LEDs right? Until next time, keep making things! :D


Read More »

Sunday, January 17, 2016

A Buck Converter Power Supply

Power Supply

This project has been in my mind for a long time. I have always wanted an easy to use power supply, without resorting to Arduino for a 5V supply. With the addition of a cheap DIY oscilloscope which requires a 9V supply, this project became more and more important.
With the start of my sem break, this long overdue project finally got the chance to be completed.

Power Supply2
Another shot at the completed project exterior.

Power Supply Interior
The interior.

Power Supply Interior2
Okay, time for some explaination. This “power supply” is basically just a buck converter, I am using a cheap one from China, using MP1584EN as the switching IC.
My plan was to change the SMD potentiometer, to a bigger one which can be turned by hand. (I was frustrated by the need of a screwdriver just to change the voltage level.

The input is taken from a laptop adapter, which I have one laying around.  So, it is a 19-21V to maybe 0.8V-18V supply with a maximum of 3A load ( that’s what the datasheet and seller claims, I would not use it for more than 2A personally. )

Power Supply Interior3
The potentiometer solder pads were quite small and were ruined when I desoldered the pot. Heck I even spoil the pot! Then I put a 10K potentiometer initailly, found out that my input would not rise over 2V. I figured my resistance was too low for the feedback path. I then change the pot to a 100K pot. Better, but the voltage stopped at 10V. Can be used, but I wasn’t satisfied. I found that the resistor value is different for 2 batches of boards. Refer to the following photos.

MP1584EN board
This is from the old batch, green colour board. Now If we zoom in to the resistor,

MP1584EN board closeup
It’s 322, as in 3.2K ohm.

MP1584EN board new
The new one, (as in the one I used), blue board, has a 822 SMD resistor, 8.2K ohm. The potentiometer forms a potential divider with the resistor to produce a feedback to the IC. The IC requires 0.8V at the feedback. 100K is simply too small for me to generate up to 18V.

Thus, I hacked the board, again. I have some 10K SMD resistors around. I simply soldered them on top of each other, to reduce the resistance. SO in the end, it’s 8.2K//10K//10K = <5K ohm!
And that worked! Circuit theory rocks! Open-mouthed smile Sorry I just have to bask in my glory for a little while.
Now, I can move on the next project, which is still undecided.

 See you next time!
Read More »

Saturday, December 12, 2015

Arduino Uninterruptible Power Supply (UPS)

Recently a friend of mine asked me to design a simple Uninterruptible Power Supply for Arduino using some handphone battery ( Li-ion) and handphone charger.

I decided to use a TP4056 charger board to charge the battery, while using a P-MOSFET to control when will the battery provide power to a 5V Step Up Converter.



The schematic shows the 5V from a handphone USB charger feeding a 5V Boost Converter, which powers an Arduino Uno. The 5V will also charge the Li-Ion via TP4056 board. If the USB Supply is gone, the P-MOSFET will be switched on and the Li-Ion battery can power the Boost Converter.

( on second thought, now I am thinking about the usefulness of the P-MOS. I was thinking of switching the battery on and off but now I think it serves no purpose... LOL)

Anyway, the 2 diodes are 1N5158 , I forgot to change it on the schematic. I think the P-MOS can be eliminated because the 5V from the USB would have prevented the battery from supplying power anyway.



This is my end result on a perf board. My friend says that it is working fine, at least until now. (I have no confidence in my design).

Cheers!

p/s :for the improved design, go to http://chanskingdom.blogspot.my/2016/10/arduino-uninterruptible-power-supply.html


Read More »