Difference between revisions of "MicroBoSL"

From BoSL Wiki
Jump to navigation Jump to search
Line 178: Line 178:
  
 
This looks like it is due to the reverse leakage of the regulators the twin TPS709A33DBVTs. The o-ring circuit provided a superior solution to the dual powering, in the mean time if lower power performance is needed, the regulator may be de-soldered.
 
This looks like it is due to the reverse leakage of the regulators the twin TPS709A33DBVTs. The o-ring circuit provided a superior solution to the dual powering, in the mean time if lower power performance is needed, the regulator may be de-soldered.
 +
 +
The o-ring change, the switch of the hall effect pinout and the power switch were fixed in the latest revision of the microBoSL (0.2.2). The crystals were also updated to suit current part availability.

Revision as of 21:39, 24 June 2021

For schematics and design files please see: microBoSL Board rev0.1.0


Here we will document the design of the microBoSL board, a miniaturized version of the BoSL board optimised for automatic pumping operations.

Changes include:

  • Smaller size, no more than 14 mm in width
  • Integrated MOSFET for pumping operations
  • Reduced connectivity
  • Add connection for wake and pump counting hall effect sensors
  • o-ring circuit for USB or battery powering.


To do this many components will have their parts changed to a smaller footprint version. These substitutions include:

  • Many passives -> mostly 0402
  • ATmega328P-AU -> ATmega328P-MMH
  • FT232RL -> FT232RQ
  • 74HC126D -> 74HC126PW-Q100
  • MCP7940NT-I/SN -> MCP7940NT-I/MNY
  • MCP1700-3302E_SOT89 -> MCP1700-3302E_SOT23

20th January 2020

The micro BoSL is here:

A quick test reveals that programs are able to be uploaded to the device. This verifies the status of the MCU and the USB-TTL converter.

Next is to test the RTC. A quick test with indicates that this too is working well. An issue is had a bit with the LEDs. These tend to stay on even after the USB power is removed. This is an issue as it could cause extended power draw. A work around found was to hold the reset button for 3 seconds until all the LEDs turned off after this they did not seem to turn on again.

A test using the RTC persistence time keeping indicates that the board can operate on battery power hence, the o-ring and power delivery circuit does indeed work.

Now we need to test the MOSFET. Applying a 50 Ω load connected on the high side to 5V, the MOSFET was able to turn this on and off. Thus, the MOSFET is at least capable of driving a 100 mA load, and it is suspected that an even greater load is possible.

Notably what hasn't been tested is the pin interfaces on the external side of the device. This includes the hall effect sensors. However this is very simple circuitry, direct connections to Arduino pins, so issues should be had.

25th January 2021

The sleep quiescent current was also measured, using the Arduino low power library (RTC on). This was found to be 6.8 μA. In idle the current was about 4 mA. The O-ring circuit was also tested more thoroughly. It was found that at battery voltages below 5.3V, the board drew zero current from the battery, preferring to be powered via the USB.

3rd February 2021

A test was conducted to see how the microBoSL was able to perform in a pumping environment. To do this the BoSL FAL pump was connected to a water reservoir and an empty water container. The pumping program was uploaded to the microBoSL, with parameters: PumpEveryXMin = 1, DurationOfRun = 180, NumberOfSpins = 10. The microBoSL and pump were powered with a 4.2V li-ion battery. The hall effect sensor was connected directly up to the ports on the Pump was connected on the positive side through 4.2V and on the negative side to the MOSFET integrated into the microBoSL.

The test was ended at the 3 hour and 9 minute mark as the microBoSL had not finished on its own. It is uncertain if this was because of the inaccuracies of the internal clock. At the end of the a volume of 260 mL was pumped. Given that over this time the pump underwent approximately 1890 rotations the volume per rotation is 0.14 mL. This is in accordance with proper operation of the pump.

26th March 2021

Getting Started With the RTC

The microBoSL features an inbuilt MCP7940N-xSN RTC. This can be used for keeping real time and setting alarms to wake up the ATmega328p. The RTC communicates via I2C and an additional multi-function pin MFP, which is connected to digital interrupt pin 2 on the ATmega. This pin is mostly used for waking up the ATmega328p from sleep on a timed alarm. The RTC may be operated either via I2C commands or via a library. One such library is this one.

Below is some code helpful in getting started with the RTC it will be using the library mentioned above. The code sets the RTC to upload time and then uses an RTC alarm to wave the device from sleep every 15 seconds.

//Include RTC library
#include <MCP7940.h> 
//Include low power library
#include <LowPower.h>                                                       
//initiate RTC class
MCP7940_Class MCP7940;                                                               
void setup() {    
 delay(1000); 
 //Set MFP to input pullup 
 pinMode(2,INPUT_PULLUP);                                                   
 Serial.begin(9600);  
 //Start RTC                                             
 MCP7940.deviceStart();
 //Set RTC time to code compile time                              
 MCP7940.adjust();    
} 
//interrupt service routine when alarm activates
void wake(){
 detachInterrupt(digitalPinToInterrupt(2));
 }
void loop() {   
 //create date object for alarm                                                      
 DateTime alarmtime;
 //create date object and get current time from RTC
 DateTime now = MCP7940.now(); 
 //print current time
 Serial.print(F("RTC Time: "));                                             
 Serial.print(now.year());
 Serial.print('/');
 Serial.print(now.month());
 Serial.print('/');
 Serial.print(now.day());
 Serial.print(' ');
 Serial.print(now.hour());
 Serial.print(':');
 Serial.print(now.minute());
 Serial.print(':');
 Serial.println(now.second());    
 //set alarm for 15 seconds from now                                         
 alarmtime = now + TimeSpan(0,0,0,15);   
 //set alarm 0 to go off when seconds match (argument 2 see library for other options)
 MCP7940.setAlarm(0,0,alarmtime,true); 
 //flush serial buffer
 Serial.flush();
 //add interrupt on pin 2 for MFP pin
 attachInterrupt(digitalPinToInterrupt(2), wake, LOW);
 //sleep
 LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
 //on alarm wakeup clear alarm
 MCP7940.clearAlarm(0);  
 Serial.println(F("Alarm 0 "));
}

Not that the RTC has no backup batter and will loose time if power is disconnected from the microBoSL.

A datasheet which has a details the complete set of features is available here MCP7940 datasheet

23rd April 2021

Some testing of new PCB assembly methods will be tested on the microBoSL. In light of this there are some changes which should be made the the microBoSL for added ease of use. These include:

  • 9 V tolerant voltage input
  • Solder point for M+, with VBAT connection
  • Switching hall effect sensor pins to match hall effect sensor print
  • motor direction switching
  • global board power switch to isolate all electronics (except RTC)
  • (optional) remove reset switch for reset contacts

Some changes to facilitate assembly:

  • Panelised PCBs
  • 10 PCBs per board
  • tooling strips
  • fiducials

In looking at the current BOM of the microBoSL there are quite a number of central components which are out of stock for some months. Therefore some alternate parts will need to be found, preferably these will be drop in replacements.

The 9V tolerant input was accomplished with two TPS709 LDOs, these regulators were chosen since they have reverse current protection, that is that current does not flow backwards through them. Hence they may be used as a replacement for the MAX40203 ideal diodes which have become out of stock. One LDO is used for USB power and one for the Battery.
The motor switching was accomplished with the ZXBM210-S H bridge controller. This accepts power directly from the battery to control the motor. It also has PWM speed control which can be used with the ATmega's PWM pins. The on off switch was implemented next. The reset button was replaced with reset pads which need to be shorted with a screwdriver or the like to activate. A SPST switch is now placed in the battery line. We still want the RTC to be active even when this switch is off, so the battery backup of the RTC was connected to a high impedance voltage divider which draws only 1 μA at with a fully charged battery yet is still sufficient to operate the RTC. As it happens SPST switches do not come in a high enough current rating and small enough size to disconnect the battery, to solve this a MOSFET is not used to switch the battery with a small switch acting to drive the gate of the MOSFET

4th May 2021

Below are renders of the MicroBoSL rev 0.2.0 which includes the above changes:

8th May 2021

It would actually be nicer to have more motor controllers onboard. I'll add three instead of just the one. Here is the new render, the PCB now measures 15 * 45 mm to accommodate the componenty.

12th June 2021

The new microbosls were tested, all components were found to be working except the power switch and the hall effect footprints. The power switch seems to constantly be in the on position. The hall effect footprint should have the pad arrangement, P G S, (ie power on the left, ground in the middle, and signal on the right.)

23rd June 2021

I assembled 2 microBoSLs today using solder paste and a hot air gun. The process worked quite well, the time spent was about 5 hours, however much of this was becoming familiar with the technique. The process used was the stencil solder pate onto the PCB, then to place the components on then to re flow with a hot air gun, this was repeated for the second side. The hardest part of the process was the placing of the components as they were often very small. Applying the solder paste and the reflow were rather quick. It is estimated that if done properly a set of 3-5 prototype boards could be completed in half a day.

24th June 2021

Work was done to test why the power switch does not work on the microBoSL, testing reveals that the footprint has schematic is incorrect and the source and drain of the power switch mosfet need to be changed. Once this is done the switch works as intended. Another issue noted is that the LED is illuminated when powered from battery this is a bad sign since the LED is powered from the internal regulator of the USB-TTL converter, which receives power from the USB port, this likely means that there is back-leakage in the system which needs to be traced down.

This looks like it is due to the reverse leakage of the regulators the twin TPS709A33DBVTs. The o-ring circuit provided a superior solution to the dual powering, in the mean time if lower power performance is needed, the regulator may be de-soldered.

The o-ring change, the switch of the hall effect pinout and the power switch were fixed in the latest revision of the microBoSL (0.2.2). The crystals were also updated to suit current part availability.