[{"content":"So, what to say. I can\u0026rsquo;t just build and fly quadcopters. As usual I have to create something that makes me gain knowledge or create almost the same solution but based on my idea how it should work. So I couldn\u0026rsquo;t really help my self when I did not really understand why one ESC-Motor-Propp setup would be better then an almost similar setup. And there is a lot of information \u0026ldquo;as usual\u0026rdquo; on the Internet, but most is based on the writers opinion. So I figured the best solution is to build a solution that really test all of this together, so I can get hands on real data to analyze :) So I did a lot of research on similar solutions, but the ones that I did find was not in the same standard or gave the functionality as I was after. So put together a few PCB boards that holds the functions that I need to test the \u0026ldquo;beta solution\u0026rdquo; before a real solution can be made. So the specifications/functions I am going for is. Minimum 1000Hz sampling rate from Voltage/current and load cell (strain gauge) and accelerometer. RPM will update as fast as possible, and will be based on pulse duration instead of number of pulses/time. All data is transfered to the computer so analyses can be done afterwards. Simple ramp , step and oscillation/wobble response analyze. Efficiency curve, and optimal efficiency range calculations. And a lot more.\nFirst a overview I tough that the best way is to create a sensor module that only holds the most basic functionality, and separate the specific functions to a separate module. So if I decide to redo a module, I don\u0026rsquo;t need to redo the whole solution. And I can reuse the modules for future tests/solutions. Main module is based on the STM32F4 32bit MCU that has plenty of power, so there will no problem to implement the functions I would need. Each Sensor module holds two high-speed SPI buses that will be used for transferring data between sensors and the computer. I did some calculations at first on the data-rate if I only would have used one processor to do all sensor data collection and transfer to the PC. The problem with that is the data rate trough the UART/USB bridge is precisely at its limit. So by separate them it will be easier to send at the rate I would like (min 1000 Hz) and still have bandwidth left. And the system will be more modular, so if I wouldn\u0026rsquo;t be a problem to add sensors later on.\nEach module I have made so far.\nPCB that holds the modules Boards are ordered and are on the way back.\nPC Software As usual I have a lot of different ideas. Basically each test run will hold data for everything, but it will be done so I can sort by Motor/ESC/battery/propeller/Ncells later and can be compared with all other runs that holds the same criteria as you are interested in. It will be written in C# and I have a lot code that has already been done with data sampling and graph plotting (see Modular Data Acquisition System)\nModules soldered. Update 2015-12-26 Had some time over to solder togheter a few modules so I could start with some tests.\nSerial Driver (UART/USB). Update 2016-01-26 I am using the FTDI FT230X Serial to USB bridge on my sensor module. And I decided to totally rewrite my serial/FTDI driver with threading in mind. The last serial driver was one of the limits when handling a lot of data. So the decision to spend a fair amount of time on the serial driver was not hard to make. And it paid of. Right now I do not have any USB/serial bridge that is faster then the 3 Mbaud then the FT230X can handle. I am working on a new board that can handle 12 Mbaud, so I have to wait until I can test the driver in a bit higher speed then right now. But so far it looks promising. Driver Structure\nResult with 3Mbaud in FTDI Mode\nIt only consumes 0.02% CPU and uses 12 threads when the CPU is running at 760MHz. 29ms per pack gives 34 packs/sec, so in total we get 34000 values/sec (32bit value) UART/DMA timing\nIt takes 29ms to send one package, each package holds CRC, package ID, address, command, ACK request, and 1000 32bit values (sent value is 0xFFFFFFFF) And the UART DMA is double buffered so there is no delay between each package on the serial stream\nSo it looks really promising, I cant wait until I can test with 12Mbaud . More to come\n","date":"2015-11-28T00:00:00Z","image":"/projects/in-progress/motorbldc-bench-tester/BenchTest-Controller-Structure-Overview.jpg","permalink":"/projects/in-progress/motorbldc-bench-tester/","title":"Motor Thrust Test Bench"},{"content":"So the previous quad with big motors and battery became a bit heavier then I hoped for. So I made a smaller hex one with my standard frame solution. And this one is running on 2s :) I do not know how long it will hold because the motors are burning up on 2s, but wow the quad packs some serious punch :) ","date":"2015-06-28T00:00:00Z","image":"/blog/power/IMG_1605.jpg","permalink":"/blog/power/","title":"More Power!!"},{"content":"So I made a new quad with my Raze32 FC board. One with FPV 8x20mm motors and a sleek carbon frame. ","date":"2015-03-13T00:00:00Z","image":"/blog/raze32-tested/CloseUp-Large.jpg","permalink":"/blog/raze32-tested/","title":"Raze32 Tested"},{"content":"So I been trying to build as small quadcopters as possible for a while now. So I tought that the next step would be to design my own FC med integrated brushed motor drivers for a hex quad. Been using the micro multiwii for some time, but after I started using the Naze32 for my 250 quad I was really looking for a better version of the micro multiwii, with no luck. So after some time and searching I did my own version that is HW compatible with Naze32 I just finished the cad, and will be ordering a few boards tomorrow, will be fun. I named it Raze32 It has the same HW as the Naze32 without the PWM7 and PWM8. But I have added 6x 7,5Amp motor drivers for DC motors. the board can be assembled with or without the DC motor driver. So I can make a real hex micro, and still use the board for my bigger quads Other then that there is a SBUS inverter that is connected to CH4 on the board. 2 open drain 300mA ports, so I can control leds direct. the board is only 20x38mm and 0,8mm thick. The motor driver takes 9mm of the lower part of the board, so it could be 20x29mm without the motor drivers. the board has 3 voltage regulators, one extra for the external radio RX. The MCU and MPU-6050 will be tested with 3v and 2.8v regulators, to see if it works Okay with lower voltage. So there should be no problem with low voltage drop on from the battery if I use 1S. It is designed to take 10v, so I can test 2S on the micro copter projects The side pads is designed for standard 2.54mm pin headers. Really looking forward to test them out Raze32_Sch . ","date":"2015-01-26T00:00:00Z","image":"/blog/flight-controller/Raze32-vs-Naze32.jpg","permalink":"/blog/flight-controller/","title":"My own Flight Controller"},{"content":"So my own design did not survive a 20m fall from a tree, how shocking :) So I boughta BEE245 from birdseye, a bit harder to break I hope :) ","date":"2014-12-25T00:00:00Z","image":"/blog/okay-carbon-way-go/IMG_0747.jpg","permalink":"/blog/okay-carbon-way-go/","title":"Okay, Carbon is the way to go"},{"content":"My First quad, why buy one when you can make one :) ","date":"2014-11-28T00:00:00Z","image":"/blog/first-quad-lets-see-fun/IMG_0533s.jpg","permalink":"/blog/first-quad-lets-see-fun/","title":"First quad, lets see if it's fun"},{"content":"There is not always a good solution to design your PCB without testing some of the more important parts or implementations ideas that haven\u0026rsquo;t been tested before, to see if it is working as you thought. So from the beginning I have been using experimental PCB boards that I could use to test my solutions. But long ago I switch over to SMD parts and scraped the trough hole components that I had. And then the experimental boards became quite hard to use. So I started creating different small PCB boards that holds my standard parts and solutions. I have quite a lot of them now, so I thought I could show a few. I use plastic plate as base that has a grid of holes drill in it, so I can mount the boards and use Dupont cables to connect between each module. MCU Boards Since many year back now I use STM32 MCU family as my standard processor. I made my own break out boards for the different MCU family\u0026rsquo;s. TFT 2.8 inch with touch + touch controller on the board 3 (half H bridge) channel power board, used as an example to drive BLDC motors 24bit ADC with a precision voltage reference I have made a lot of small modules, here is a few. (Bluetooth, 2ch stepper motor driver, various) For debugging I use my own USB to serial (3.3/5v) modules. And if the solution depends on various timings, then I place a dedicated connector with a few IO connections to the MCU. So when I debug internal race condition I can always use a logic analyzer to see what is happening. I have also made some larger boards like my DDS module. I put various function on the board that enables me to test a few DDS signal generator ideas I had. I have many other test modules that I will add to the list later on.\n","date":"2014-04-23T00:00:00Z","image":"/projects/finished/proto-modules/Fixture-Medium.jpg","permalink":"/projects/finished/proto-modules/","title":"Proto Modules"},{"content":"This is an charger upgrade to the KTH Segway (see the other projects). The problem with old one is that it do not handle balancing between the battery cells. And the segway uses three AGM batteries that do not like deep discharge. When the battery get totally drained, the cells will not get the same charge with the previous charger. So the solution is to build a much better suited charger that also handles the power to the other systems in the segway The project is not done, so I will show what I have done so far.\nBoards Main board holds the charger and three voltage regulators that should supply various functions in the segway. The charger is capable to charge the battery\u0026rsquo;s with Max 250W. And there is a lot of functions crammed into the unit. The unit is able to monitor each battery charge current, and voltage to better calculate the battery health and capacity, it also has the capability to connect to external current sensor to monitor motor current. Each battery has a sensor board that can discharge and redirect current from the charger. This way each battery can be separately charged and monitored. Each sensor board is daisy chained to the main board. So the main board can control as many battery\u0026rsquo;s the charger can handle ( about 46v ). All the settings can be made from a PC program. The main board is connected to the PC trough USB and can log data while the PC is not connected. This way you can backtrack the charge/discharge cycle. I will add more info soon\n","date":"2014-04-21T00:00:00Z","image":"/projects/in-progress/battery-managment-system/ex-front1.jpg","permalink":"/projects/in-progress/battery-managment-system/","title":"Battery Managment System"},{"content":"DipTrace Tutorial I have been teaching CAD Design technique at the university for 3 years now, and i felt that the students had a better chance to learn the cad package trough video then using the manual. So i put together a two hour tutorial on Youtube.\nVideo series ( in Swedish ) Youtube Playlist This video is public.DipTrace Pattern Editor Creating Footprints This video is public.DipTrace Pattern Editor Creating Footprint TopAssy This video is public.DipTrace Create schematic symbol This video is public.DipTrace Create Schematic This video is public.DipTrace Create PCB Part1 This video is public.DipTrace Create PCB Part2 This video is public.DipTrace Update Pattern This video is public.DipTrace Create PCB Board Fix This video is public.DipTrace Create PCB Board Check This video is public.DipTrace Create PCB Gerber I have made three videos that shows how i did the layout for the board the students should do.\nThis video is public.DipTrace PCB Design RUN Part1 This video is public.DipTrace PCB Design RUN Part2 This video is public.DipTrace PCB Design RUN Part3 I\n","date":"2014-04-21T00:00:00Z","permalink":"/blog/diptrace-swe/","title":"Diptrace (Swe)"},{"content":"Here will I place a few videos that I have done that do not follow any them.\nCapacitive Proximity Sensor [Swe] ","date":"2014-04-21T00:00:00Z","permalink":"/blog/varierad-tuturials/","title":"Mixed Tuturials"},{"content":"This is the next step from the Diptrace (PCB Cad) tutorial. The students have to solder there boards together and test and see if thy work as expected. So this is a small guide in soldering.\nSoldering Videos (Swedish) Intro Defualt Components Soldering small components Soldering LQFP Soldering SSOP The setup I used when I created the videos Here I can show one of the first videos I did, Needed quite some video editing before I could stand the result my self :)\n","date":"2014-04-21T00:00:00Z","image":"/blog/soldering-techniques/L1.jpg","permalink":"/blog/soldering-techniques/","title":"Soldering Techniques"},{"content":"By request I made a board that holds 8 channel temp controller. In this solution the sensors had be digital for high accuracy in a noisy environment, but there are also analog inputs that enables the module to be used as a generic 8ch PID controller.\nStructure Each channel can select input source, ether digital SPI or analog input (12bit resolution). Each channel has it\u0026rsquo;s own PID and control settings. The controller can be configured to work in many different ways. The unit is powered by a 5 to 24v and can send status and settings trough an RS232 port.\nTemp Sensor I used a small 5-pin SOT23 temp IC, LM95071 SPI/MICROWIRE 14-Bit Temperature Sensor. This gives me resolution of 0.03125°C between −40°C to +150°C.\nBoard Demo Video (sorry, there is only a Swedish version) Settings UART = 115200 RAW data to controller must start with $ and end with # !!!\nStandard Functions INF $INF# Show info data CLR $CLR# Clear (Resets) Settings, \u0026ldquo;Do not effect eeprom settings\u0026rdquo; SAV $BRN# Save settings data to EEprom (Burn current data into Eeprom) UPD $UPD# Update settings data from eeprom SWV $SFW# Show FW version\nTempSensor port -\u0026gt; Temp Channel Select function Select which TempSensor ( SPI port ) that selected TempChannel(PID regulator channel) should get it’s temperature from. TCS $TCS@1*3# Temp Channel Set, TempChannel 1 is set to use TempSensor on port 3\nEnable/Disable functions TCE $TCE*1# Temp controller Enable/Disable 0=Disable, 1=Enable (on enabled PID (I) is reset to Zero). All channels will be Enabled/Disabled. Only channels that is Enabled “CHE” will be activated on $TCE*1# CHE $CHE*1# Channel 1 Temp Control Enable (CH 1-\u0026gt;8) on enabled PID (I) is reset to Zero. CHD $CHD*1# Channel 1 Temp Control Disable (CH 1-\u0026gt;8) on enabled PID (I) is reset to Zero.\nMain Setup functions NOC $NOC*2# Number of active channels “in order” that should be used “0 to 8 -\u0026gt; CH0 to CH8” TUR $TUR*20# Temp and PID Update Rate in Hz, example = 20Hz DUD $DUD*2# Debug Update Divide, \u0026ldquo;Temp Update Rate\u0026rdquo;/DUD , in example 20Hz/2 = 10Hz. The debug data will be updated (sent) 10 times/sec SUR $SUR*1# SPI update Rate \u0026quot; SPI communications Freq\u0026quot; 0 = 140KHz 1 = 280KHz 2 = 500KHz 3 = 1MHz 4 = 2.25MHz 5 = 4.5MHz\nSDS $SDS*2# Set Debug Status, example = debug is set to output channel 2 data Debug_Status = 0; No debug Debug_Status = 1; Channel 1 data Debug_Status = 2; Channel 2 data Debug_Status = 3; Channel 3 data Debug_Status = 4; Channel 4 data Debug_Status = 5; Channel 5 data Debug_Status = 6; Channel 6 data Debug_Status = 7; Channel 7 data Debug_Status = 8; Channel 8 data Debug_Status = 9; Send only every channels temp in visual form {Value in (int)(float * 10)} Debug_Status = 10; Send only every channels temp in visual form {Value in float} Debug_Status = 11; Send only temp from all channels in graph data Debug 1 to 8 data format (Temperature * 10: Temp_Ref * 10:** Temp_Error * 10**:** PID_Resualt / 10**:** P_Resualt / 10 : I_Resualt : D_Resualt : PWM**) all values are in Short HEX and separated by “:”, new data is separated with 0x0A = \u0026ldquo;/n\u0026rdquo;.** Channel Temp Settings SRT $SRT@1*51.6# Set Reference Temperature, example set CH1 ref temp to 51.6 deg\nPID Settings SPK $SPK@1*101.1# Set Pid K value for selected channel, example K = 101.1 on Channel 1 SPP $SPP@1*1.1# Set Pid P value for selected channel, example P = 1.1 on Channel 1 SPI $SPI@1*0.1# Set Pid I value for selected channel, example I = 0.1 on Channel 1 SPD $SPD@3*10.5# Set Pid D value for selected channel, example I = 10.5 on Channel 3\nChannel Power Settings SMP $SMP@1*100# Set Max Power \u0026ldquo;PWM Max Duty\u0026rdquo; 0-100% example, CH1 set to 100% as max power level SLP $SMP@1*0# Set Min Power \u0026ldquo;PWM Min Duty\u0026rdquo; 0-100% example, CH1 set to 0% as max power level\nPower Invert function, For example active cooling equipment CIE $CIE*1# Enable Power Inverted function on Channel 1 (0% power inverts to 100% power) CID $CID*1# Disable Power Inverted function on Channel 1\nExample Channel1 Settings // Set Reference Temp SRT@1*55.5 //// Set CH 1 K value SPK@1*1 //// Set CH 1 P value SPP@1*400.5 //// Set CH 1 I value SPI@1*0.5 //// Set CH 1 D value SPD@1*100.5 //// Set CH 1 Set Max Power SMP@1*50 //// Set CH 1 Set Min Power SLP@1*0 //// Set TempChannel1 to SensorPort 1 TCS@1*1\nExample Main Settings // Temp/PID Update Rate in Hz TUR*4 //// SPI update Rate , 0 = 140KHz SUR*0 //// Set Debug Status = No Debug SDS*0 //// Debug Update Divide DUD*2 //// Number of Channels that is active NOC*2\n","date":"2014-04-21T00:00:00Z","image":"/projects/finished/temp-controller-8ch-pid/Structure.jpg","permalink":"/projects/finished/temp-controller-8ch-pid/","title":"Temp controller (8ch PID)"},{"content":"I made a system for signal data acquisition that had to be modular and also work standalone without a connected PC. It should be powered by battery or usb and communication should be done by Bluetooth or USB. The memory had to be absurdly large or else I had to implement a trigger and sample profile that should be able to handle various situations. The later was the better solution. I did the PCB HW and firmware plus demo PC software that held all the functions/classes needed for another guy that did the final PC software, mechanic parts and HW installation. So this is what I did.\nHW Part The system is based on a hub module (in the plastic case), a sensor module (aluminum case) and a sensor package (lower left corner). Multiple sensor modules can be connected to the hub trough daisy chain. The sensor module holds two differential input channels that are used for strain gauge measurement (Instrumentation Amplifiers), and six analog (12bit) or digital inputs. Each differential channel has a settable offset trough the 12bit DAC, so the offset can be adjusted while the profile is running. The module also holds one 3 axis accelerometer and one The RGB led is for status indication. The board on the picture is not fully populated. I used \u0026ldquo;no delay SPI flash memory\u0026rdquo; that enables me to sample and save data at a high rate. I made four flash memory footprints so it can be populated with 4 to 16MBit storage memory. I use two SPI channels so I can write/read to two memories at the same time. The module also holds a regulator for the 10v that is used for the strain gauge sensors. This voltage can also be recorded if the user wants to check supply variations. The module is divided into two sections, analog and digital. This is to reduce noise. The hub holds the USB and Bluetooth (v3.0) connection to the PC. It is using a step-up converter to step 5v (battery or USB) up to 12v for the strain gauge supply. The empty footprint below the Bluetooth is for another Bluetooth module type, but the one from ST electronics was better suited for speed reasons. This module also holds a global trigger input that is used in this application for absolute positioning of the cylindrical assembly it is mounted on. Both Hub and Sensor module has power saving functionality to reduce power consumption when the system runs on battery .\nSW Part This is the demo software that I did for the other programmer and for my own debugging purpose. The main structure of a data acquisition profile is that each sensor module has it\u0026rsquo;s own profile of how it will run - independent of the other modules on the system. Each Sensor module has n number of Sessions, each Session holds x number of cycles, each cycle holds period samples. Lets say the module monitors two pressure sensitive cables that are placed on a road (almost everyone has seen this some time on some road). A session holds the period settings. For each session trigger we get a cycle that contains data for each car. In that cycle we get a number of periods. Each period holds data for each wheel pair that are sensed by the cables. If we have specified that we only want to record 100 cars that meet the first Session profile, we can set cycle length to 100, and the create a second Session for another profile settings that detects trucks instead.\nSession Settings Each module can hold multiple different Sessions, and each can be used multiple times or until the memory is full. For each Session we can adjust the Differential channel offset (Vref). This is used for an increased range on ether the positive or negative signal side. If Vref is set to zero mV we have 12bit ADC resolution on the positive side of the strain gauge. or if Vref is set to (max signal)/2, we have 11bit ADC resolution on both side of the strain gauge. And the same thing if you like better resolution on the negative side only. The rest of the settings have the same functionality as in Period.\nPeriod Settings Start Triggersets on what signal or property you like the period to start on.\nExternal Signal is coupled directly to the global trigger (a trigger signal that is sent to all sensor modules). ADC is used when you like to trigger on an analog signal from a selected channel. Time is what it sounds like - time from the last Period ended or Session started. Percentage can be used when you have a repetitive global trigger signal. The module calculates the time between triggers and you can set a percentage so the trigger time can vary and you still get the same point between trigger signals. Direct means that the Period starts directly. Number of samples can be used if you like to wait n numbers of ADC samples before Period should start recording signal data. Start Flank sets whether the trigger should activate on positive, negative or any flank. Start Filter Time sets how long the trigger flank has to be steady before it is valid. The module starts recording data at the trigger moment, but if the filter shows that the trigger signal is not valid after n time it will delete recorded data and wait until next trigger. The value is X * 0.1mS, so a value of 100 equals 10mS. . Start ADC channel is where you set the channel that should be used if the Start Trigger is set to ADC. . Number of Triggers Before Start can be set if you know that there is n number of signal triggers before the data that should be recorded. . Start Value holds the value the ADC should trigger on in mV. . And there is the same settings for the end trigger. So you can set start trigger to an analog signal and set end trigger to time or number of samples as an example. For each period we can set different ADC settings based on what we want so sample. The Sensor module has three ADC units, each 12-Bit resolution. Total sampling speed (ADC1 + ADC2 + ADC3) while storing data to flash is about 60KHz. It\u0026rsquo;s mostly dependent on number of channels per ADC, flash write time and filter settings. In this window the user can set average (Filter) and wanted sampling frequency. Not every sampling speed can be met however, so the closest frequency is displayed (Selected Freq). The lowest sampling frequency is 40Hz / Average. In the window ADC3 has a sample frequency of one sample per second, but it takes 10000 samples and makes an average of those over one second. The ADC settings are then saved in the period profile. Each ADC can hold multiple channels. If ADC1 is set to 1KHz it does not matter if you select one or two channels, the sampling frequency is still 1Khz\nADC1_CH1 DIFF_CH1_SIGNAL_PIN. \u0026lt;- Strain gage ADC1_CH2 DIFF_CH2_SIGNAL_PIN. ADC2_CH1 DIFF_VOLTAGE_PIN. ADC2_CH2 ACC_Z_SIGNAL_PIN. \u0026lt;- Internal Accelerometer ADC2_CH3 ACC_X_SIGNAL_PIN. ADC2_CH4 ACC_Y_SIGNAL_PIN. ADC3_CH1 AIN_CH1_PIN. \u0026lt;- Analog inputs ADC3_CH2 AIN_CH2_PIN. ADC3_CH3 AIN_CH3_PIN. ADC3_CH4 AIN_CH4_PIN. ADC3_CH5 AIN_CH5_PIN. ADC3_CH6 AIN_CH6_PIN. Profile setup. To setup the Profile, the tree view holds the settings. Here we can get current status, Download profile to selected module, upload sample data, add and remove content. For each Session. For each Period. Main control to run each or all modules. Using Send trigger the user can manually trig each module and upload sample data. After the module has sampled the data it can be viewed and exported. This project was fun to create. I had to think a lot about timings and squeeze as much functionality in the MCU as possible without loosing sampling speed.\n","date":"2014-04-20T00:00:00Z","image":"/projects/finished/modular-data-acquisition-system/Sample.jpg","permalink":"/projects/finished/modular-data-acquisition-system/","title":"Modular Data Acquisition System"},{"content":"By request for an irrigation system based on \u0026ldquo;Ebb and Flood irrigation technique\u0026rdquo; I made a system that should be able to handle a very large area and variation in complexity as well as irrigation types. The system is modular and is based on a main unit and multiple modules that are used for sensors and system control. My idea was to make the system stand alone so there should be no need for a computer running the garden/greenhouse, but I still wanted a good and easy way to configure and log the system. So with that in mind I built a system that is stand alone, but configured with a PC program trough radio/USB. This is what I came up with:\nPC software P1 I though about how to make it easy to see the setup ether if it\u0026rsquo;s a small garden or a large greenhouse. So I made an aerial view solution. You can add as many \u0026ldquo;views\u0026rdquo; as you like and they will show up as tabs (blue arrow). With each view you can add a picture that should show your garden/greenhouse layout or parts of it by using multiple views. Then you can freely draw smaller boxes on the picture that indicate specific areas. Each box can be the area the sprinkler is affecting if you use sprinklers. Or it can be a flower bed area that use water drop irrigation. And so on. One module can control one area but it can also share sensor information or status with other modules/areas. Blue is views and red is areas within that view. Each area can connect to sensors or signals from the whole system. Only sensors that can be used (in this case Rain sensors) will show in the drop down selection box. Each area can control up to four activators, either on it\u0026rsquo;s own area or others. For example one main water solenoids that supplies all areas can be set in each area output, so when the area sprinkler solenoid is turned on the main water solenoid only supplies water when it is needed. Area Status holds current status from the area (Sampled from the selected sensors). Get Modules is where I select a specific module that holds a wanted sensor. Only modules that have the selected sensor will show in the list. Set Modules is where I select activators that should be enabled if the selected area output is active. Time frame Settings is where you can set start and end time for each day or for a specific day when the profile should be active. Last Enable is exactly what it says - the last time the area activators were enabled. Timer Settings is where you can set a \u0026ldquo;dumb\u0026rdquo; timer. Chain Settings is where you can link the selected are to another area, so this area follows the selected area\u0026rsquo;s profile. Max/Min Status holds the maximum and minimum recorded Temp,Rain,Moisture an Light values. Calc Settings are only for the irrigation profile for this area. The window below sets this. I have been experimenting with different Irrigation profiles and have implemented one that enables various settings. The \u0026ldquo;Calculated Time\u0026rdquo; box enables you to test various weather scenarios. If the area has Temp,Rain,Soil moisture or Light Sensors linked or only one sensor, this profile can calculate the Irrigations. The values in the picture are not for a real profile, they are just for show.\nMain Unit The main unit is based on a STM32F103 32-bit MCU. It is connects to the modules by two opto-isolated RS485 networks. There is one radio port that can be used if a wider range is needed. This is done with wireless routers that extend the RS485 network. The Main unit only needs a computer during the setup, but if the user wants a displayed overview (almost) in real time the computer can log and display the current status of the system. The main unit connects to the computer trough USB or Bluetooth. I have made one water level sensor board that can control one water solenoid. This one is specifically made for the \u0026ldquo;Ebb and Flood irrigation technique\u0026rdquo;. It is based on capacitive sensor technique so the PCB do not need direct contact with the water. This is my standard board that I can connect to moisture, light, logic, analog and rain sensors. It has an internal temp sensor but the module can connect to external temp sensor with higher precision if needed. The board also contains four output signals for activators like water solenoids. The module is powered trough the RS485 network and uses sleep modes to reduce power consumption. The plan is to integrate a bootloader so that each module can be upgraded from the main unit. More module versions will be create. They can be used for various functions in the system. For example\nMotor controller for fans and venting hatches. Water nutrient concentration sensor. Wall mounted buttons and information displays. And more \u0026hellip; Communication between the main unit and the modules is done trough a RS485 network with 32-bit address space. It uses data packages with CRC and ACK / resend functionality to ensure that right data is sent and received by the right module. The main unit can scan the network and request each module\u0026rsquo;s ID that is connected and responding. The modules and main unit restart if they by any chance happen to hang. The main unit can send a restart command trough the network if it detects a continuous error respond from any module. This is mostly not a problem, but if it by any chance should be, the main unit has the ability to reset the network.\nSimple video in Swedish More to come later on..\n","date":"2014-04-13T00:00:00Z","image":"/projects/finished/irrigation-system/frontPic_Bevattning.jpg","permalink":"/projects/finished/irrigation-system/","title":"Irrigation System"},{"content":"While I worked on my own segway I got a request from my University (KTH) to create a vehicle that the students should be able to test their control system theories on. So I created an improved version based on my own segway. My motto for this project was the same as for my own version\nHighly optimized controller and power boards give you the freedom to implement more advanced model functions without the need for workarounds. It should also be sturdy and hard to break.\nThis is the result Cad Two KTH students using the vehicle. . I used the same PCB board solution as in my homemade version. A bit better shielding than in my home made version. I used two 1.5 Hp motors with with almost no backlash in the gears. I used encoders that give me 8000 pulses per wheel rotation. Due to the motor power my motor drivers had to be able to handle the large current. The first step was to increase the copper area of the PCB power signal ways. I also changed the mosfets to IRFB3006PbF that can handle 195A continuous and 1080A pulsed. There are three mosfets for each branch in the H-bridge. . Power distribution board. Handles how the system is powered on, before we had one power switch. Now the system is always on and checks if the segway is in use or should power down parts to conserve power. Or shut down in a safe manner to protect the battery\u0026rsquo;s or if there is any other problem. in off state the board consumes an average of ~255uA @33V, this is made possible by using a super cap. So the regulators are only active during the charge of the super cap, after that the system is in sleep until the cap needs to be recharged. In afterthought I would have added a separate switch for the switch regulator IC\u0026rsquo;s, and cut the current consumption to about 50uA instead. . High power switch to control when the motors should be powered, and shut down on failure or to preserve power. The boards in the picture is not fully assembled. I made a new LCD unit small demo video of the LCD touch function The new LCD unit has touch a interface and a menu that can be used to adjust settings while driving. It also displays the KTH logo at power up :) I added better suited motor driver current sensors The battery\u0026rsquo;s are charged and balanced by this unit.\nStructure The structure is almost the same as my home made version. (New version uses LiFe battery\u0026rsquo;s instead of VRLA ones, and the new power distribution board is not in the structure picture) Connections between each part of the system Software/Firmware I wrote C code that is easy for the students to follow and to start with. This way they can get started with the control theory quickly. This is to free them from having to spend several hours with the base part of the code that makes the rest of the machine work. I even included auto calibration on motor drivers so the students can recalibrate the drivers if they overwrite the values. I included a start-up function on each board so if the student by accident put the main board code in the motor board the code would stop and indicate that the wrong code has been loaded. There is a lot of small things like this to make the development as pain free as possible. With the better sensors the logging result was a pleasure. Parts pictures of the segway I will add more soon I made a small time laps video, more like a test, there is one frame that keeps showing up. ","date":"2014-04-11T00:00:00Z","image":"/projects/finished/kth-segway-real/KTHsegway.jpg","permalink":"/projects/finished/kth-segway-real/","title":"KTH Segway"},{"content":"I am currently teaching a PCB Design course at my University (KTH). And the two previews years the students had to build a STM32 prototype board. The problem was that many of the students thought it was really hard to design the board layout, and there was not many that used the board afterwards. So for this year I changed the design so they should create a lab power supply. If you are going to study electronics you got to have a lab power supply. So I put forth three different solutions that the students could choice from, easy, hard, harder :) . Easy is only a board with internal voltage reference and two potentiometers for voltage and current. And the two other has a STM32F3 Discovery board as a reference and controller, with the harder boards the user can set the voltage and current limit trough push buttons.\nSpecification of the \u0026ldquo;Harder\u0026rdquo; board.\nCurrent limit and voltage is set trough push buttons. Max 20v / 1.5 Amp based on how much cooling the regulator IC gets. LCD that displays voltage and current (in mV and mA resolution). Frequency counter that can sens 1mHz to 10 MHz, I will know the true max when i have the real board assembled. Frequency generator , set frequency and duty (PWM). Voltage and current sense is calibrated to avoid nonlinearity in the ADC. Settings are stored in flash. So when you reset/restart the unit it will have the same values and settings as before. and some more.. This way it is better, because now I have a better way to determent (and show) how good the student has designed the board. By noise measurement with static / oscillating load or no load the students will see how good their design is. And I suspect some boards will oscillate or in worst case burn. So the students will be faced with troubleshooting their own board. And if the student board works, I will introduce a fault so they have to troubleshot, which is the best way to see if they understand the inner workings of the design :)\n(It\u0026rsquo;s quite some time sinceI used a breadboard)\nThe PCB.\n","date":"2014-04-10T00:00:00Z","image":"/blog/lab-power-supply/Front2.jpg","permalink":"/blog/lab-power-supply/","title":"Lab power Supply"},{"content":"I created a intelligent LED driver for my friend Marcus, his current project is to build a underwater torch light. The controller regulates the current to the led based on intensity setting and LED temperature. Most underwater torches are easy to break if you use it on land where the LED/Lamp will get overheated pretty quick. The controller can supply the led with 1.5Amp at most, I believe he is using the CREE MKR which is rated to 1665 lm at 15.25 W (12.2 V, 1250 mA). The first idea was to use the MCU to sense the voltage over the led when it\u0026rsquo;s turned off, and then use a PC screen to send command to the torch controller trough a PC program -\u0026gt; Screen -\u0026gt; LED -\u0026gt; MCU. But when we tested the idea it showed us that a standard LCD Screen did not affect the voltage out from the LED. but if we used a normal lamp or sunlight the LED supplied a few hundred mV, so that idea did not work. The board holds two switch regulators, one for the LED and one for the MCU. And the MCU canalso read the LED current. The MCU is a STM32L151 Want to read more about Marcus underwater torch, click the link LINK ","date":"2014-01-04T00:00:00Z","image":"/blog/led-driver-torch-controller/MKR_lg1-300x275.jpg","permalink":"/blog/led-driver-torch-controller/","title":"LED Driver (Torch Controller)"},{"content":"I needed a simple hotplate, so I used a few resistors in parallel to get the power I needed. The goal was to reach about 100 degrease, and I was almost spot on when I used a laptop charger as power supply. ","date":"2013-12-26T00:00:00Z","image":"/blog/diy-hotplate/h3.jpg","permalink":"/blog/diy-hotplate/","title":"DIY hotplate"},{"content":"Yeep, got the latest PCB boards and components delivered. Anyone how thinks soldering is fun and wants to help ? :) ","date":"2013-12-18T00:00:00Z","image":"/blog/i-have-a-few-thousand-components-to-solder/front1.jpg","permalink":"/blog/i-have-a-few-thousand-components-to-solder/","title":"Five thousand components to solder, where is my PNP"},{"content":"I created a strain gauge multiplexer that is used for sensing the force on five (x,y,z) points on a wear tester. It contains a multiple strain gauge amplifier and a multiplexer board. ","date":"2013-07-09T00:00:00Z","image":"/blog/strain-gauge-multiplexer/Bridge_1s.jpg","permalink":"/blog/strain-gauge-multiplexer/","title":"Strain gauge multiplexer"},{"content":"The housing is finished. So all thats missing is the code for the controller and PC. ","date":"2013-03-02T00:00:00Z","image":"/blog/solderstation-update/8.jpg","permalink":"/blog/solderstation-update/","title":"Solderstation Update"},{"content":"I made a batch of totally 9 board that I have sent to seeedstudio for production. Mostly the boards are for my PnP project, I was planing on waiting a few more weeks before sending the batch for production. But i have to create the camera vision SW/HW function in quite a hurry because i took on the vision implementation as a curse project in school. So I desprately needed the light ring for the camera, aka lighthouse. So this is the main board controller, there will be 2 of those in the PnP machine.\nhandles 7 stepper motor drivers, \u0026ldquo;3 digital and 4 normal step/dir\u0026rdquo; 4x quadrature encoder inputs 5x analog sensor inputs , mostly for vacuum sensors 6x digital outputs to control relays and stuff like that 2x RS424 connections to PC trough the RS424_to_USB board 1x camera control, lens focus driver 2x UART connections and some other stuff The other boards to the PnP project\n","date":"2012-11-30T00:00:00Z","image":"/projects/in-progress/pcb-batch-on-the-way-back/maincontroller_front-e1354303966100.jpg","permalink":"/projects/in-progress/pcb-batch-on-the-way-back/","title":"PCB Batch on the way back :)"},{"content":"I already know that I am going to use some sort of a vision based alignment functions to be able to place component based on captured image. The first approach is to find any solution that enables camera integration and vision based functions, so I can build my own shape detectors and alignment routines. Tested many different solutions until i found EmguCV which is a C# wrapper to OpenCV which is a very capable vision platform. So I did a small app to see if i could do a component pad search function. And this is the result. \u0026ldquo;I really have to switch to English in my videos, Sorry :) \u0026quot;\n","date":"2012-10-13T00:00:00Z","image":"/projects/in-progress/pp-update-vision-test-app/vision_Small.jpg","permalink":"/projects/in-progress/pp-update-vision-test-app/","title":"P\u0026P Update: Vision test app"},{"content":"So this is one of the milestones in a project, when the board is up and running and seams to be working as expected. I am happy !! But there is still a lot of functions that I have not yet tested, so there is still some time before i can be 100% sure everything is fine and dandy :) The screen layout is just a \u0026ldquo;test\u0026rdquo; to see how it can look like. . ","date":"2012-08-29T00:00:00Z","image":"/projects/in-progress/solder-station-v2-board-is-up-and-running/assam2-e1346270062732.jpg","permalink":"/projects/in-progress/solder-station-v2-board-is-up-and-running/","title":"Solder Station v2 Board is up and running"},{"content":"Finally I manage to have some time over so I could solder my new solder station pcb boards. There is still a lot to be done before i getthis one up and running as planned , but still this is progress!! The housing is still under construction, i have finished all cad and cam files. But there is still a few hours in the workshop left until the housing iscompleted. ","date":"2012-08-28T00:00:00Z","image":"/projects/in-progress/weller-solderstation-update/Boardfetured-e1346175395156.jpg","permalink":"/projects/in-progress/weller-solderstation-update/","title":"Solder Station v2 update"},{"content":"The idea have been stuck in my head for some time now, to make my own pick and place machine that should be able to assemble PCB boards. I want to do this project for its complexity which means a great challenge, and I like that. A pick and place has many interesting systems that has to work together with high precision and timing, if the machine should be able to place components at high speed. Some of the systems I have to develop:\nMechanical structure that can withstand heavy forces from the gantry while it\u0026rsquo;s traveling in X and Y at high speeds without vibrating or or being close to resonance frequencies. Vision system that can read components, PCB markings, and much more. Motor control, the system has around 6 axes and 4 more axis for feeder gentries, all of whom should be synced and running at high speeds. Large C# program that can handle all the functionality I have planed for the machine. Laser alignment of components. The laser unit is placed on the pick-and-place head so I can read each of the three components the head has picked up while it is moving the components to the PCB. Component feederSolving one of the problem almost every PCB pick and place machine has (except high-end machines) Vacuum and pressure systems. I have never worked with ether one of them so this will be interesting. And a lot more of goodies \u0026hellip; I know this project will take some time, but that\u0026rsquo;s fine by me :) Updates A bit more done in CAD 2014 Working on the motor controller algorithms and path simulator 2013-12-10 I still have some problem with the motor jerk. I want active jerk tracking, and it is not easy. If I did go with position points A and B to travel between, it would be easy. But I like to be able to change point B on the fly. A new improved version off the main board and motor module 2013-12-01 Main board Motor Controller Module The Motor Controller Module is based on 3 boards, each utilizing a 4 layer PCB Interface Board Controller Board Motor Driver The modules will be placed like this on the back of the head on the pick and place machine. I have hidden a few PCB\u0026rsquo;s so it is easier to see board placement. Started code development for the Motor Controller Module 2013-11-30 Enjoying myself with some CAD, wine and cheese :) 2013-11-25 Main Board result. A new structure for version 2 electronics 2013-11-20 Improved Motor controller 2013-11-01 I needed much higher step speed to the hybrid stepper motors, With this solution I can manage MHz if the driver and motor can handle it. It also supports closed loop control with encoders. I can fit two of this in one STM32F4 Few parts done 2013-10-01 Metal for structure parts has been bought 2013-01-25 The first Mainboard has been soldered 2013-01-3 There will be two of those in the PnP machine. The first batch of PCB boards is on the way back from seeedstudio with DHL 2012-11-30 I made a batch of totally nine boards that I have sent to seeedstudio for production. Mostly the boards are for my PnP project. I was planning on waiting a few more weeks before sending the batch to production, but I have to create the camera vision SW/HW function in quite a hurry because i took on the vision implementation as a curse project in school. So I desperately needed the light ring for the camera, aka lighthouse. This is the main board controller. There will be two of those in the PnP machine.\nhandles 7 stepper motor drivers, \u0026ldquo;3 digital and 4 normal step/dir\u0026rdquo; 7x end sensor inputs \u0026ldquo;hall sensors\u0026rdquo; 4x quadrature encoder inputs, enables up to 4 closed controlled motor loops. 5x analog sensor inputs , mostly for vacuum sensors 6x digital outputs to control relays and stuff like that 2x RS422 connections to PC trough the RS422_to_USB board 1x camera control, lens focus driver 2x UART connections and some other stuff The other boards for the PnP project, in order Main Controller Laser Alignment Lighthouse Controller Lighthouse Brick Stepper Drivers Mix of Boards USB\u0026lt;\u0026ndash;\u0026gt;RS424 Switch Board New Cad ideas. This is probably the solution I will use 2012-12-27 All the linear guides have been bought, 2012-12-20 The 7mm linear guide is sooo tiny :) Machine Vision update, 2012-12-15 The images in the bottom list shows each picture/vision function. The system finds the component pads and marks them with a green box, seen in the big picture in the middle. Camera vision test light unit, AKA Lighthouse , 2012-12-12 Small demo video Machine Cad update, 2012-10-20 So far this is just a crude cad idea, it is easier to make the drawing simple until you find the structure you feel will work. Machine Vision update, 2012-10-13 I finally found a good webcam capture driver. Now it\u0026rsquo;s time to sketch the vision system sw structure and make a vision driver for my controller sw package. Z axis ideas, 2012-08-30 This was just a test cad. That\u0026rsquo;s how I work. I make a lot of different versions of a solution to find out strengths and weaknesses. Finally I select the best ideas and create the final solution. New Parts, 2012-06-25 First approach, 2012-05-23 The first approach is to try to create a laser alignment function for the head. I did a simple setup to see if the filter I have will work to minimize the diffraction effect This is to see if could remove the diffraction pattern a light generates when it hits a corner. This is because the laser light is unpolarized and by using a polarize filter I can make it polarized in the vertical direction. This minimizes the diffraction pattern.\nDiffraction pattern \u0026ldquo;from wikipedia\u0026rdquo;\nWhen I confirmed that this could work I made a jig to hold the laser and the CCD sensor After a few hours in the workshop The stepper motors come from some DVD writers I had lying around. The assembly equipped with CCD sensor and laser The CCD sensor I used for this test is iC-LF1401 that holds 128 active photo pixels with 63.5 μm pitch (400 DPI). I would prefer to find a sensor that has more pixels and also is much wider than this one, but it will work fine for initial testing. I connected the motors and sensors to my test board that holds a STM32 MCU and 3 allegro stepper drives. This wont work without some controlling software. From the software I can control the motors and the sensor. \u0026ldquo;Image showing the laser almost centered on sensor\u0026rdquo; In the horizontal direction holds pixels on the sensor, and in the vertical direction holds each pixels intensity. This shows the sensor readout with the laser turned off, to my disappointment there was to much noise in the the readout. This means that I have to use a more powerful laser than i used in this test (5mW) so i can shorten the sensor integration time (shorter shutter time) I changed the way I display data, and it became clearer how to read the displayed data. The highest points dv/dt = 0 is the corners, and the low points between is the center on the sides of the component. To speed up the reading I can sample fewer points and interpolate data points between to estimated points that marks the component rotation and placement. few videos on the laser alignment test module Parallel light source ","date":"2012-08-27T00:00:00Z","image":"/projects/in-progress/diy-pick-and-place/bom_v1.jpg","permalink":"/projects/in-progress/diy-pick-and-place/","title":"DIY Pick and Place"},{"content":"Flash Programmer Sony had a major problem with one of there HDD recorder. The problem was that the main memory chip became worthless and the device could not start. The memory contained the player\u0026rsquo;s software. The only way to load the program files into the memory was through a dvd update disc, and the unit had to be operating for that to work. And all new memory chips was empty so there was no way to solve the problem. So the units were replaced and the not working ones were stacked waiting for a solution. I managed to find data sheets to to the memory circuit, and hoped that the security features are not activated in the units memory. An rig was built for testing the the hdd player memory. After a confirmed that the memory was open and a could extract the data, then i created a PC program that could act as host.. When the first test was successful, a second test board was created. The new connection solution was not a stable solution, the results was not satisfying. there is a reason why there is gold plated connections on edge connectors :) The best solution would be if a large circuit socket was mounted instead of needing to solder the memory, but that was to expensive at the time. So I updated the first version and sent it for manufacturing. And the host program was redesigned to be more easy to operate. After that , it worked fine to revive the old units.\n","date":"2012-08-26T00:00:00Z","image":"/projects/finished/flashunit/sony1.jpg","permalink":"/projects/finished/flashunit/","title":"FlashUnit"},{"content":"I have been working on this idea for a while now, to build my own segway clone. It hass been a while since I started this project and finally it is working as hoped. I made a demo video, as for now it is only a Swedish version is available. My idea is that I want hardware that doesn’t bring any model or programming limits. There should be no need for workarounds or mysterious functions to make the model work. There should be enough processor power so you don’t have to design your model according to hardware limitations. The theory will seem more genuine if you are not too limited by the hardware. I have based the design on my ideas on how to best implement the simplest solution that still has more processor capabilities than needed. My motto for this project was\nHighly optimized controller and power boards give you freedom to implement more advanced model functions without the need of workarounds.\nThere is a loot of stuff in this machine, I will try to show the most interesting parts :)\nThe structure of the electronics The MainBoard, MotorBoard and SensorBoard are housed inside the black box you see above. The black box contains 3 boards. Right now the box is made of wood, but it will be replaced by one made of aluminum soon for better shielding properties. MainBoard The main board is a separate board that holds the vital peripherals and has access to all the data of the system. This is the central processing unit of the segway. The main board is a separated board, and this enables a board design that is more resistant to external interference, such as the electrical noise generated by the motor board and motors. This is vital for a good signal to noise ratio on the ADC design that samples the sensors. Without this the sensor readings get noisy and precision is reduced. This is the board that holds the control system that makes the segway balance. Communications between the main board and the motor board are trough SPI for the high speed data, and trough UART for the slower data instructions.\nMotorBoard The motor board gets control data from the main board and interacts with the motor driver to adjust the motor power. The main reason this board has it\u0026rsquo;s own processor is that if the main board hangs due to code that are under development or for some other reason, the motor board can still actively control the motors. It can then ramp the power down if it senses that the periodic update from main board is lost. This gives you a better chance to get off the vehicle if the motors are stuck on high power or if there is a sudden loss of power to the motors. Another reason is that motor board can handle the motor power control loop with feedback from motor encoder in a dedicated processor instead of having to share the load on the main board processor. This means that I have a lot of processor power only for the motor control loop and I can implement more advanced algorithms without having to consider load regulations. The board also have two current sensor inputs, sensing +- current to each motor driver. This means that the board can sense the power load on the motors.\nSensorBoard The board contains one SPI Gyroscope ADXRS450 ±300°/sec, and two MXA2500G ±1.7 g (2 axis each) that has an angular offset of 45deg to each other. The board is made so it is easy to make a new version. This way I could test various solutions. The current board is my third version. My main goal with this project was to be able to test and learn control systems, and sensors are a big part of that.\nMotor Driver The motor driver is made of H-bridge driver HIP4081A controlling 12 FDP030N06 mosfets. Each mosfet is capable of 120A continuous and ~700A peak current. Each branch in the H-bridge holds 3 FDP030N06 and should be able to handle much more power then the 250W motors will need. I have mounted a digital temp sensor on the heat sink with a resolution of 0.03125°C, so i can monitor the dissipated heat from the mosfets.\nPower Distribution Board This board regulates the battery voltage (24v) to 14.4v to motor drivers and 8v to the box with main/motor/sensor board.\nSteering LCD unit I made this of one of my test PCB boards. The LCD has touch functionality but it is not implemented in this version. On the screen I can monitor the angle of the segway as well as voltages, currents, consumed power, motor driver power and temperature. I can also see traveled distance and speed, but it is on a newer version of the software than the one used in this picture.\nCharger I made a charger that I could place inside the segway so it would be easy to charge the batteries. The batteries are limited to 3A charge current, and the charger is using a 3 step charge mode. It holds information about charged Ah, and voltage, current and temp can be requested trough the UART connector.\nMotors The motors were one of the hardest parts of the segway to find. They needed to have the right specifications and be reasonable priced. Thanks to friends I got one motor for free and two more for a small price. The three motors became two after selecting the best parts. The motor power is about 250W and it is equipped with a worm gear that has an awful backlash. The motors were in used condition so I knew that I would have some problem with the control system due to the big backlash. Currently I am using some nifty encoder from a camera for motor feedback. I must find a better suited encoder so I can use the encoder data in the motor control loop. But it is hard to find a well suited encoder that is small enough as well as reliable. I am still looking for one. If I can use the encoder feedback I can almost completely eliminate the backlash problem - that would be really nice.\nDebugging capabilities I have created a PC logging program that I use for logging data in real time trough Bluetooth or USB. With the program I can read and set control values in the segway, even while it is running. Both the main board and motor board have JTAG and USB communication that can be used to debug processors and output data. JTAG is a direct bus to the processor and can be used to read out almost every step the processor makes as well as settings and data. USB is mostly for sending log data that can be saved as a file or viewed in real-time through the pc program. It enables multi signal view with high detail, which can be saved in various data formats. The program can be used for sending data and commands to the target board with regulator settings etc. By saving logged data in a file and with a large number of formatting options the file can be used for many other purposes. While the segway is running the radio communication can be used instead of the usb communication. The major difference is only the amount of data that can be logged.\nMy angle measurement jigg Used for testing and calibrating the sensors Testing and calibrating the motor driver.\nBeta Boards I did make a beta version of the solution at first. Mainboard Motor Board + Motor Driver Sensors, also with the same \u0026ldquo;easy change\u0026rdquo; -concept I first made an external charger, but i changed my mind when i did realize I could fit the charger inside the segway instead. Other I made some high speed PCB cad and soldering videos based on the segway mainboard and motorboard ","date":"2012-08-26T00:00:00Z","image":"/projects/finished/my-homemade-segway/frontPic.jpg","permalink":"/projects/finished/my-homemade-segway/","title":"Home Made Segway"},{"content":" This project was done at KTH Elekro for a project course. This course mostly aimed for project management in groups of five persons, the project our group got was to build a segway robot based on lego mindstorm kit. The problem was that no group before was able to make the robot stand for more then 12 seconds. Only the PhD student group was able to create a robot that could stand without time limit. The goal was to beat the PhD student\u0026rsquo;s time. My main role in this project was to create the empirical model of a lego segway robot, and this is what I did. we only had access to the lego mindstorm kit the two last weeks, so it was very important that the theory was done before we got the lego kit. Given the time limit it was important to collect as much information as possible before creating the basic control system structure. For the sensor data collection, I built a test rig with accelerometers and gyros, and put together a signal logging program. With this test rig the different angular algorithms could be tested. A idea was to be able to use the rig on the final lego robot. but after implementation to the lego robot data interface a big flaw was detected. The data transfer was to slow and took to much process power when I implemented it in the lego unit. So the idea was scraped. We went away from the recommended programing language, the lego unit uses a so called Real time operating software. And I knew the importance of selecting the right programing language when the processor resources are limited. And I went with Robot C that has the best performance when used with the integrated software in the lego unit. I could skip the integrated software and write processor compiled code, but that would take much more time than a could afford for the project. It was not so difficult to get the robot standing only with the gyro sensor, but it had a awful gyro drift fault, this cannot be calculated, and it gives sporadic data faults. When I tried to integrate the accelerometer in the control algorithm the extra time delayed when fetching the accelerometer data made the robot much more unstable. So instead of the accelerometer I used the wheel sensor, this sensor does not have the best performance, but that was solved with moving average type collector. Here is the final control system for the segway robot Then I created a function in my logging program that enable me to send control data trough Bluetooth and control the robot with the PC mouse movements. The PhD studens robot could only stand still on the same spot or run forward with a constant speed. Final result. Video 2 \u0026quot; Not the best video quality\u0026quot; ","date":"2012-08-26T00:00:00Z","image":"/projects/finished/lego-segway/Segway.jpg","permalink":"/projects/finished/lego-segway/","title":"Lego Segway"},{"content":"Real Time Logging Software The main purpose of this software is to sample multiple signals and display its data in real time And simplify troubleshooting of various systems. It is based on FTDI and RS232 protocols. And its written in C#, I needed this type of software when I started experimenting with digital / analogue control system. Which could give me visual information in real time. RS232 and FTDI USB chip protocols are supported. direct access to the FTDI drivers for increased speed. Maximum 8 channels simultaneously. Multiple windows can simultaneously display all or selected channels with separate settings for time and amplitude. Export data to Matlab and Excel. Up to 5000 samples per second has been tested. Save as image. Move, Zoom, Draw, Read the values in the chart. Several settings for each channel. 3 ways to set the packet data timing. \u0026ldquo;Signal Timing Profile settings. Several windows with simultaneous update. Input selection and settings for each window, all windows can use a separate profile. Curve smooth function. \u0026ldquo;signal 1 and 2 is NOT from the same source, only same sample time !!\u0026rdquo; Easily switch between profiles. [](/images/wysiwyg/Portfolio2/Real-Time Logg SW/image16.jpeg) Data flow information. The first value \u0026ldquo;249 updates / s\u0026rdquo; is the number of data packets arriving per second. Other \u0026ldquo;9992 bps\u0026rdquo; is the received bit rate. Third \u0026ldquo;2.82 ms\u0026rdquo; is the average time between each data packet. Last \u0026ldquo;9.024\u0026rdquo; is the time buffer has logged data in seconds. The duration of the program can store and display data before the buffer is full and needs to throw the data away to make room for the new. There are three timing modes to capture the received signal. There are some issues to consider when data is not sent with timestamps, Information on the timing signal is sampled in the source unit.\nThere is three available approaches. By having a set time to plot the latest data provide information, whether it received new or not. If the data update rate is very low, or that you never know when the next data will arrive. But it is a very inefficient way to sample incoming data. This is called the Timer mode. The timestamps are based on the averaging time between each incoming data packet. program make an average over 2 seconds, the filter is a FIFO based moving filter. If the data is fast and continuous, this works well. This is called the RX timing mode. By knowing how long it is between each sampled in the source unit, the time stamp data can be added manually in the program. This provides the highest accuracy. This is called Constant mode. Each circle in this image is every time a new data was captured, and each point has a value and a timestamp putting points in the right place in the graph. Using the mouse, you can drag the image around in the graph area. And zooming with scroll wheel. Hold the left mouse button and you can select an area to zoom in Here is a video of an older demo. ","date":"2012-08-26T00:00:00Z","image":"/projects/in-progress/137-2/image1-Custom.jpeg","permalink":"/projects/in-progress/137-2/","title":"Real Time Logging SW"},{"content":"Small but flexible intelligent stand alone stepper motor controller. This product was made for a motor company. They had a programmable and independent motor controller that was to expensive and with low flexibility. So they asked me if a could do a better and cheaper version. It was a challenge to build it so small with that much motor power . The upper board is my first Beta version. The lower one is the motor board that i should replace. It´s main features is \u0026ldquo;small but flexible intelligent stepper motor controller\u0026rdquo;. Main Features\n8 Inputs with programmable functions. 2 Outputs with programmable functions. 2 Amp Stepper Driver , Selectable in 20 steps from 100mA to 2000mA. 12 - 30 VDC Input voltage. Current Standby, Both Time before standby and current is programmable. 2 Analog inputs with programmable functions. 1/1 , 1/2 , 1/4 , 1/16 microstep is selectable by input or internal state. Programmable functions is set by a PC application. FW update can be made by customer (done in the PC application). Programmable Acceleration/Deceleration Time. Smooth motor motion in manual step mode. Programmable Input Features\nGo To Home \u0026ldquo;Position zero\u0026rdquo; Step continuously at given direction Step xx steps at given direction Direction Step continuously at positive direction Step continuously at negative direction Step xx steps at positive direction Step xx steps at negative direction Positive end sensor input Negative end sensor input 2 Inputs for speed, 4 programmable speed settings 2 Inputs for current, 4 programmable current settings 2 Inputs for microstep, 4 programmable microstep settings Emergency Stop, 3 different variations ( Pause ongoing function ) ( Pause and Exit all ongoing functions) ( Pause and Exit all ongoing functions and release current to motor ) Emergency Reset Wait until, trigged functions is memorized and on hold until this function triggers Current standby, Releases current to motor Abort if, abort all functions when trigged Input Features\nHigh signal in, between 4.5 to 30v is acceptable for a logic 1 (levels can be changed) Pull up signal can be applied to input, if pull up is enable, the input pin only needs to be grounded to trigger input function Functions can be set to trigger on negative \u0026ldquo;falling signal\u0026rdquo; or positive \u0026ldquo;rising signal\u0026rdquo; Output Features\nBoth outputs can handle up to 300mA current each. Outputs can be set to positive or negative response out Programmable Output Features\nBusy, Triggers output when device is busy or motor is running Home, when current position is zero \u0026ldquo;Home\u0026rdquo; can be set with a +- tolerance Positive, Negative, Or both end sensor. Activates output on end sensor trigger. The final version. The board dimensions is 30 x 37 mm I created a PC program in C# that makes the board profile really easy to setup. Profile Input options Every input / output on the motor board can be set to a selected function. Main profile settings Analog Input Settings Device Control Manual control of the motor. Communication settings Firmware Update Built in firmware update function for easy upgrade. ","date":"2012-08-26T00:00:00Z","image":"/projects/finished/stepmaster/3.JPG","permalink":"/projects/finished/stepmaster/","title":"StepMaster"},{"content":"Xbox Remote control Project created 2001\nBack in the day when I owned an XBOX I was very irritated that I needed to get up to reset the unit every time I wanted to change games. And to be perfectly clear, I enjoy electronics more than playing games, so it was more fun to create a solution to my problem instead of playing. I think I spend more time on creating this gadget then total playing time on the XBOX. So I had some experience with the microchip PIC16C series micro-controllers and thought it could not be that hard to create some kind of solution to my very very big problem. I started small by creating a debug platform. with one Nokia 3310 LCD and IR receiver, few buttons and RS232 interface. Programming was done in assembler. Processor was 16F676 with 1K Flash running on internal clock. The major problem I had with this design was the lack of flash memory, I spent many many hours on optimizing my code to be able to fit all the functions I wanted. I made a specific prototype. The final version contained the following functions.\nIR receiver, supported multiple protocols “IR Protocol learning capability” Easy to install in the XBOX, with or without any modchip installed. 4 to 10 solder points depending on configuration. 12 programmable functions, easy to program. 3 extra output ports for controlling extra functions, like mod lights and so on. Only a small IR eye with push bottom is visible on the front of the xbox. Functions\nCheck power off = Check if XBOX is turned off, if not turn off. (1) Power_on05 = Start pulse 500ms long. (1) Power_on_1 = Start pulse 1s long. (1) Power_on_2 = Start pulse 2s long. (1) Power_on_3 = Start pulse 3s long. (1) Power_on_Set = Start pulse is by configurable time “0.1-7sec”. (1) Power Do Low = Start XBOX with Do low (Modchip on/off). (1) Power Do High = Start XBOX with Do low (Modchip on/off). (1) Eject on = Ejects the DVD player. Extra toggle 1 = Extra port 1 toggle output status Extra toggle 2 = Extra port 2 toggle output status Toggle Do = Toggle Modchip status, also used as Extra port 3 If the XBOX is already on and this functions is triggered the chip shuts down the XBOX. Extra ports can also be activated “toggled” when the XBOX is turned off. chip status and port status is saved in the eeprom memory when the XBOX loses power. I was so pleased with the design and functionality of the chip that I made some extra boards for a few that wanted it as well. Xremote manual Xremote install instructions\n","date":"2012-08-26T00:00:00Z","image":"/projects/finished/xremote/Mounted.jpg","permalink":"/projects/finished/xremote/","title":"Xremote"},{"content":"Finally the board has arrived, usually seeedstudio makes the board within a few days, this time is was more then a week before the boards was in production and the shipment was delayed. The fact that I ordered red board which is less used then the standard green one, may be the reason for the production delay. . ","date":"2012-07-17T00:00:00Z","image":"/projects/in-progress/solder-station-v2-board-delivered/Featuredboard-e1346182046202.jpg","permalink":"/projects/in-progress/solder-station-v2-board-delivered/","title":"Solder Station V2 Board delivered"},{"content":"I had an idea for a new Soldering Station , or rather wanted to ditched my old homemade soldering station when I got my hands on the new or “newer” type of soldering pen. Function list for the version 2 solder station.\nTFT LCD with touch functionality. 2 solder pen connections, both can be used at the same time. support older pens like my favorite 80Watt WSP pen, and my new WMRP pen Able to control my smoke sucker (link..) USB connection for profiles and settings, and power,temp analysis. ESD protected as well as voltage on tip reading and warning. More features will be created later on. The new pen has another type of temperature sensor type that my old station cannot handle. So the decision to make an new station was not hard to make :) The withe connector is for power and fan power to the smoke sucker ( like a vacuum cleaner with carbon filter). Each port holds a indication ring that is lights up for channel select and status. Bottom view, the bottom plate will hold the H-Bridge converter. Three channel H-bridge with extra filter, this enables me to set a constant voltage over the soldering pen instead of pulsed. Pulsed power can be achieved if I find it useful for some reason.\nUpdate After some testing and probing I found out that the WMRP pen has electronic interface which means I have to get my hands on a station that can handle that pen, and then probe and try to find the data command to get temperature data out from the sensor inside. So because I do not have any station that can handle the pen, since then I have not worked anymore on the station. I hope I can get my hands on a WMRP capable station so I can probe the commands. but until then\u0026hellip; This is mostly because I got hold of a Weller WSD161 that can handle two WSP80 pens at the same time, before I only had a Weller EC2001 (25w pen). Why Version 2, where is the Version 1 ? Yes I did a version 1. It only needed a bit more code before it was working alright, but as usual I had to much to do and too lite time at the moment. And when I finally had some time it was more fun to make a Version 2 instead. I bought a none working station and only kept the case. The transformer could not handle 2 x 80w pens so i had to fit a much larger transformer in the same place as the old, quite hard to fit in the case :) The LCD is from an old Nokia 7110 mobile phone. ","date":"2012-07-17T00:00:00Z","image":"/projects/in-progress/soldering-station-v2/Weller_PRO1.jpg","permalink":"/projects/in-progress/soldering-station-v2/","title":"Soldering Station V2"},{"content":"Some time ago I could not even imagine I was able to make such neat things as a custom housing like this, so I am really glad know the right person that enables me to create more then just the electronic part of a project. This enables me to create the whole project in a professional way instead of just the electronics. So this is my vision for the version 2 solder station.\nTFT LCD with touch functionality. 2 solder pen connections, both can be used at the same time. support older pens like my favorite 80Watt WSP pen, and my new WMRP pen Able to control my smoke sucker (link..) USB connection for profiles and settings, and power,temp analysis. ESD protected as well as voltage on tip reading and warning. More features will be created later on. ","date":"2012-07-03T00:00:00Z","image":"/projects/in-progress/solder-station-v2-housing-cad/Weller_PRO2s.jpg","permalink":"/projects/in-progress/solder-station-v2-housing-cad/","title":"Solder Station V2 Housing Cad"},{"content":"Going from idea to schematic and board layout makes the project feel more realistic. Will be even better when the housing cad part is done. I have sent the pcb gerber files to seeedstudiowhich is great, nice price and have always been fast. Usually i prefer to use DHL, but for this project time is not critical so it will be fine with normal china mail. ","date":"2012-06-21T00:00:00Z","image":"/projects/in-progress/solder-station-v2-pcb-cad-done/Fetured_w1-e1346182794144.jpg","permalink":"/projects/in-progress/solder-station-v2-pcb-cad-done/","title":"Solder Station V2 Pcb Cad done"},{"content":"A few boards that i ordered from Seeedstudio, great result what i can see!! And CHEAP , 65$ for 4 design a 5x5cm boards and one 10x5 cm and shipment !! It says you should get 10 of every board, but i got 12 of each, so total 60 boards for 65 bucks inc shipment. THAT IS CHEAP :-) ","date":"2011-07-04T00:00:00Z","image":"/blog/fast-and-cheap-from-seedstudio/1000_600-e1346000079173.jpg","permalink":"/blog/fast-and-cheap-from-seedstudio/","title":"Fast and Cheap from Seedstudio"},{"content":"Finally i made a angle estimation module to check the angle error and response time. This makes it much easier to make the final adjustments. ","date":"2011-06-10T00:00:00Z","image":"/blog/angle-reference-module/1001.jpg","permalink":"/blog/angle-reference-module/","title":"Angle reference module"},{"content":"My 3 first real creations. It locks promising :) ","date":"2011-05-21T00:00:00Z","image":"/blog/first-cnc-test-with-my-own-creations/908.JPG","permalink":"/blog/first-cnc-test-with-my-own-creations/","title":"First CNC test with my own creations"},{"content":"Now I\u0026rsquo;ve finally been able to test my new CNC machine So far I have only been able to run the simple test files. But now I have to sit down and learn more about CAD / CAM to create my own solutions. ","date":"2011-05-06T00:00:00Z","image":"/blog/my-little-red-one/900.JPG","permalink":"/blog/my-little-red-one/","title":"My little Red one"},{"content":"I made a high speed video when I solder my latest board ","date":"2011-05-03T00:00:00Z","image":"/blog/just-for-fun/highspeed.jpg","permalink":"/blog/just-for-fun/","title":"Just for Fun"},{"content":"Made this for fun to see how it would look in high-speed when i am working (PCB CAD) on one of the PCB boards on my latest project. ","date":"2011-01-28T00:00:00Z","image":"/blog/busy-as-always-high-speed-review/highspeed2.jpg","permalink":"/blog/busy-as-always-high-speed-review/","title":"Busy as always,  high speed review"},{"content":"Needed a simple inductance meter when my regular one was missing. So I made a simple one pretty fast. I will see if I make a special PCB board for this later. ","date":"2011-01-03T00:00:00Z","image":"/blog/stm32-devcard-converted-to-an-inductance-meter/802.jpg","permalink":"/blog/stm32-devcard-converted-to-an-inductance-meter/","title":"STM32 DevCard converted to an inductance meter"},{"content":"I had to make a prototype charger to test and check my theories about charging VRLA batteries. So this is the result of my beta charger that works pretty well. It is based on a STM32 ","date":"2010-11-20T00:00:00Z","image":"/blog/stm32-battery-charger-test/403.jpg","permalink":"/blog/stm32-battery-charger-test/","title":"STM32 battery charger test"},{"content":"So i made a light ring with adjustable light level /power. It is working very well, i will add more leds later on. The only problem is that it the start current is to high for my small SMD fuse , and i do not have any other ones in the same size that are rated higher then 2 Amp. ","date":"2010-11-05T00:00:00Z","image":"/blog/needed-some-light-under-my-new-microscope/203-e1345999896768.jpg","permalink":"/blog/needed-some-light-under-my-new-microscope/","title":"Needed some light under my new microscope"}]