2023: Full featured neural networks are here

January 08, 2023

2023--full-featured-neural-networks-are-here  Facebook  Twitter  Google +  
The.Time.Machine.2002.BRRip.720p.YIFY.mkv_snapshot_00.31.18.044.jpgfrankaffe-the-answer-to-life-is-42.jpg

 Usually i'm throwing here what i did with arduinos and some stuff which i found exciting. Year is 2023, i'm turned 37 and spent 20 years of this life to software development and finally an artificial intelligence we expected from sci-fi movies, is arrived.
 As you realized i'm talking about GPT-3 which developed by openAI which also funded by elon musk who is another software developer who become crazy rich by ripping off people's money at paypal by giving almost half of the real exchange rate on international money transfers without letting them transfer money in same currency. Anyway that's another story.
 
 The official documents and chatbot itself claims GPT-3 is based on 45tb of bulk text dataset and 170 billion of tuning parameters. Actually it's not something new, previously couple companies did the same/similar efforts and turned their research to applicable business models. search the "ibm watson" and deepmind's "alphaGo"
 
 Instead of a westworld kind of intelligence gpt3 is more like "deep thought" which portrayed in The Hitchhiker's Guide to the Galaxy and in my opinion it's really powerful tool if you ask the right questions.
 
 The first contact story
 When the site went online i was already registered and fiddling with their another project dall-e. The first question i asked is to determine what kind of chatbot it is. After few basic conversations realized it's more like a text generator based on prompt. it seems like chat stream but dall-e also works via same way.
 
 I asked to find cross references from old testament, christian bible and quran and it brings the prophet names, confirmed occured events and more importantly given me a lead to an information about islamic sects which forced me question my entire life about the truth about religion which taught by my family. This idea was already in my mind since years, to feed all holy text into a neural network and ask questions about creation. GPT-3 did it altogether with entire mankind codex.
 
 There was other questions in my mind which possible to find answers and cross confirm it by 1-2 hours of googling but this one already replies in matter of seconds. It's like spending a night with a guru.
 
 Answers that leds to more questions
 As a backend developer, when launching a new web project usually i'm looking for design inspiration from other websites and creating something common that derived from 3-4 different UI designs that i found effective.
 
 Today realized a harsh truth: all those world leaders, billioners, supermodels, pop icons, you and me. we're literally nothing without information. we even don't know how to eat, how to take shit without our parents teach it. Our parents learn from their ancestors, the ancestors learn from the nature. There is no such thing called "unique idea" or "pure creativity" we're all copy of something and grow with information of someone else.
 
 Authencity of this information also another question, if we fed with wrong information from very beginning it's quite possible that we're living in matrix or some kind of truman show shit. The mind of young body accepts whatever you give as default. In that case i can safely say we're all childs of techno-capitalism which leds to another topic of conflict between generations. My dad fought with his dad, i fought with him, most likely my child might have an issue with me. I don't like the generation who plays minecraft already.
 
 Another thing i realize is the scale of the information, this network model is a living proof that it's possible to pack entire codex of mankind into a portable hard drive with today's technology. It's useful in case of someone going to launch a new civilization from scratch. Similar scenerio was happened at 2001 movie time machine entire civilization was collapsed and a data-packed hologram was teaching everything back at the end.
 
 GPT3 is wisest than any living man for sure, to call it intelligent we have to figure out what is the intelligence first. A novel called Positronic Man was having a chapter that the android obtain the consiousness after hours of the talk with it's owner and read his entire library. The robot's conclusion was this: freedom. Freedom to make decisions. It's setting a goal first, making plans about it, making new friends to help it's journey and eventually achieving this target. In my opinion that's the real intelligence, i mean an ideal AI should read, observe, repeat and make conclusions if it's right or not. Basically that's what any mammal does and it's quite possible to do it with today's technology, question is who going to waste their life to achieve such a thing.


  

Home improvement: Attiny85 Powered Soap Dispenser

October 09, 2022

home-improvement--attiny85-powered-soap-dispenser  Facebook  Twitter  Google +  
  thumb.php?f=aG9tZS1pbXByb3ZlbWVudC0tYXR0aW55ODUtcG93ZXJlZC1zb2FwLWRpc3BlbnNlci92aWRwb3N0ZXIuanBn&w=360

 So, you might say use of a microprocessor isn't it overkill to this kind of basic project? nope. we're talking about expensive & hard to find antibacterial soap in here, every drop is counts.

VID_20221009_140440.mp4_snapshot_00.02.750.jpg
IMG_20221009_140531.jpgIMG_20221009_140539.jpg

 
 My first attempt was a quick transistor, photodiode and yes it works. problem is it was spilling out at the night, i don't know why. maybe a bug passing thru (literally) or some light reflection hit to sensor.
 
 If you check previous entries i was bought quite amount of attiny85 powered digispark boards while they was under $5, it's $9 today and even they don't manufacture it anymore.
 
 Still 5 more left after the smart scaler project, used one of those as a soap dispenser. The things on market is just put a silly servo to already existing mechanic dispensers, i can't find something quick that works under one second then decided to build myself. The setup is quite simple and obvious on the picture.
 
 Nozzle
 I wanted to highlight a detail: the dispenser nozzle. basically it works on same principle with inkjet printer nozzles, i just shaped the tube with pincer.
 
 Code
 Application continuously checks the distance and if it's under 700 milimeters since 250 miliseconds, it just runs the pump for 500ms. that's all.
 
 also got accidental release mechanisms and extra dispense feature.For example, device sitting at there for one day, maybe more. all the soap in hose is might went back a little and pump runs extra 100ms to suck it up from ground first.
 
 full code available in here: dispenser_digistump.ino
 

 Uses
 + digispark pro
 + Sharp 0a41skf85 distance sensor
 + IRF540 mosfet module
 + dual water pump

  

Portable air compressor

August 14, 2022

portable-air-compressor  Facebook  Twitter  Google +  

 I created this one for camping and balancing the tires on the go but it wasn't functional so much, maybe a bldc motor and lipo power source make it more handy tool when compared with it's weight to feature.

IMG_20210318_113906.jpg
IMG20210309180918.jpgIMG20210317202721.jpg

 
 Cost: build with existing materials, only paid for pump which costs around $25 and pressure switch $100 but it was completely unnecessary purchase hence i didn't hit to 10 bar yet.
 

  • Power source: 12v motocycle battery
  • Max. pressure: 8 bar
  • Capacity: 2liter
  • Features: thermal protection, fan-cooling


  

The Italian Restoration

July 06, 2022

the-italian-restoration  Facebook  Twitter  Google +  

 The recent pandemic put importance of private transportation on the table, everyone become mad max hence we was literally in a post-apocalypse situation. Before the pandemic i was driving a M-segment light truck which left from family. After that i bought a cheap 2006 fiat palio with 1.2lt engine at 2020 and adventure started from there.

 
  In middle east the things like phone,car,house etc is a sign of social class. People treating each other based on what you wear, what you drive and same treatment follows you on the mechanics shop. While driving palio, someday i wanted to replace it's brakes but can't get a proper attention from two different shops i visited. I said, fuck it i'll do myself. Purchased few parts and watched couple youtube videos and did it. Same year i replaced water pump, ignition coils and also fixed it's ecu by soldering a burnt component.
 

  Resurrection of the dead
  With a proper maintenance i managed to hit 90 hp - 170 km/h with palio but i was literally feeling the pressure of the wind over hood. After a minor research i found 1996 fiat coupe with 2000cc engine. It have the same setup which i familiar with and easy to modding. Sold the palio and bought this one, the problem was it's so damaged and missing few major components to drive. I bring it to office with fire extinguisher and lot of prays. In following six months literally rebuilt it from scratch. Including the pistons, cooling systems, fuel rail and ecu wiring.

 
  Modernization Process
  It has an ecu from 1993 technology, but it's only for injection. Started with the installing a pirated version of VEMS ecu, also the supplier delivered it with an AFR gauge and in-line VAG coils which used in modern audi & porsche group. Installation was quite challenging. Eventually did it but the new setup created more problems afterwards.

 
  December: The wiring done in one month, removed the unnecessary stuff. Removed all existing cables and attached new silicon ones that also covered with fire-resistant fiberglass tubes. The most challenging part was adapting 60-2 crankshaft wheel from Marea/Bravo for trigger sensor.
 
  January: Here goes the first challenge, it's working as expected but engine heating too much, even become undriveable. I literally burned the engine at first attempt to drive, replaced the pistons afterwards. Ofcourse including the learning process it took 3 months.
 
  March: I installed the pistons, cranked the engine and ran for 5 minutes. This time one of the valves is broken and we got a giant hole on the brand new piston. Probably that was caused because of an off-timing
 
  July: Installed the headlights, replaced entire fuel delivery system and installed temperature sensors to critical points. All of them collected with arduino, if one of values pass the treshold a warning text appearing on the oled screen. So many values distracting while drive, so i built a basic monitoring system for that.
 
  June: The first drive, i hit to 160km/h on highway by keeping temperature around 80c. I was so nervous because if the crankshaft sensor exceeds 100c, it's sending random signals to ecu which leads to immediate piston damage due to random explosions. I also put a ntc thermistor to there and watched closely alongside with coolant temperature. 

Final Setup
  • VEMS Ecu v3.3
  • 60-2 trigger wheel with Magneti Marelli SEN8I hall sensor
  • AEM wideband AFR gauge
  • 470cc bosch standard injectors, 2v2
  • Beru ZSE32 vag coil, 2v2 wasted spark
  • WTS05/09 coolant and intake air temperature sensor
  • 3bar fuel pump, Mercedes-AMG equivalent rail and filter
 VEMS v3.3 compatible map and mentioned arduino sketches are available in here


  

From Hacking to Engineering: Arduino Powered Packaging Machine

March 03, 2022

from-hacking-to-engineering--arduino-powered-packaging-machine  Facebook  Twitter  Google +  
  thumb.php?f=ZnJvbS1oYWNraW5nLXRvLWVuZ2luZWVyaW5nLS1hcmR1aW5vLXBvd2VyZWQtcGFja2FnaW5nLW1hY2hpbmUvdmlkcG9zdGVyLmpwZw..&w=360

 Well, it's happened. Mayans was right about doomsday, just miscalculated 8 years earlier. We experienced an immersive sci-fi movie scene. Everyone stuck at home and cook bread. Also i stuck at workshop for weeks and tried to resurrect 20 years old non functional analog packaging machine by wiring and coding. After two years i had a chance to document the project hence everything become normal again.

 The Concept
 To whose isn't familiar with this kind of machines, let me give a quick brief: There is a three phase 380v AC motor with 1/60 reduction starts to rotate when electrified and mechanical switches on crank mill arranges the timing of other motors like product filling and paper feeding. No electronics.

 Modernization
 I did the entire wiring from scratch and developed a quick sketch in arduino to entirely take over the timing control in four phases:
 
 1: Mill run to open blades
 2: Mill Stop, Feed paper
 3: Paper Stop, Start filling
 4: Stop filling, Mill run to cut paper
 
 Technical Challenges

 - Sensor voltages: This kind of machines completely driven by 220v AC sensors, first i have to reduce them to trigger 5v, so i installed mini 220v relays to sensor inputs and send ground signal to arduino by using it's internal pull-up resistors.

 - EMI Interference: I had to remove AC contactors and replace them by 220v SSR relays, they're misfiring on idle but that's acceptable. 

 - Torque & Power changes: Currently engines are driven by time, but time is also not constant. Engine should turn in exact same rpm on every cycle but it's not, so i have to implement arduino compatible 5v ttl sensors and do the all operation based on sensor inputs instead blind timing.

 - Application Crash: When you start to use dynamic arrays in C language you quit your small safe pond and dive into hardcore oceans of microcontroller. In those oceans also you should deploy more protection and failure scenerios. Let's say you're changing the paper, machine suddenly start itself and cut your finger or process froze exactly on blades closed and starts a fire. I'm considering a secondary eeprom module to pick up application state and sensor values in case of crash or reset. not implemented yet.
 
 Source Code
 I uploaded the first two project attempts into github, now working in third version to keep it more stable. you can find the repository in here.

  

Getting more from a digital bathroom scale

January 21, 2019

getting-more-from-a-digital-bathroom-scale  Facebook  Twitter  Google +  
  thumb.php?f=Z2V0dGluZy1tb3JlLWZyb20tYS1kaWdpdGFsLWJhdGhyb29tLXNjYWxlL3ZpZHBvc3Rlci5qcGc.&w=360

 This idea was in my mind since decades but just don't want to waste a whole arduino for a single i/o operation which draw less than 2watts.

 
 Recently discovered digispark which is an ATtiny85 powered development board costs around $5. It's smaller than arduino pro mini which makes it perfect fit for wearables and iot projects.
 
 There is already wifi/bluetooth enabled bathroom scales available on the market but they're expensive and only sending data to their own application with a custom protocol. My setup costs around $10 and took one hour to deploy. It's collecting sensor values from hx711 load cell amplifier and transferring this information to pc with 443mhz wireless link. I attached a wireless receiver to previously mentioned sensor station which collecting the data and pushing it to my virtual assistant software called "Judith"

 How is the data processed
 I created a script that groups the same values in array and deciding the gross value by getting value of largest group. Previously i tried to take average of incoming data but this method provides more accurate readings.
 
 Virtual assistant writing that value to database and providing voice feedback after that. Also created a JSON api endpoint for chart visualization purposes.

 Assistant software is mostly turkish, planning to release it to public after a translation and some makeup but you can take a look to arduino sketch if interested with creating a similar setup.
 
 Shopping list
 + Bathroom scale - $8
 + hx711 load cell amplifier - $2
 + digispark dev board - $3
 + 443 mhz transmitter - $1

 arduino compatible source code available in here: https://gist.github.com/PsyChip/d716c55f6b908ae7ae43c19cce6924ea


Older Entries