Home improvement: Attiny85 Powered Soap Dispenser

October 09, 2022

home-improvement--attiny85-powered-soap-dispenser  Facebook  Twitter  Google +  

 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.


 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.
 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.
 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

 + 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.


 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 +  

 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.

 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 +  

 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


Path to #FAIL: Aqua Regia

December 08, 2018

path-to--fail--aqua-regia  Facebook  Twitter  Google +  

 That's a follow-up to previous entry. I collected unused simcards, expired credit cards, spare smartphone parts and melt them too into previously created hydrochloric acid+hydrogen peroxide solution.


 After the third day, i got avg 4 grams of gold dust and asked some jewelry workshops to if they're interested. Common question was "how pure is your gold?" I did a quick research about that, noticed even market standard alloys are contains only 95% of gold. Determination of purity is simple, just drop it into nitric acid and observe if it's turning into green or not. if it's not, it's safe to buy.
 Well, i literally fucked up this time. wasted one week, around $50 to chemicals and whole box of electronics. that's how: i was preparing to melt the dust. But put them to nitric acid to clean up the other particles and see how pure is it. What i wasn't know is the leftover hydrochloric acid (which dust was still wet) interacts with nitric acid and creates the only solution that can dissolve the gold called Aqua regia

 Being away just for 5 minutes, returned back, wtf! gold was completely dissolved as a yellowish fluid, just the other particles was left.

 I should wash the speckles twice before dip them into nitric acid. Learned via hard way.

Older Entries