Browse over 10,000 Electronics Projects

FISHINO becomes Mega

FISHINO becomes Mega

Battery charger’s stage

The U2 integrated circuit (the well known MCP73831) is the heart of this stage: inside it contains all the circuits needed for the charging and keeping charged a single cell lithium polymer battery. The integrated circuit is powered by means of a 5 volts voltage, applied to the VIN pin, while the battery to be charged is connected to the VBAT pin, and uncoupled via a 4,7 µF ceramic capacitor, that assures the integrated circuit’s stability. The chip integrates a system used in order to detect the battery’s presence, to say it all it is a quite problematic system that sometimes may detect it even when it is not connected, and particularly at the low voltages, when powering Fishino MEGA, even though this does not invalidate its functioning: the only setback regards the LEDs lighting, in those cases. The PROG pin is used in order to set the charging current, that in our circuit may be chosen between two values: about 100 mA with the bridge signed as 500 MA that is kept open (only the 10 kohm R9 resistor is inserted) or about 500 mA with the bridge closed, which corresponds to inserting the 2.7 kohm R10 resistor in parallel to the R9. The formula used in order to set the charging current – in the case you believed there is need to change it – is the following one:

formula_8

 

here, RPROG is the resistance applied to the PROG pin, expressed in KOhms, and IREG is the charging current, expressed in mAs. The same PROG pin, if connected to the positive of the power supply and left fluctuating (disconnected) is used in order to disable the charging, thus deactivating the integrated circuit’s internal circuits and reducing their consumption (almost to zero); this is used in our diagram, by inserting the Q1 MOSFET, a common 2N7002 having a N channel that, when the gate is negatively polarized, actually disconnects the two programming resistors, therefore making the PROG input a fluctuating one.



Advertisement1


The MOSFET is driven by the same signal used in order to drive the Q2 battery’s switch, even if in an inverse mode: a voltage at the VUSB or VIN inputs brings it to conductance and activates the charging, while when it is missing (when the circuit is powered by the battery alone) the MOSFET is interdicted and the charging is deactivated. In the end of this description, please notice the jumper signed as MEAS (measure) that enables the connection of the controller’s ADC0 analog input to the battery, in order to execute a check of the charging state.

 

USB interface

The USB interface is the same that has been used for Fishino UNO, therefore here we will limit ourselves to a brief outline, and will refer to the said article for an in-depth description. The stage revolves around the now well-known CH340G, an extremely good alternative to the much more popular FT232 or to other solutions having microcontrollers: the chip has been chosen for both economic reasons and for the simplicity of the circuitry, the performances being equal. The integrated circuit provides – as an output – all the signals of a RS232 standard interface, of them we use only those for the data transmission/reception (Rx and Tx) and the DTR signal used for the automatic reset in the programming phase, as in the original Arduino, which enables the loading of the sketches without having to press buttons or to activate switches.

Later we will return on the subject of the Reset circuitry, since with respect to the original it has been modified, so to enable a future reprogramming of the ATmega via WiFi.

 

ATmega 2560

In this section the Fishino MEGA’s diagram does not distance itself from the one for Arduino MEGA; the controller is the same, and is provided with the usual 16 MHz crystal, with 2 capacitors on the oscillating circuit and with a certain amount of uncoupling capacitors on the power supply lines, that are needed in order to avoid that disturbances on the power supply lines might influence the chip’s functioning. A note on the I/O connectors: as you may see from the images, a small 10-pins connector has been added, and put beside the standard one, but slightly staggered so to use a standard stripboard for the shields, therefore solving the long-standing problem of the wrong step of the Arduino connector, and without invalidating the compatibility with the existing shields.

Pages: 1 2 3 4 5 6 7 8

 


Top