quinta-feira, 17 de abril de 2014

Dummy Load / Digital PSU

A power supply is must have for any electronic project but some times a dummy load is also useful. So, I started to design a power with a dummy load option based on this specs.

Power supply
Vout: 2.5V - 15V
Iout:  0A - 1A

Dummy load
0 - 1A

The power supply is based on the LM317 voltage regulator it goes from a minimum output of 1.2V to 30V at 1.5A, as for the dummy load see the video from  Dave's  he explains how it works.

The below schematic is only the analog circuit and it has two working modes, power supply and adjustable load, this modes are selected by a relay that switches the output pins connections in this configurations

Power supply                Adjustable Load
B+ -> LM317              B+ -> Mosfet
B- -> Mosfet                B- -> GND


The working principle for the voltage ajdjustment is very basic, a pwm signal is applied to the non inverting input of the OA and this one creates a reference voltage on the adj pin of the LM317
For the current adjustment it uses the same principle but is better explained on Dave's video 

For the digital circuit I used an PIC16F73, this mcu is used to generate two pwm signals, read three analog inputs and display information on a spi lcd.
On the software side I kept it simple as the final project is intend to use a an Android tablet instead of the pic and lcd, but for now on power mode it displays Voltage, Current and preset's, in load mode it displays Voltage, Current and Power it also plots a small graphic with the discharge curve.

Power supply mode, charging Li-ion battery (in this image battery is already charged)


Load mode, discharging Li-ion battery @3W





The pcb was designed with eagle and manufactured by OSH Park as this is rev 1 it has some issues like the relay footprint is wrong and diodes footprint is small, on the power dissipation side the heat sink is too small and should use an TO-220 mosfet instead of three so-8 mosfet


project files can be found here




segunda-feira, 24 de fevereiro de 2014

BMW bike Temperature and voltage indicator

This was a personal request from my boss to his bike, he notice that an empty space in the dash and ask me to see if I could add an temperature and voltmeter indicator, as I check the space I realize it was the size off an standard  2x16 Alphanumeric lcd and it could be easily fit. In the first approach I used an themistor and found out it was a bit unstable and not very accurate, for my second attempt i wanted a chip solution and the easy way was the DS1721. After having all components selected I draw the schematic and pcb, and it is simple circuit based on a pic16f819, the working principle is very basic for measuring the temperature it reads the data via i2c bus and for the voltage it reads an analog input connected to a voltage divisor



After assemble the circuit, I started the software and realize that the 5v form the regulator were good for analog reference and didn't assemble the TL431, all was working fine until the connection off the lcd backligth, I hadn't consider the current consumption and as result the magic smoke from the regulator and transistor, to solve this I had to connect a dedicated regulator for the backligth.