Circuits for noobs (like me)

This is probably a part in a series where I figure out some basics of electronic circuits. I take absolutely no responsibility and I might as well be totally wrong. I try to figure stuff out and see if it makes sense to me. The I’ll hook it up to my controller and if there’s no magic smoke I might have done something right 🙂
I’m a programmer, I can write code for microcontrollers an hook some sensors up and I know that plus is minus and red is black 🙂
But when it comes down to calculating specific dimensions of components or knowing what basic component I need in a circuit to adapt to specific conditions I’m totally lost and start all over like I’m back in 7th grade.

Part 1 – Voltage dividers

Simple Problem: Voltage coming from a 6V Solar Panel needs to be measured with an ADC which has a maximum input voltage of 2.048V (to be more specific: I use an ADS1015 with GAIN_TWO – more on that later)
Continue reading

New kid on the block

Happy Happy Joy Joy!

The mailman brought a new display. Cheapskate I am I took the display with the most bang for the buck – at least I thought. The display here is a 0.96inch 128×64 OLED blue/yellow with 3(!) interface options: 3wire SPI, 4wire SPI and 2 I2C. And then the problems began…

I wanted I2C mode because I’m a little limited on i/o’s on the FeatherFona. The boards factory setting is 4wire SPI and for the other modes you’ll need to resolder a tiny 0 Ohm SMD resistor on the back (or just bridge the two pins). Did that and connected VCC, GND, SDA/DIN, SCL/CLK and fired up the Fona. Nothing.

Also waveshare has actually a wiki with a spec-sheet of the SSD1306, a schematic and a user manual for the module it’s of no use for people like me. They only mention 4wire mode and with not a single word that you actually have to connect 7 wires for a 2 wire I2C.
And I usually don’t have the time to go through all the specs nor the deep electrical knowledge.
So a bit of research, a bit of fiddling and long story short – the pinout:

GND - GND (obviously)
VCC - 3.3V (spec says somewhere 5V via dc/dc regulator but I'm not sure if there is one and I don't have 5V anyway)
RST - 5V or #4 (actually the SSD1306 spec says: keep HIGH during normal op, pull LOW for reset)

For the reset pin I’ll see what happens if I just wire this to VCC and never pull LOW. I mean: I never want to reset the display controller. I reset/power down the whole FONA which should also reinit the display controller, amirite?
So module is working and now I finally know what a blue/yellow display is. b/y doesn’t mean you can freely choose color. b/y means theres a row of yellow pixels at the top and the most part of the screen is blue. This is a kind of odd design but one could argue that you’ll often have some menu title in the top anyway.

So that’s for the display. I now have 2 options to choose from which was important for me to be more flexible with the actual design of the phone. Speaking of design I now have a fairly good idea which direction I’m going. Time for some electro etching 🙂

Besides all this I’ve got a job opportunity so I think I’ll need to get my hands dirty with some java frameworks in the next few days.


Phone progress

img_20161110_202952A small update on the phone project

(Note2self: implement GD-Lib on the server to properly scale the images)

In the picture you see the current setup sitting right next to me.

Thats the feather with a 128×32 OLED featherwing, a gsm pigtail, a small speaker in the plastic bag, 3 buttons on a pcb and an old rotary dial.
The rotary dial is not the final one since it’s from around the 80’s and got all plastic gears and doesn’t sound as good as an original one. Got a better one right behind me, all  metal and Bakelite but different timing and no dial for now.

Code-wise I implemented a basic menusystem, I can make calls (Rotary dials weren’t meant be used for  12 digit cell phone number, weren’t they?) and I can answer calls.

This weekend I’ll do a complete refactoring of the code because the way it is now it’s getting out of hand. Then either look into power saving modes and figure out why my FM units is not working or I’ll start on the case.

I made a first sketch seen in the picture but I’m not quite sure if I’ll go this way. Steampunk is out of the question – at all this is a cell phone and there’s only this much you can hide behind brass, ornaments and overengineered mechanics. Art deco doesn’t fit either so I’m probably going dieselpunk.
I’m not really sure whether I’m going the bulky military look with wood&polished steel like in the pic or do something with more rounded edges – something that actually fit’s in your pocket without tearing huge holes in the fabric of your jeans. I’ve got some fragments in my head of wood framed in some massive aluminum bars, a flip phone, round edges, … dunno.

Oh, and btw: I consider the SMS-typing problem officially solved 😀



UPP: Unnamed Phone Project

img_20161104_153352After merely 2 days my order from arrived. Just in time for the weekend.

I knew that the adafruit Feather Fona is small but being so tightly packed was a surprise.

The Feather Fona is basically a SIM800H GSM modem, an Atmel 32u4 and a LiPo charger all packaged in an arduino compatible manner and all on one board.

The heart of the Fona (which is a small mircacle to me): It sports a 2G GSM modem, Bluetooth, FM-Radio, SMS, Voice-Audio and a TCP/IP Statck – all in one chip. The spec sheet has 380 pages full of AT Commands to keep you busy for a while 🙂

However I can’t recommend to buy this board. There seems to be some major hardware design flaws. On the official adafruit forums are a number of people fighting random resets because the GSM antenna seems to have too much power for the tiny board. Another user reported 9 out of 22 Fonas had faulty SIM-Card holder which he fixed with some tape. I assume that’s the reason why this unit is currently out of stock.

My unit kept resetting after i plugged in the Featherwing (a small 128×32 OLED) and the battery, thus powering the SIM800 chip. Without battery and powered down SIM800 the board worked flawlessly. Without the Featherwing but with battery I was able to place calls. Both together did not work. Even attaching some extension cables to the featherwing didn’t do the trick.
I deactivated the GSM modem, plugged in the OLED and started working on the other parts of the project.
Yesterday I gave it another try and all worked flawlessly. But I don’t know if i would trust a cell phone that may reset at any given time.

However the bigger brother – the FONA (without the feather) doesn’t seem to have these problems. So do yourself a favour and buy thius until adafruit releases a v2.