Small Prototype Engineering
IO & ADC interface. 2021-10-27
Designed for Episcope a professionell IO and ADC adapterboard that works togehter with Raspberry PI4 and Arduino Micro with the formfactor of a Pi hat. It will be used in industrial enviroment for monitoring industrial equipment and has therefore high protection level against power transients and other disturbance. Of course the IO inputs are isolated for highest level of safety.
Episcope. 2021-09-23
2 months ago i teamed up with a small company called Episcope and currently doing some freelancing for them.
Timekeeper. 2021-09-17
This is barely considered as a project but i needed a timekeeper/ counter since i've started doing some small scale freelancing. I needed a simple timer that i could keep track of time spent on project by just pressing a button. I also added so there is two separate counters for different jobs.
I made it real simpe using a old controllernoard from work that i designed but actually didn't work for the purpose so it was more or less useless. But it had some buttons, a pic controller and a LCD.
Perfect!
The project is straightforward so there is'nt much to say aabout it but it's a perfect time counter tool for the lab :)
A really simple 3D printed case makes it easy to use
One issue with the code made me crazy. Often when power was toggled the display was showing the number 55 in the hour and minute section and i could not imagine why. I didn't understand where the number 55 came from.
I actually went to a electronics forum and asked what this might be. After some discussion a member found in the datasheet that for some reason every wright instruction to this PIC is initiated by writing HEX 55 for some reason. So what actually was going on is that when the code was writing to the eeprom the minutes and hours i sometimes toggled the power. When i timed it wrong the code had just written HEX 55 to the eeprom and was about to write the correct data but lost power. So 55 was then stored in the eeprom. I also discovered that i wrote to the eeprom when not supposed to. Correcting this and making sure to stop the counter before turning of the power solved everything!
From the PIC 16LF1937 datasheet
BCF INTCON, GIE ; Disable INTs.
MOVLW 55h ;
MOVWF EECON2 ; Write 55h
MOVLW 0AAh ;
MOVWF EECON2 ; Write AAh
BSF EECON1, WR ; Set WR bit to begin write
Ljudbyggaren tests PhazeSpy. 2021-04-03
Ljudbyggaren is a professional car audio installer located in south of Sweden. PhazeSpy will be tested by Ljudbyggaren and the first test run seem to have been a success. For you who don't speak swedish he thinks the instrument is fantastic. During the design phase Ljudbyggaren has had input regarding requirement and functionality.
PhazeSpy. 2021-03-22
PhazeSpy is a tool developed for car audio installers and professionals. When installing/ upgrading and troubleshooting car audio in modern cars you never know what cables you are actually cutting or connecting to.
Also on many occasions you need to identify which cable is connected to a specific speaker.
Newer cars have multichannels amplifiers and that amplifier is often located in the trunk. Most proffesionals use a small battery to "blipp" the cables and try to listen at the same time which speaker that pops. This works but there is always a risk that you actully "blipp" a sensitive signal cable and therefore damage expensive car electronics.
Also it's not practical to use a battery because you have to use a long cable when going around the car listenning and blipping at the same time.
PhazeSpy has some safety functions. It will detected if there is any voltage on the input of 0,4V and 1V inverted polarity. If there is no voltage present it will send out 5 short pulses of 25mW to measure the connected resistance. 1,5-9Ohm is considered as a valid speaker resistance. If this also is a pass it will send out a 100ms pulse of around 6.5W to move the speaker cone. This is audiable and therefore it's possible to detect which speaker is moving and the phase of the movement.
There are three user modes.
-First one is already described with the safety functions.
-The second is safety disabled and forced output pulses with 25mW 100ms.
-Third mode is also sfety disabled and forced output pulses of 6.5W 100ms.
Safety mode will sooner or later detect bad resistance due some speaker filter configuration. Therefore it's possible to run the audio tester in forced low or high power mode.
Auto-off turns of the tester after 20min.
The design is kept as simple as possible. It's based on the Pic 16LF15324 a 2.9V LDO and two FET's as loadswithches. One for low power measurement and pulse supplied by the 2.9V LDO. The othre FET is directly connected to the main power supply of 9V.
The detection of wrong polarity is using a opto coupler to isolate the different voltages. Because of this the lowest voltage that is detected is around 1V. This will most likely be improved in updated design.
Auto Off is solved with a design called "selfhold", almost what can be done relays. The button S1 enables the LDO and the whole board is powered. It should be above 400mV on the enable pin to keep the LDO on. When the MCU is running it will output a signal to the LDO keeping it turned on for 20min. When this time has passed the IO pin LDOhold goes low and disables the whole circuit.
Also the S1 switch is used to choose between the three user modes. S1 is connected to the IO called BTN. This pin is configured as a analog input. It can then distinguish if the button is pressed or its only the voltage form the LDOhold signal that is present.
In safety mode and without any load connected the output will send the short testburt pulses with 1s delay. Of course no high power is output because wrong resistance is sensed.
Complete safety logic can be seen in the pic above. Ch1 is Vout, Ch2 is MCU VDD, Ch4 is Iout. The circuit is loaded with e 3.3ohm resistor.
First the MCU checks if there is any voltage present, if not it will send out 5 short 20ms pulses folowed by a 50ms pulse. The resistance is checked 6 times. If the value is correct it will output the highpower pulse of 100ms.
Power supply to the MCU is actully falling slightlty when the high power output is present but it will not affect the performance since the voltage is stable when the short measuring pulses are performed!
When connecting a real speaker the signals where affected by the real coil and other speaker parameters. Althought the resistance measurement works well for most type that has been tested. One issue i had was that when i thought i had a working circuit a went and showed it to a person that work with caraudio so he could test and rewiev it .When he hooked it up to some speakers severall of them didn't work and the tester showed wrong resistanse. I tested them in my lab and they worked.
The conlclusion was that the workshop where the speakers where stored was around 16degC and my lab is around 23Cdeg. The cold made the speaker cone stiff and this messed up the resistance measurement thinking the resistance was lower. This was solved by connecting a 2Ohm resistor in series with the testobject to ground to elevate the measuring voltage and to recalibrate the adc value to be compared with a higher number. Initally only one resistance pulse was sent but it's more stabele to send out six and measure it severall times.
PiPower. 2021-02-08
I got a request to build a power supply for Raspberry Pi 3 B+ in the form of a Pi hat. Specification says it requires 5v and 2.5A. Althoug scroolling the web it can be found that an estimated average current load is around 1A or below.
The supply will be used in automotive appliaction and needed to have a delayed 30s on and off. This is solved with a diod and a RC net on the enable pin for the regulator
I choose a swithched buck from TI, LMR33630 and it is designed for an input voltage of 13,8Vnom and 5V/3A output.
The power board is tested for output voltage, output ripple and total maximum temperature at 2,5A and 1,5A current load.
At 2,5A continuous current load the temperature will rise above normal operating temperature if the board and regulator is not cooled but at 1,5A load the design works fine without any external cooling.
In the picture below i use my newest tool. A oscilloscope probe that user doesn'tt have to hold and is attached with magnets to a plate. Its the 200MHz passive probe SP200 from SensePeek.
2,5A current load tests
The hottest spot is the regulator with its 114,7Cdeg.
Output ripple @ 2,5A
Switch node
The swithing pulse goes bad when current above 2.2A is drawn from the regulator. The reason for this was that ai actually forgot to mount the input capacitor of 10uF. Even though i have a good quality bench power supply it still neede its input capacitor to work as designed. This shows the importance of following all design rules when it comes to switched regulators. After mounting the input cap the switch was fine as shows the pic below
1,5A current load tests
Regulator temp is 58,7Cdeg with 1,5A load which is much better
Output ripple @1,5A
Switch node
I prefer normally to order real pcb's but since i was in a hurry i etched the board in my lab. Its simple and cheap. But i cannot produce a good board reagarding thermal aspects. With a real 2 sided pcb the entire design would be cooler at high loads!