Showing posts with label electronics. Show all posts
Showing posts with label electronics. Show all posts

Wednesday, 30 September 2015

I want to do something

I want to be creative and work on something.

I just feel like eating all the time. And I gain weight. 78kg now.

I want to read my books and do something with my electronics.

I went to a store that has hobby stuff and looking at their brushless dc engines. They told me that buildning my own quad copter was not worth the money, just buy a complete one. And I was like "mmeeeh, no".  That ruins all the fun for me. I don't really want a quad copter, that doesn't  interest me. I want to build a thing that drives 4 motors, senses angle and tilting and rotation etc and adjusting the power to the engines. And see if my program works or not. That is the fun part, just buying a quad copter and use it is not so fun.

I want it to fail. I expect it to fail. That is part of the fun. Figuring out what I did wrong, fix it, hack it, etc etc.

I was thinking about buying some of those RN42 Bluetooth adapters. They were easy to use.

But you need a lot of PWM outputs for brushless dc motors. Didn't expect that. But that can be fixed.

Buut you keeep hearing from friends and dad, and peole in the store laughing at you saying you need special tools. special this and that. knowledgde of that and that, and basically just get laughed in your face.

I really really loved being at OHM2013, If there is a heaven, I wish it is like that. Where were 12 or 13 year olds showing up their quad copter projects. Ofcourse they fail, but that it the point. You fail and then you learn why it fails and then you move forward.

And one day, you are that guy who helps everyone in class with the programming excercises so that they can get their grades... sad world. I hate it.

Sunday, 13 September 2015

New morning and new ideas

I went up a litttle bit earlier today. Not as tired as I used to be. Maybe it is because my father or Mother is here. I feel less freedom.

No I have not forgotten to eat my breakfast or medecine. That always worries my mother. But I feel better now. I sm s little bit more alert I think.

But that motivation to kick start some electronics project is just gonski. Like a swarm of small fish. Make a sudden move and they just vanish like the speed of light.

Oh. I don't know what to do. I have got gamed to play. Electronics to do. I almost feel like crying over how un-enthusiastic i feel.

I also have pain in my legs for walking to the store. It is just a 5 min walk. It is amazing how fast  muscles gets weak.

It's like wirh boiling water. It is easy to get it hot. But really difficult to cool it down.

Sometimed I am afriad that it is all my nedecine that kills my enrhusiasm and interests in electronics and hacking and programming.

Maybe I'll write another blogpost on the projects I have in my head

But it is dangerous. Think if EA or someone just comes along and says "please, ciese and desist". We already have thia idea but we are never going to makw the game. We are just holding this intellectual property so that nobody else can make the game .

I got an idea yesterday. Which already peobably exists. But it should be a small devicw that is under your skin. Not anymore complicated that the port a cath I alreadey have.

But it could constantly measure body temperature, oxygen level in blood. And maybe even bloodpressire if that is possible. Those are the standard tests that doctors always need to know. Then logged data can be downloaded using some sort of wireless communication. It could probably measure more things. Alcohole level in your blood. So that when you sit in your car it wont start. Boohoo on you.

The battery needs to be loaded via induction ofcourse. It needs to be easily replaced when it gets older. And no open ports under your skin. It must be completly sealed under the skin. Otherwise it can easily  get infected. I know this from my stupid PEG (feeding tube in my stomach)

But then there is also the negative side of this thing. The government sees the opportunity to add all sorts of data in this device. Resulting in making it more hackable also. More innocent hackers goes to jail just for showing the people how the government misuses this twchnology. That is most often how it ends up. Government wants to use it for identidicarion and have built in gps etc etc.

I wanted it to be a practical tool for people that needs it for medical reasons. What if ir could be of good help for people with diabetes. Or Low/high bloodpressure. In my case, sometimes lack of blood since I bleed from my mouth a little and need an extra refill.

What if it could send dats via wifi directly to the hospital. So rhey could monitor my body tempersture and other blood status values that is easy to measure without using some advanced equipment. For instance oxygen level in the blood jusr uses a little light diode that looks at the color of the blood vessels. The device that measures sugar values for diabetes patients also looks simple. But I am not sure of that. Blood pressure must use some baloon type thing and theb they count. That seems like a feature that would be difficult to implement in smsll electronic device.
Measuring pulse should not not be too hard .

Data should be sent using pgp.

Thursday, 10 September 2015

I hate night

This is something that is new to me. I hate night time  everyone goes to sleep. I feel lonely. Especially if I am not tired.

I used to like sleeping. Now I hate it. Maybe it is the nightmares I get sometimes.
I don't like when everyone dissapears and says "goodnight".

Maybe it is because I know I will wake up in the morning with an even larger tumour. More problems. More pain.

Less motivation. Less happiness.

The painkillers used to work a little to boost motivation and lust to do things. It doesn't really work anymore. Or as well as it used to.

The medecine I take at night usually make me so tired I can easily go to sleep. Yet I don't like this time of the day at all.

Maybe it reminds me of death. Darkness. And emptyness.

I found something odd. I have a bowl of water with  large plastic syringe in it. Next to it a small triple darlingtington circuit with a 9v battery and a diode. I noticed that the diode lights up when I suck up water with the syringe. I wonder why

And right now, I am so tired I can fall asleep easily. I hope I wake up with motivation and happiness.

122 streak in Rocksmith and other thoughts

I got a 122 streak in Blitzkrieg Bop this morning. :)

I am getting better. But only in this song. Lol :P

I don't know what todo. I have so many dead electronics projects.

Wanted to make a wireless nintendo controller once. Found these good bluetooth modules we used at work..RN42.

I bought a FT800 devkit. Never used it.
Never made anything with my DE0-nano devit. Or my MAXII devkit either. Don't know what todo. Wanted to make my own cpu.

I bought these 2.4Ghz modules from microchip that I never got up and running.

They made it so difficult. Because they are basically just empty modules that needs to be loaded with some stack. MiWi or ZigBee or whatever. And I don't know how that works. Either they made it so "easy and userfriendly" that it got completly unuserfriendly it can possibly be, unless you buy more stuff from Microchip. Buy more devkits and software... but it's so unessecary when it comes to modules built upon SoC. You can't really buy just a SoC and get it working very easily. But you can buy it on a pre made module. Like the telegesis ZigBee or the XBee. But microchips....whatever it is called. Doesn't just run and communicate when getting power. It just lies there silent. Because it has no software in it. So how do I get it running MiWi?

The software library I am told to download doesn't work. It doesn't unpack in Linux, it doesn't even give me an error message. Is it broken or something? I bet it works like a charm under windows. But I am not really interested in using Windows.

I don't have any friends with common interests really. I don't have anyone to discuss ideas with or ask for help. Well the friends I have are "experts" in everything, so whatever knowledge I have in electronics is quite useless for them. I would not be the first person to ask if there's somerhing they want to know. I would be the last one.

They look at my stuff as being ridiculous and boring. I always need to hear bullshit everytime I use my computer and need to say "I can't do that. I got Linux" (and by the way I am not interested). I remember how much a friend laughed at me when I bought my first multimeter, that it was so fun and ridiculous he had to laugh and tell everyone that I bought a multimeter. That is how it is. I really need to fight and fight to keep my interests and enthusiasm up all the time. I am completly alone. There is no one to keep things going with.

I think,  that in their mind I don't really know more in electronics than they do. They know better most of the time. I usually get told how to do stuff that are really simple and basic. Like, lets explain to you what pixels on a screen are. Yeah, I know I used to program scaling algorithms in Mode 13h when you still tried to beat the final boss in Quake 1. They don't let me in to a discussion if there's something I understand so much better than them. I can't start a discussion because it doesn't interest them.

It doesn't help that that someone also has zero memory. I was just told to look up this RS "have you ever heard of them". Oh yes, I just told you two messages back. And maybe also for the last 3 years I've been working. Telling you to look this site up that we order stuff from at work. But the thing is. It doesn't count until they find it themselves.

 It is once they discover this "new thing". Then it gets stuck in their head. Like when I worked in Uddevalla and always ate lunch out, and a new restaurant opened that was really good. But getting my friends to eat there was one of the most difficult things that I ever did. They have sallad I said. "But I want real food not some damn sallad". Meat, meat,  real food. Yes they got a menu with meat in it.

It wasn't until someone else claimed the HE "discovered" this place first. When in reality I took him there once to eat, just me and him. Then, it took off, and they wanted to eat there all the time. Ofcourse never in their life tried anything else on the menu for the restaurants entire lifetime than the menu option with meat in it. And. Yeah. Ofcourse I have to be the one going getting cancer. The one who is not afraid of vegetarian food.

I don't know why it have to be like this. It is some kind of "status" thing I think. Or I am just unfortunate to meet these really stupid people. It is sad however that they never got to experience some of the better lunch places I tried over the years. So I guess it is more their loss than mine anyway when it comes to that.

When it comes to knowledge in electronics or anything else. They've heard what the experts say on Flashback or whatever... I don't really have any knowledge. I use my intuition, how well do I understand electronics and how logical and plausible might something be. And guess the answer. And I might be wrong to some extent, usually I am closer to being right.

But this ofcourse makes my knowledge laughable. And I don't really know anything. Truth is. It is completly impossible to know everything in electronics. It is not realistic. Even people with 30 years of experience needs to look up things in formula collection books and google for simple circuits from time to time.

I am quite useless. That is how I feel anyway. I wish I understood electronics so much better. A bachelors degree doesn't help at all. It doesn't mean anything to anyone else either. And also the truth is. Because once you're done with school, all that wonderful knowledge just dissipates and slowly goes away unless you keep it alive and work on it all the time.

And I think it is so damn hard to keep my motivation and enthusiasm up. I don't get that automatically. I mostly just feel like doing nothing at all.

Sometimes it feels like my brain is just standing still. It doesn't want to do anything. Not playing games, not doing any electronics or programming. Just being shut off while being awake. Maybe eating is the best thing I know then.

It gets more difficult to learn new things when you get older I've heard. I don't have the same enthusiasm and motivation as I used to. It more depressing now.

I am just walking around here at home. Waiting for something seriously dangerous to happen with my cancer. And get my life taken away from me. Because if I end up in the hospital. That is pretty much equal to taking someones life away from them.

Some people seem to think that, if I have my computer at the hospital (my laptop). I suddenly have all I need. I can "play games" as they say. I am a hardcore Linux user though. I haven't got my second graphics card to good uae in my laptop. And even if I could play some game, if the game doesn't immerse me, It doesn't interest me. It interests me much much more to be creative.

Some people play these games like, candy crush saga and so on. That is what "games" are for them. But I grew up with games. I know that there are great games with a deep story that can immerse you and get you sucked into a gameworld, just like watching a movie. Just much better I think.

Lol, I remember one time when I told someone this and she reaponded "that is very dangerous and you must stop doing that". Immersing yourself into fantasy worlds that is. I told her that I loved Harry Potter because it was such a cosy and nice world to be in, and how I loved imagining myself in it. But this was appearebtly a big No No and very dangerous for you. Games or movies the same. But appearently religion is completly OK to get into. I think the opposite though. You can get deeply involved in the gameworld when you're playing it. But once you shut the game off, you're back into reality.

It's not the same as getting involved in a religion as she seem to think. In a religion you live in that all the time. In a game or a fantasy book or a movie you shut off and get back to reality. In religion, your beliefs IS your reality. You don't shut off and forget about it when you get bored. You need dedication to keep that going. I don't have that at all. I am a daydreamer, yes, my teachers always said that. But I can't keep beliving in something that doesn't seem realistic, and almost reminds me of fantasy sometimes. I just simply can't belive it is reality. So I cannot understand why immersing myself into the Harry Potter world could do any harm at all.

And if you happen to choose the wrong religion. You might get really brain washed and wacky and nuts. Can't happen with a game. A game is just temporary, and it doesn't force you to change anything in your lifestyle.

It's actually the people who tell you that enjoying fantasy are the ones who are at any danger. They are too naive, too gullible, they'll belive in anything they read.

I know I have some bibleverses here and there in this blog. I really do enjoy parts of the bible. But I have problems believing in it 100% and dedicating myswelf to that kind of lifestyle.

Some people are so strange. I had a nurse here one day. And she asked about my guitar. And she asked what I played. Anf I said I play this game, Rocksmith. I've mostly played that song blitzkrig bop with Ramones. And I have it really really hard to speak with a tumour in my mouth (think john merrick, elephant man). And she constantly  had to ask me to repeat. I said "Blitzkrieg Bop, by Ramones"

And she reaponded. "Ramones, is that what it is called?". And I just thought. What a typical hockeymum answer. I wonder how these people live their lives. They haven't heard an extremly famous song by one of the biggest punk rock bands that ever existed. What do they do in life. Do they only exist to produce children, and just live with the natural flow. These people never get sick. They travel to thailand with their family, because it is the cheapest. Their children eats swedish meatballs and mashed potatoes. They play in the ocean a little. Get a little skinburn. Get home. Get back to work. Children gets older, and by just some automatic process they suddenly have girlfriends/boyfriends. And life goes on, and there's a new "standard" family. 

Until someone odd like me is born. I don't want to go out. I want to be with the computer. I have friends online. I want to learn programming. The parents doesn't really understand what I am doing. But they start getting afriad that it is something dangerous. Because everything they don't understand is ofcourse dangerous. I buy some electronics components

"You're not allowed to plug that into the computer. You'll burn down the house"

"But it is only a 5V output. It is protected in so many ways, nothing can happen..." 

But no no. Not allowed. Not allowed to learn anything. I am so jealous of the kids who got parents that encoured their children in their interests. I had to fight really hard to keep my motivation anf enthusiasm when I was young. Even if I really tried to explain what I did. Nodoby could understand. It really kills your motivation. I never was good at keeping my enthusiasm up. When I was a teenager, I was enrhusiastic and motivated. But I had no tools. And no money to get any tools. I couldn't ask my father for a multimeter. Because he didn't know what it was, and in his mind it wad probably something dangerous that could hurt me.

I think the biggest fault you can do when raising someone is not to let them do any mistakes. My father always wanted me to do correct the first time doing something. If I did something wrong he took the tools out of my hands and did the job himself, "look here this is how you do it". But I don't learn by looking. I learn by doing. And I think most people do.

And then he could say something like "I thought daniel could do this but he doesn't want to". But he only let me try once, saw that I failed and then just push me away. I never said that I didn't want to do it.

I have learnt that you have to fail and fail and fail over and over again until you get it right.

My father doesn't have patience. I think that is it.

When I had my computer. I could fail and fail and fail over again. And nobody knew. My father didn't know what I did with the computet. He didn't understand it. So it was much easier to learn stuff there. Except in electronics. Because anything plugged into the wall outlet was extremly dangerous. I have only recently been able to get some good electronics equipment. That feel fun. But now all my motivation and enthusiasm is gone.

Oh. I remember once when a relative passed away. He worked with electronics repair. And they told me I could get his instruments. That was really fun. But when I saw what he got. It was really old rusty stuff. I couldn't understand how he possibly could use anything of that for anything. He had nothing of good use. No multimeters. No oscilloscopes. I saw some amateur radio equipment I think. And some other people had probably taken stuff of any value already. I was never allowed to look what he had really. 

They more or less just told me to stay away. I was just being in the way while they were throwing away stuff before I had any time to look at what is was. And if I did find something that looked interesting my fathers response was more like "no I don't want more crap into my house". However what I did get in the end WAS all the crap. A box full of cables and some useless homebuilt instruments with dried out electrolytic caps, that I had no idea what they were used for. The only thing was this radio reciever. Don't know if it works.

Many years later I bought my first oscilloscope. A digital Rigol DS1152. And my uncle asked if it was one of the things I got from this relative.... I was  just like "Huh? He didn't have things like this, nothing I got from him I had any use of. This is new stuff I bought myself"... "Oh, I thought it was old. Maybe they made it look old."... Seriously.No. they didn't have colored lcd screens in the 70's.

Wednesday, 9 September 2015

Voltage detector

Just a simple darlington circuit using three bc547. But it is a little bit too sensitive. I was supposed to detect the zero on the wall outlets with it. But it detects small voltages everywhere.

It is also a good touch sensor.

https://youtu.be/VokzsJLDog8

Tuesday, 8 September 2015

AC detector

I tried making a little AC detector circuit yesterday. It failed. But it was good, because I figured out why it failed.

I need transistors that opens on smaller voltages.

Friday, 28 August 2015

Japan postcards are lost and then found

Two of four nice postcards I wrote about here are lost.
I found one in a drawer, and the other one is framed and stands on the window sill here next to my computer. But I can't remember where the other two are.

And I cannot understand why I have separated them and put them in different places, one in a drawer and the other two somewhere else. That does not make sense to me. In that case, something must be wrong. That makes me very nervous.

I have problems with some stuff now, like keeping track of time. For example being asked "when did did you first feel this pain?" or "how long have this been going on?", questions doctors usually asks... It's almost like I have no comprehension of time. At-least I cannot always remember such things. Sometimes I can. And maybe the medication makes it worse. I don't know.

I got really sad that I cannot remember where I put the postcards. Since I wanted to put frames on them, I wanted to keep them. And then things starts spinning in my head like, "Maybe I had them in my hands and accidentely threw them out with the garbage"

It's not the first thing I've lost. My tweezers that I use for my tiny electronics components, tiny 0302 capacitors, they are really tiny.

Very tiny, I need some very sharp tweezers to pick them up.


I thought I wrote about my lost tweezers in the blog also. But I couldn't find that post either :| Can't find a blog post that I remember I had written, hehe, yeah that too. Or maybe I never wrote in my blog that I lost my tweezers.

I used the search functionality and searched "pincette" and there was no blog post with that word. And then I thought, I have always written "pincette" in english. Then I looked in a dictionary, and there is no English word "pincette". It's called tweezers ofcourse... Is it "ofcourse" or "of course"?
My firefox spelling feature tells me that it is "of course". Firefox also tells me that pincette is a pipette.

So, tweezers is like the word scissors. It's like they are two.

-"I need a tweezer" seems to be wrong according to auto-spelling.
-"I need a tweezers" sounds very wrong in my ears.
-"I need a pair of tweezers" it is then?
 
I bought 4 new pincettes, I mean tweezers. A little bit upset about this, because a couple of weeks earlier they sold them for 1/5th of the price.
I was looking after my tweezers so much that I had lost my motivation to do any electronics stuff at all since then. Maybe a week or two later I found my old tweezers. I had put it in a very strange place in my small supply room. Mostly filled with boxes with old games and oh *sigh*, so much stuff. The pincette, I mean tweezers was lying on top of a VHS player.

I have a special place for my tweezers, it's where they ALWAYS should be when I don't use them.

This very nice Hobgoblin beer jar, pot? The is where I keep
my tweezers and one philips screwdriver, desoldering pump, cutter,
ballograf propelling pencils and pens, and other marker pens for writing
on dvd's and things like that.

If they are not there, they should be somewhere else on my desktop because I am using them for something. If they are not on the desktop, then they are lost.

I probably put my postcard in "a safe place where I cannot lose them", or where I "can easily see them and find them". I have a little plastic box with things that are important to me, where I put things I don't want to lose. The postcards were not in that box.

And I cannot understand why I found just one, when I assume I must have kept all three together. And while writing this post, that must have taken hours to write, I started thinking about making food and this idea popped into my head, and

lo and behold, I had put two of them on my fridge!

Mystery solved.

Now I feel a little bit stupid, looking for them everywhere. But that is how it is sometimes, you're looking for something that is right in front of your eyes.

That made me think of when me and my friend arrived in Tokyo. And I used this really good app that I can recommend to travelling people, MAPS.ME. I had marked out the hotel at the map. And the GPS said that we should be just close to the hotel. "It is right here" I said, and I turned around and around, to see if there was a sign on any of the buildings with the name of the hotel... We looked around for some time, probably looking very confused. It turns out, we were standing just outside of the entrance to the hotel.

I wonder if the people at the counter inside saw us, wondering what we were doing, looking at our phones and walking around in circles just at the entrance

It was very nice being greeted with "Daniel-san" when I came in.
Later some day during our stay I felt I needed to tell them something, and they spoke very poor English, and I was *sigh*-ing a lot during the talk. I was trying to use a translator app on my phone, trying to explain that we were going away to Kyoto for 2 days, but we are keeping the hotel room with most of our stuff, we are still paying for that time we're gone, and we'll be back.
When I said
-"We are going to Kyoto tomorrow"
He replied
-"You are going to Tokyo?"

But we were in Tokyo, in Asakusa. I didn't understand what he meant. And he didn't understand what I meant.

Maybe my friend was right, we didn't need to say anything to them. It would just mess things up instead.

I really hope my translator app didn't translate into something mean or bad :| because it didn't seem to work very well when translating from Japanese to Swedish. And I noticed they stopped calling me "Daniel-san". Hope I wasn't one of those troublesome guests or I had accidentally called them something really mean from my translator app.

But I thought, since we leave the key at the counter every morning we leave the hotel, maybe they'll be worried if we don't come back to the hotel one night. Maybe we should say something. At last they seemed to understand what we meant anyway. But I wasn't "Daniel-san" anymore. Maybe I am overreacting :)

Tuesday, 18 August 2015

ESD mat installation

Now I have it confirmed. My ESD mat installation is good as it is. And if I wanted to, I can hook up ground on the radiator.

I don't really need grounded wall outlets to make it better. I don't really need to hook up ground to my radiator either. ESD protection works the way it is intended by just having the same common ground on all equipment and the esd mat and the wrist band. There is ofcourse a 1MOhm resistor to the mat and the wristband to protect me.

But I cant help to have this feeling that I can do it much better. I hate having this feeling that it is not complete. It is not safe enough. But I am probably just paranoid over nothing.

At work we have these larger powerstrips. I would like to have that too. And from what I can remember, those powerstrips have a replacable fuse. But I'm not 100% sure. Just have this image in my memory that there is.

The only problem that needs to be fixed ASAP is at this moment my soldering iron is not connected to the same ground. Because it is in another powerstrip in another outlet. That is not good. But can be easily fixed by just connecting the two grounds together.

Thursday, 13 August 2015

Tearing apart a Residual-current device

ChipWhisperer-Lite

Something that I've totally forgotten that I ordered. I got it today.

I don't feel like doing anything with it now.

Probably going to end up as a dead and unused thing on my shelf.

Well, that is how I feel now anyway. Maybe someday I will get good use for it.

Sunday, 9 August 2015

My ESD mat setup and eye problems

I've been uncertain if my ESD mat setup is correctly installed. I don't know really. The mains wall outlets does not have any connections to ground. And I don't think that there is any Residual-current device in this old house, to protect from ground/earth shortcut problems.

I could just buy one RCD, but if there is no ground connection in the wall outlet it is quite useless I guess? Hmm... I don't really know what to do, I am mostly confused.

I've been thinking about upgrading my power strip to one with surge protection and a fuse at least. Hopefully it will avoid future  broken PC Power Supplies.

But I do want to have a properly installed ESD mat that has a function, and is not just a useless thing.

Still, I notice that my eye sight is worse. I need to resize the text on my monitor quite a lot. But I don't think it has anything to do with the tumour... I hope.

After the operation I did last year I could not close my left eye completely, the problem disappeared after a few months. But now it is back again. I cannot blink with just my left eye any more. And I see much worse on my left eye. It is on the left side of my face that the tumour is. I am a little bit afraid the the tumour might be pushing from the inside and squishing my eye in such a way that it affects my vision.

I have a lot of these eye-drops that I can use for my left eye, I have started using them again. It is so that it won't dry out.

Tuesday, 4 August 2015

I think I found the problem in my broken power supply

One blown circuit :)


Guessing from this picture, it is a TNY278 "Off-Line switcher"
And here is the other side :)

I was looking close to where the smoke on the inside of the chassis was, and there was the blown circuit. I wonder if this is the only broken component. All the capacitors looks fine. I wonder if maybe 600W was too weak for my computer. Also, it is summer now and a little bit more warm in the air.

Wednesday, 29 July 2015

Lab upgrade, new projects and cancer

I have not updated my blog in a long time. I have had serious problems with my health. In 2010 I was cured from Nasopharynx cancer. However, I recieved a very strong dose of radiation therapy that has caused a new cancer, osteo sarcoma in my cheekbone. Half of my cheekbone has been removed surgically, but a tumour still remains. I have tried different types of chemo treatments, where all of them have resulted in seriuos blood infections (Sepsis). Currently, I am spending my time at home, without getting any type of treatment.

I have started to eat apricot seeds, hoping that might do anything. I'm not really the kind of person who believes in non proven alternative medecine. But it's really no harm in a few apricot seeds in this situation. All I can do is hope.

Next week I will test a small dose of radiation therapy, to see if it has any effect on the tumour. No guarantee it will work, but I can hope.

I am spending my time doing things that I love to do. Alot of the projects I have written about before on this blog have kind of died. That happens alot with projects, I guess for everyone. They grow too big, and then you get bored :/
The only way is to just keep working I guess. But I don't really feel like working on those right now.

I have used some saved up money to upgrade my home electronics lab. And there are plenty of things that I would like to do. I bought some new equipment, a Keysight 34465A multimeter, Keysight E3643A Lab Supply, HP 33120A Signal Generator and a Keysight 1733C LCR meter. Later I also installed an antistatic mat on my desk. I think it looks really great now :)



I have not really been doing anything useable yet. I have been trying a CP2102 USB to Serial chip, added a PIC18f26K80 and I am about to connect it to a BMI160 acceleration and gyro sensor. For no real purpose really, I just want to do it because it is fun. I might use the BMI160 for some project later. I have been thinking about building a quadcopter/drone. So I guess I need a acc/gyro sensor for control of the motors, sensing tilt and speed/acceleration etc...

I also want to do something with my Nixie Tubes that I bought, probably a clock with temperature and humidity sensors, outdoors and indoors. I have SHT25 for temperature and humidity and I bought some modules from Microchip for MiWi which I will try if I can get it working.

I have been thinking about maybe making an analog synthesizer if possible, or not too difficult. Also a tesla coil has been an old dream of mine :)

Here is a picture of the messy looking prototype board, and it works :)

Monday, 28 January 2013

New stuff



Finally I can afford some stuff I always wanted... But still no motivation for any actual work. Maybe soon...

Thursday, 31 May 2012

FFT

I have wasted to much time trying to write a DFT algoritm in C, source code can be found here. It's not very good, but it computes correctly. Here is an example, where I put in a noisy signal, it contains three sine signals, with frequencies 2Hz, 17Hz and 401Hz with different amplitudes and some noise. It looks like this

And after the Fourier Transform i get this data
In the code I simply checked which frequencies was larger than 0.35 in amplitude, and saved them. The other ones was zeroed. After and inverse fourier transform with the ifft() function. The output was this.
Pretty :)

Tuesday, 8 May 2012

Discrete low-pass filter in C

I was interested in trying to make a discrete low-pass filter in C, also make it so that it can take data from from the pipe maybe. Anyway, the filter_rc() function can take data by keep pushing in new values and it takes care of everything.

One problem that my program has is that it cannot run forever, it can only take a limited amount of samples till the buffer is full. I think it is possible to check the value with the first index in the buffer (the last_value[] buffer), and if it is zero the buffer can shift down, I think this will work. Since the zero values in the sum isn't necessary anymore.

Here is a plot of the output, the input is a Sine Wave with 1 Amplitude, and 42Hz. It's plotted over 0.1s. And the filter is C=4.7uF, R=5k. The program can take any input, it doesn't have to be a sine wave. The red curve has 20 samples over 0.1s, and the green has 100 samples over 0.1s.
The Program can be found here https://github.com/Spekkio/dig_filter/blob/master/main.c

Sunday, 29 April 2012

Low-Pass filter math

I was trying to calculate the curve of a simple low-pass filter when feeding it with a square-wave signal, for example from a PWM. Later I also made some equations where duty cycle was a variable, but they are maybe lost now or still saved somewhere... There are some complicated laplace transforms in this, I used Wolfram Alpha for making the laplace transforms, it would take too much time for me to solve manually :)

Calculations below are locked to 50% Duty Cycle.

The square wave signal can be represented with a function in time like this.




Here is an example of a curve with some iterations in the sum, and frequency 120Hz.


The Circuit looks like this



And the output of the filter is calculated like this, represented in the complex plane.You should understand what this equation means, otherwise the rest will be pretty cryptic :P



Now we can laplace transform the square wave signal, and replace that with Vin in the formula above.

First I take the the inside of the sum from the square wave function.




And also this



Now, for the inverse laplace transform, take the laplace result from above and replace with Vout in the low-pass filter equation. This is complicated :)



This results in:



And we will not forget the small sum in the beginning, that can be calculated separetely.



This becomes a long and complicated function of time, this could maybe be simplified.



Here is an example, displaying the input square wave, and the output signal, the circuit is C=47uF, R=5k and the frequency is 120Hz square signal from 0-5V.