Search This Blog

Saturday, July 28, 2018

Sonar for the visually impaired - PCB design

Projects / Project Swiftlet 

A bit of update on the layout - just getting a feel on the size.
Under the battery: 1 LDO, 1 boost supply, 2 buck (step down) converter , 1 Li-ion charger.
Lower left hand corner: Ultrasonic receiver that is shared between left./right side with an analog Mux. Need the transmitter
Lower middle: ARM + SPI FLASH.

Not in the layout yet:

  • Ultrasonic driver, amplifier, power management, MEMS. They should fit in the board space.
  • Electro-mechanical (one set per side): Speaker , vibration motor, connector, ultrasonic Rx/Tx transducers.

Right now the strategy is to fit most of the control electronics on one side and run a cable as a glasses cord to the other side. While this makes it slightly heavier for that side, it reduces a lot of the wires.


The size could be further reduced by using smaller components for the ultrasonic receiver instead of reuse the parts from a module. The bottom halve of the PCB could also be folded 90 degrees in a rigid/flex PCB. That's something to think about in a much later stage.

Flex PCB idea for final product - how it flows up to save space.
More conceptual 3D modelling of the main PCB with the ultrasonic transducer mounted at 90 degrees on a separate PCB. There will be a much simpler PCB on the other side for just the transducer, motor and speaker.


I have to waiting until the ultrasonic modules to arrive before I'll know if I can make it work using a single transceiver. I am looking into modifying the circuits design and what I can to reduce the board space and power requirements. Also waiting for the motors and speakers to show up to find out their size and the actual power requirements.

Work in progress:

Changes:

  • Switched to larger packages - LQFP 64 for I/O count as QFN48 was running a bit low, by the time you pay for a port expander, might as well use a larger package. QFN was not available for that size.
  • I want to give the option of providing access to the amplitude of the return "pings". The ultrasonic receiver analog waveform can be sampled and the amplitude of the echo envelope can be extracted with some post processing and combined by firmware for stereo output which helps with orientation. The low power MKL series doesn't offer multiple DAC, so I added I2S audio DAC.
  • Had to modify SOT526 land pad to meet minimum 6 mils clearance. Added Debug connector
  • Thinner 0.031" (0.79mm) PCB for some weight reduction. Hopefully, it would be strong enough to resist bowing due to the battery holder.

Now basically waiting for the stuff from China to show up to make some measurements before I can finish designing the rest of the circuits and figure how I am mounting them.

  • How much power is the speakers going to need? Is headphone amp sufficient or I need to up the wattage.
  • Would I be able to use a single ultrasonic transducer? Would I be able to reduce the drive requirement by upping the receiver gain? Is there overshoot/undershoot from the transducer?
  • Speaker and motor dimensions and how to mount them?
The PCB will be extended toward the left side of the PCB for the motor, speaker, amplifier and connectors - for cable need to run to the other side - ultrasonic sensor(s?), motor, speaker.


Latest trial layout: 
I like rearrange layouts and optimize them via iterations to make more optimal space usage. More routing done - accelerometer, ultrasonic driver i.e. they are closer to their final resting place. :P
  • Thermometer moved to the ultrasonic daughter card for better thermo isolation.
  • Going to use separate TX/RX transceivers - better for close distance
  • Relocated the audio DAC from the left side to the right side of the ARM chip by remapping the I2S. This is to clear up more space on the left side for bulky parts like speaker, motor, audio amplifier, connectors etc.
Resume working on this project as my Battery Analyzer project preliminary routing is done. Done a bit more design/routing. As you can see, I am slowly packing the layout on the right hand side as routing progresses.
  • thermal sensor moved onto the transducer board further away from the layer of warm air surrounding the human head.
  • added a 2mm connector for signals to the left side. For now, an IDC ribbon cable would have to do.
  • picked a Class D Audio amplifier - Diodes Inc PAM8404 in QFN package. Shutdown current is less than 1uA (typ) which simplifies the power management as I don't need to switch off its power with a MOSFET. It also has independent left/right channels shutdown pins which allows for more aggressive power management.
  • made footprint/3D model for haptic motor. I played a bit with the motor and decided to change the driver circuit from a simple MOSFET to a low impedance MUX as half bridge driver. This allows for tighter motor control as dynamic braking can stop the motor spin pretty quickly. The draw back of this design doesn't allow for PWM, but given the weak motor that might not be an issue. TI's driver DRV2603 would have been nice here if only it would work from 1.5V directly.
  • I am going to try increasing the board size vertically to ease the routing congestion between left and right side surrounding the ARM chip. I am resisting the urges to cut up the ground plane too much under high speed signals.
After a lot of procrastinations, the preliminary board layout is done - well sort of. I still need to order the parts early next week and try out a couple of speakers and make decisions on a few connectors before committing to a layout for PCB manufacturing (hopefully next week). Also have to do a break out board for the left side for the sensor, speaker and haptic motor.
  • added EMI filters to the speaker outputs of the Class D Amplifier
  • consolidated the power control for SPI memory and audio DAC.
  • the board size has been increased vertically.
  • Sensor board has be resized to match.
  • Tempted to do round corners for the PCB.
  • Have to decide on speaker connector, debug connector, and spare I/O.
I extended the transducer PCB (vertical PCB) downward so that the right angle connector is no longer hanging during assembly. I am leaving a gap of 0.005" (0.127mm) for tolerance/warpage etc.

It seems to me that the most logical way of assembling the PCB is to have the headers in the main PCB as there are multiple through hole parts, so they could be wave soldered. I have rotated the transducers by 90 degrees so that their pins are more readily accessible for replacement.

A few connectors later, this is how it looks. Now there are 2 UART, I2C, SPI, SWD and power on the two 8 pins connectors.

Here is the breakout PCB on the left hand side. It shares the same sensor bare PCB, but with different stuffing option and orientation. The idea is to make all the 3 PCB on to a 100mmx50mm PCB that is on sale. The two sides are connected by cable which also acts as a cord.

The connector is mounted differently to maintain the same offset as the right side.


Here is how the 2 sides look. Ignore the white PCB as EagleUp hasn't figure out how to render the PCB textures for multiple sub PCB in a panel. There is still that upper right hand corner piece which I'll probably find something to fill it. I'll try to fit multiple design on a 100mm x 50mm panel Chinese proto PCB deal if I can help it. BTW I am funding this out of my own pocket. The Chinese PCB house that I am using actually has a bit more aggressive design rules than OSH Park and I have great success reflowing fine pitched parts onto them.

The Sensor PCB are done as a part - it is Sketchup3D imported PCB with the header pins. Much easier to deal with on the board layout side too as a component in the library. I tried to line up the components - cable connector, sensor board, the haptic motors and hopefully the illusive speakers. You want the last 3 to be symmetrical.

The sensor boards are the same on both sides, but the connector(s) orientations are different. The main goal is to minimize the PCB area which help to reduce weight. I reuse the PCB as I am cheap - getting 5 sets of PCB for prototypes for $12 plus $6 shipping isn't bad. The left breakout board has more space to play with, but it needs 4 connections to the sensor board. Have the bent header side on the breakout PCB and use the lower row connector on the sensor board is the only way to accomplish that. The right side has a much density board density, but allow the connections to the sensor PCB spread out more, so the vertical orientation and the upper row connection on the sensor PCB is used. That upper row however is at the corner of the transducer, so only enough space for 2 connections per corner.

I haven't quite decided what to do with the speaker as that and the case design is a good sized project. That's probably going to have to be something for next year's "Best product" entry. Right now just need to concern with getting the prototype out to be a semi presentable state for the contest.


I have moved up to the highest memory model of the MKL16 series as I'll need as much onchip RAM (32kB max) as I can for the recording. An external SPI RAM might also be the way to supplement the onchip SRAM memory for sampling. The memory can be accessed sequentially with DMA. I made some room for a footprint in the prototype PCB.

The prices aren't too bad - Microchip 23LC512-I/ST : 64kB SPI RAM is $2.50 CAD.


Also shown are the accelerometer(with magnetometer), and the pair of ultrasonic transmitter and receiver. There is a second daughter board (minus the thermometer) on the left side of the head.

The magnetometer is located away from magnetic sources such as the speaker and the haptic motor located at the far left of this picture.



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.