News for hackers. Stuff that matters.
Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Tuesday October 31, 2017 @07:51AM (#15592512)
I agree, but I would say that for personal projects, I find the difference in price quite irrelevant. What's typically important is how the part fits the application.

For example, recently I found that the fumes extractor in the kitchen of the flat I rented failed. The PIC on board got tazed with 10V from a broken PSU. I fixed the PSU (replaced cap and regulator, added TVS diode for protection), but the programming on the PIC was lost.

So I found that there is one AVR with matching pinout that I could use in place of the PIC. Thanks to AVRs being so easy to program I could program and test it in an hour or so, and even added some extra features.

I do other projects where I need more power (Cortex M3/M4), but AVR is hard to beat where it comes to how quickly you can get simple things going.

Re:Chip Hall of Fame: Atmel ATmega8 by jacquesm on Tuesday October 31, 2017 @08:49AM (#15592791)
You're a dream tenant. The normal procedure when something that is part of the premises fails is to ask the landlord to replace or fix it.
Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Tuesday October 31, 2017 @08:56AM (#15592843)
That's what I would usually do.

I have almost 2 decades of interesting experience as a software dev. I am now learning hardware design so that I can create niche hardware products and use my dev experience as an advantage.

I decided to fix it only because I am of the opinion that if I want to act professional in any area I can't shy away from projects like that.

If I calculated the time I spent on this I could have easily bought few of these, new, for the time I was not spending on billable hours.

Re:Chip Hall of Fame: Atmel ATmega8 by crankylinuxuser on Tuesday October 31, 2017 @10:11AM (#15593333)
It's awesome that you did that :)

I know it's one of those compliance issues, but it might be a good idea to have an electrician come out. Last thing a renter wants to see, is bodged together "fire badness".

I'm not saying yours is by any means! But sane-ness and law hardly go together :/

Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Tuesday October 31, 2017 @10:33AM (#15593506)
You would be correct (compliance, responsibility, etc.) but I also know for a fact that the guy guys (I won't call them electricians) that would come to fix stuff would not do better job.

My kitchen was completely miswired since the building was built. The ground exchanged with neutral line. I tested the lines and put it back together as it should. There were many complaints from previous tenants but nobody was able to figure out and fix it -- seems so basic but nobody could do it.

Re:Chip Hall of Fame: Atmel ATmega8 by crankylinuxuser on Tuesday October 31, 2017 @10:55AM (#15593658)
If I wouldn't know better, it sounds like we live at the same place!

I get you - that your work is likely higher quality, and you could claim ignorance if anyone did have a complaint.

But yeah, on Sunday, I redid some of our outlets and switches. We live in a trailer, and some of the switches were getting intermittent, and some outlets were loose to the point of turning off stuff if they jiggled. But.. I did find out that 1 outlet in the bathroom, the hallway lights, and 1 wall of the living room were on 1 gang... (sigh). I have my work cut out for me if I actually want to do it right.

Re:Chip Hall of Fame: Atmel ATmega8 by voltagex_ on Tuesday October 31, 2017 @10:38PM (#15598478)
How'd you get into hardware design from software? I'm trying the same thing but have never really got past blinky LEDs and breadboards.
Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Wednesday November 01, 2017 @06:31AM (#15600003)
I asked myself the same thing.

I think its best to start by utilizing your software experience as much as possible and having just enough hardware to get by. Also don't try to learn/solve too many problems at the same time.

Most of my projects is relatively little/simple hardware + lots of features in software.

For example -- one of my complicated projects requires very precise temperature measurement, precise regulation of mains AC power to 1kW heating element, dealing with PCB environment being very hot and humid (up to 80C), etc.

I am splitting the effort of learning all of those things, and first thing I am building is a precise, standalone thermometer. I will build some software features (data acquisition to SD card, USB, etc.) which is relatively simple compared to getting precise temperature measurement.

Then I will maybe build standalone power regulator that I could have many uses for especially when connected to the thermometer (for example control my oven to do reflow!).

Once I know the building blocks I will attempt building the complex project I have in mind.

Re:Chip Hall of Fame: Atmel ATmega8 by mschuster91 on Tuesday October 31, 2017 @08:05AM (#15592579)
Out of curiosity: what features did that fumes extractor have?! Mine has just a plain old switch to control the fan in 2 speed modes, and another switch to control the light...
Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Tuesday October 31, 2017 @08:16AM (#15592631)
3 speed modes, light, and some diode indicators.

Previously there would be one switch to control light, 3 switches to control speed modes and extra switch that I don't exactly know what it did -- probably it controlled some kind of timer.

The 3 switches that controlled modes were 0/1 (change speed to 1 if anything else than 1, turn off if it is currently 1), and 2 and 3 which would turn on 2 and 3 speed mode.

I have added a 500ms long press to 0/1 switch which means that whatever is happening it turns off both light and fan at the same time. You don't have to turn off light and fan separately and you don't have to press 0/1 twice to reduce the speed to 1 and then to turn it off.

As it was sometimes difficult to figure out which speed it was on without looking at the indicators (on the side and not on the front of the extractor) you never knew you had to press it once or twice which was quite irritating.

Re:Chip Hall of Fame: Atmel ATmega8 by nerfhammer on Tuesday October 31, 2017 @01:50PM (#15595071)
now, add a motion sensor so the light comes on when you stand near it and a smoke sensor so that it turns on automatically when you start cooking and stops automatically when all the smoke is clear.
Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Tuesday October 31, 2017 @02:37PM (#15595471)
The object was to place a new chip into an already existing PCB and then program it to work with the existing parts, switches, and so on.
Re:Chip Hall of Fame: Atmel ATmega8 by retSava on Tuesday October 31, 2017 @08:10AM (#15592606)
I guess the microcontroller controls a fan using PWM with a duty cycle depending on the mode. Even if you could do it with a 555, it's easier to just do it with a microcontroller. It also makes it easier to make changes up until production without changing hardware.
Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Tuesday October 31, 2017 @08:21AM (#15592656)
No, it controlled it through a Darlington array controlling an array of mechanical relays. The fan has 3 220V AC inputs and selecting the combination of inputs changes the fan speed.

I haven't looked inside the fan because it worked correctly. I also didn't want to test it to see how it works so I figured it out by analyzing the PCB. Actually that was quite good idea because the relays seem to be connected in such a way as to only allow valid combination to be sent to the fan even in case of invalid input from the microcontroller.

I suspect bad things would happen if I sent incorrect inputs to the fan -- looking at how crappy the board was but at the same time that the person put effort into placing the relays to explicitly disallow invalid combinations of power lines to the fan.

Re:Chip Hall of Fame: Atmel ATmega8 by forkandwait on Tuesday October 31, 2017 @05:50PM (#15596905)
Is there a hacking genre in which one replaces the "brain" (e.g. the microcontroller) and the "neurosystem" (e.g. the wires running to relays controlling power) in already extant machinery? Like this fan? I would love to read about that. Maybe help the right to repair.
Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Tuesday October 31, 2017 @06:51PM (#15597338)
Not sure about replacing. My current project is to design completely new electronics for Rancilio Silvia espresso machine. I know this kind of modding is popular with many people buying a machine with modding already in mind.
Re:Chip Hall of Fame: Atmel ATmega8 by filomeno on Tuesday October 31, 2017 @09:31AM (#15593071)
> I agree, but I would say that for personal projects, I find the difference in price quite irrelevant

Yes, of course, but it just doesn't look good when the price almost doubled in twelve months, specially when you have better and more powerful micros like the STM32 for less money.

Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Tuesday October 31, 2017 @10:17AM (#15593389)
They are more powerful but to say they are better you have to factor in the ease of use.

If you can get both MCUs to do the same thing but one of them takes 1/10th the time to set up then which one is better?

Re:Chip Hall of Fame: Atmel ATmega8 by filomeno on Tuesday October 31, 2017 @11:03AM (#15593729)
Sure, with "better" I was talking only about the features. I still prefer the AVRs for the ease of use, but they were as easy to use as today when the price was half it is now :)
Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Tuesday October 31, 2017 @11:19AM (#15593848)
So what is the price of the chip? If you are hobbyist, your main investment isn't going to be chips. Here in Poland, I can buy 5 ATMEGA 328Ps from Mouser for the price of single cinema ticket.

Any investment in time or tools is orders of magnitude more than prices of these parts.

Re:Chip Hall of Fame: Atmel ATmega8 by cjsuk on Tuesday October 31, 2017 @08:14AM (#15592625)
I find the PIC peripherals better. The counter is fully async on the PICs for example which allows you to do very fast (50MHz+) pulse counting.

Agree for getting things going though - definitely faster and none of that PICkit crap to deal with.

Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Tuesday October 31, 2017 @08:34AM (#15592724)
Most of the time when I go for AVR it is because ease of use and if I need more from MCU I go for Cortex-M because they are dirt cheap and very powerful and you can always find a part that does what you need.

For me there just isn't enough middle ground between 8-bit AVRs and ARM Cortex that would justify learning another platform.

I might be biased, as I learned starting with AVRs and then took to Cortex-M3/M4 when my projects outgrew 8-bit. If I started with PIC that would probably be PIC/Cortex-M, but AVR is so much easier on a newb like I was few years ago.

Re:Chip Hall of Fame: Atmel ATmega8 by vvanders on Tuesday October 31, 2017 @10:17AM (#15593388)
Yeah, for me I love the AVRs for small things but when I step up to a Cortex I love Cypress' PSoC. You get a mini CPLD and Arm m0/m3 on the same bus which lets you do all sorts of clever things.
Re:Chip Hall of Fame: Atmel ATmega8 by cjsuk on Tuesday October 31, 2017 @01:11PM (#15594797)
PSoC dev kit is also extremely cheap!
Re:Chip Hall of Fame: Atmel ATmega8 by vvanders on Tuesday October 31, 2017 @02:27PM (#15595387)
Yes! They're incredible little chips.

Want 8, 2 bit timers? Sure thing! One large 32bit timer? Done!

Having a CPLD to drive your peripherals so that you can reconfigure them is a brilliant idea. The fact that you can drop down to VHDL is an awesome bonus. They've also got some small reconfigurable op-amps built in as well that lets do you really clever things while sleeping.

Re:Chip Hall of Fame: Atmel ATmega8 by Faaak on Tuesday October 31, 2017 @02:39PM (#15595488)
By pure curiosity: would it be a FRANKE fumes extractor ? I have the same problem with mine.
Re:Chip Hall of Fame: Atmel ATmega8 by lmilcin on Tuesday October 31, 2017 @02:51PM (#15595592)
It is so cheap that there is no mention of any brand on the extractor. I live in Poland so the chances are very slim.