AFE for BMS Design 1

Getting Started with AFE’s for BMS design. Analog Front End IC’s are becoming more popular from major IC manufacturers. These chips are designed to wrap all the analogue circuitry required for the design and operation of a BMS system up into a small package. Reducing design and programming time for the designer(s). This forfill a useful segment of the market where the application may want different design parameters to a normal BMS design, or even just for learning the operation modes of a BMS. Texas Instruments makes a series of chips in the BQ769x0 line. These 3 forms of the chip cover usage cases for 3 to 15 series cells in the battery pack. However other manufacturers have created similar devices. Some, like TI, integrate the ADC and voltage reference on the same IC. For other brands a separate external ADC is required, this allows for higher accuracy at the cost of increased circuit complexity. ...

March 8, 2017 · 7 min · Ben V. Brown

LiPro Micro

LiPro PCB LiPro Micro The LiPro Micro provides state of charge monitoring, passive balancing and safety discharge for lithium batteries. The key benefit to utilising the LiPro Micro on your battery pack is the high accuracy balancing of the internal cells, prolonging the life of the battery. The key features of the LiPro Micro: State of Charge display (Based on cell voltage curve) Cell balancing (to within 5mV total error) Safety discharge after 7 days idle If pack sits at a high voltage for a long period of time the unit will discharge the pack down to a safer voltage level to prevent cell damage Very low power usage. (<100uA) Designed for LiPo and LiFePo4 (LiPo 4.1/4.2/4.3/4.35/4.4V & LiFePo4 3.6v) – Default profile supports most LiPo packs – Different curves can be selected to suit the connected pack – 3-5 Series cells supported (solder bridges on the back to select cell count) Operation Connect the small PCB to your battery’s balance plug. The board comes with a JST connector populated, this is normally a 3S but 3,4 or 5 is available on request. This is also very easy to change if you are used to soldering. ...

January 11, 2017 · 7 min · Ben V. Brown

Adding a secondary sd card on Raspberry PI

WARNING If you are planning to use the SPI method on a raspberry pi 1, compute module 1 or a pi zero, please read the extra instructions at the end of the page. These devices require a driver patch & kernel rebuild. (Its not hard, just slow). Secondary SD For one of my upcoming projects featuring a raspberry pi zero, extra internal storage is required and I wanted to keep the USB port free for connecting as a OTG connection. ...

December 10, 2016 · 8 min · Ben V. Brown

SD cards with STM32 over SPI

The time has come that I finally need to look into getting SD cards to work with the stm32. Looking online there seems to be a few really great resources for connecting to a SD card over spi from a smaller lower power however I could not find any guides for the STM32 line of chips. I am currently working using the HAL libraries as this allows for flexibility in working with different chips (in theory!). This does come at a cost of performance, however I have found the cost to be fairly low compared to being able to have already setup functions for most things. ...

November 4, 2016 · 10 min · Ben V. Brown

STM32 ADC with DMA

Most of my current projects are using the very, very nice stm32f103 series of chips, as these provide excellent performance per dollar cost. The embedded DMA in these chips is a massive help in getting a project up and running without any struggle for cpu power. I find the DMA documentation to be lacking at best with getting this system up and running using the new HAL drivers from STM. While this is actually quite an easy system to get up and running, I could not find any nice notes on how the system should be setup and things to be aware of. ...

November 2, 2016 · 5 min · Ben V. Brown

TS100 Soldering Iron

TS100 The ts100 is a portable DC powered soldering iron released by minidso. The unit offers between 25-70W of output power at the tip depending on the input voltage, and has removable tips (Not compatible with other irons as far as I know). Sadly the unit is crippled with their system for changing settings, while the unit supports nice options such as a customizable cutoff voltage; wake on motion, and automatic sleep times. They decided to make these options only available to be changed using the USB connection to the computer. ...

October 1, 2016 · 3 min · Ben V. Brown

STM32 I2C EEPROM with HAL

#Talking to a I2C EEPROM using the STM32 HAL libraries This mostly a note to my future self. This code is based on the excellent answers provided at the ST forums, but combined here as a complete class. This was used to talk to a standard I2C EEPROM, 24LC256. The following header file definitions are required for the class : #define EEPROM_ADDRESS 0xA0 #define EEPROM_MAXPKT 32 //(page size) #define EEPROM_WRITE 10 //time to wait in ms #define EEPROM_TIMEOUT 5*EEPROM_WRITE //timeout while writing #define EEPROM_SECTIONSIZE 64 These setup the I2C address, the maximum page size of the EEPROM (32 used here for compadability). along with the timeouts. Section size is used internally similar to a ‘bucket’ that each object stored, is stored in. ...

August 20, 2016 · 2 min · Ben V. Brown

Converting Reaver Pro to OpenWRT

Converting the Reaver Pro to run stock OpenWRT I bought one of the Reaver Pro units a fair while ago back when they were more useful.. Now that most routers have protection against the WPS exploit it has become mostly useless. However the unit itself is actually a really nice Alfa Networks HornetUB2 with upgraded Flash to 16MB and Ram to 64MB. Problem The U-Boot used on the router does not support the setenv command, and the unit comes with the memory boot location hard coded to 0x9f050000 which is NOT what all the documentation online appears to refer to. ...

July 27, 2016 · 12 min · Ben V. Brown

Project Zeta - RAM

Project Zero : The RAM In continuation of the development of Project Zeta, the small compact Z80 based microcomputer that I am slowly learning on, comes the next installment.. The RAM board! Now this is actually performing double duty as the ROM as well, as the inital plan is to program the RAM at boot with the program that the system is to be executed. Design The RAM board is designed to provide a nice simple breakout for two 32k SRAM IC’s onto the memory bus for the Z80, nothing fancy here, no bank switching or real logic. We utilize two logic gates (7432 OR gates) to decode the output gating and the write enable on the two chips. Along with an inverter on the A16 line of a single transistor. ...

July 15, 2016 · 4 min · Ben V. Brown

Project Zeta - MCU

Project Zero : The MCU (Programmer) To begin the design and creation of the project I worked on the base board of the design.. The Microcontroller, an Atmega 2560 was chosen to form the programmer and interface to the whole system primarily because of its large pin count and also I happened to have a few left over from a previous project. The Atmega is configured to run from its internal 8Mhz oscillator and to also output this out the CLKOUT pin so that later on this can be used to provide the system clock to the Z80, this is switched with a GPIO that can be used for single stepping support via a 74AC157 Logic gate. Almost all of the connections on the Atmega are used for the CPU bus and associated lines, this ties up 34 pins of GPIO on the Atmega. The Address bus and data bus are arranged such that they fall neatly on the ports of the atmega so that we can directly write bytes to the ports directly without any bit fiddling. ...

July 12, 2016 · 3 min · Ben V. Brown