Saturday, 27 October 2018

ESP32 play

Got a start point for ESP32
Bread boarded with 8 LEDs.
Ok, not that exciting, a set of 8 LEDs flashing in sequence. But that means I have tool chain setup and working and can program the beast. It's not in Arduino, that is available but has a lot missing at the moment, so I'm using the full Espressif tool chain:
I just took their standard Blinky example and tarted it up a bit.

I have a nice little 320x240 LCD with full touch and mmc card holder, works nicely on an Atmega 2560, lets see what I can do with an ESP32, have to interface with bread board first of course.



Sunday, 21 October 2018

ESP32

I want to use ESP8255, I think it has enough pins for what I want to do, but I'm waiting for delivery from China.
In mean time, I have a few ESP-WROOM-32 modules. Got 2 off Banggood for £3.42 each.
This is really too new, not fully supported by Arduino, but it is a very nice chip and a very nice module and I have some spare time.


Created a simple PCB to create a bread board friendly module.
Created minimum circuit, serial on TXD0/RXD0 to PC via FDTI, used FTDI 3v3 for power, reset momentary and flash/program slide switch.
Got the "Hello World" example up and running.
It's a good start point. Plus, I now have a new toy :-)



Monday, 15 October 2018

Electronics playing

It didn't work, no idea why. Just what I was worried about.
So, I simplified:



The connections are no longer sorted (simplified).
I actually drilled a 2.5 mm hole through PCB in center of IC base pad. After placing and soldering small pads, I soldered tinned copper wire to base of IC (from other side of PCB through hole) and filled with solder.
Still did not work!!!! Still no idea why.

I used a USB microscope to examine very carefully, all joints look good. All joints buzz out ok.
Maybe the oscillator is not good enough, maybe wrong choice of crystal, maybe wrong capacitor values, I would not have thought this would totally stop it working.
There is no recommendations from Espressif that I could find.
But, whilst I was looking at schematics to try to find a known good set of components, I came across this:
For breadboard, that is pretty close to what I want, ESP8285 with all pins broken out, a little PCB to translate connections to 0.1 inch bread board compatible and I'm up and running.
So, I've ordered 5.

What I want is some building blocks.
I want a block that is all basic known good components to give a basic working ESP8285 circuit.
A block that I can plug into a bread board and with other building blocks and quickly get something working.
A block I can put onto a PCB with other blocks to create what I want after bread board stage.
The ITead module should work as a stepping stone toward this goal.


Thursday, 4 October 2018

Electronic Playing

Assembled and plugged into bread board:
Using heat gun to put down 8255 and crystal seemed to work ok.
The '0603' capacitors were as difficult to hand solder as expected. You can't see 0.5 x 0.2 mm well. You pick them up with tweezers, too much pressure they are gone, try to move with end of hobby knife, it flexes, gone. 
Now still being a wimp. If it doesn't work, is it soldering? is it circuit? is it components? is it breadboard wires? has it got bootloader?
I'll get to it tomoz, had to try fixing a DVD drive in a telly tonight.


Thursday, 27 September 2018

More Electronic Playing

Ok, I'm still wimping out. I built the PCB, bit more complex that my usual. Main problem is ESP8255, it's a 5 x 5 mm, 32 pin chip, problem is that it's only Gnd (0V) is pad on bottom of chip, no way to route a track to it, not a problem with through plating, but somewhat of a bitch with home PCB.
My PCB drill now decides to play up, vibrations in the drill bit, snapped my only 0.6 mm bit, moved to 0.7 but the vibration causes it to drift around the pad, doesn't center on etched center hole anymore. I had the vias as 1mm, redesigned the PCB around 1.2 mm, made again, bought new drill and new chuck.
So, I have PCB and it's fully drilled. I have 5 off in dice pattern with pad under IC on both sides. I've put tinned copper wire through all vias and soldered. The hope is that I put down ESP8255 with heat gun, it seats on enough solder that wires drop down but remain sufficiently high to connect with pad and IC.
Component side, not my best PCB, ESP8255 area tinned ready.
Non component side, after ESP8255 the crystal will also need laying down with heat gun. Capacitors also tricky, I'm used to 0603 components, that is what I ordered, but 0603 capacitors are not 6 x 3 mm as I expected, instead they are 0.5 x 0.2 mm, I can hardly see the things, going to be tricky to solder by hand.

I think I have that covered: USB microscope
Kit is good, but I would have preferred it to plug into my phone, use it as a display near to PCB whilst I solder. But my phone does not support being a USB host. Works well on PC, but that is not next to my solder area. I'm working upon using Raspberry Pi as display. This is background task.

I of course also have normal background jobs, clearing drive, varnishing rocks for grand kids, central heating needs fixing, etc. Oh and of course work ;-)

Now the ESP8255 module will allow me to use it on a bread board (if it works), that leads into playing with camera. I have lots of OV2640, but I've cheated and bought a module that will be easier to also put onto bread board:

I really need to push on....



Saturday, 22 September 2018

Electronic Playing

I've been playing with something that may become a product for the company I'm working for, so I won't say anymore about that other than it took a lot of time.

So, now I'm back to playing. I'd still like to make a really cheap Wifi Camera and I think I have all the tools and parts I need to do that.
I love Espressif devices, they pack a heck of a lot into small chips.
https://www.espressif.com/
There are now 3 main variants:

ESP8266
  This is the original Espressif chip, it has caused quite a stir in the hobby world.
  It's a single small 5x5 mm, 32 pin chip containing a processor and most hardware blocks to
  handle WIFI.
  There are an awful lot of different modules available containing these chips.
  Previously I created a remote control from an ESP8266-12 module.
  I've been buying these off Ebay, always under £2.
  Unbelievable value for money.

ESP8255
  This is the next stage, ESP8266 required a separate flash chip, all ESP8266 modules
  contain the main chip and a flash chip. ESP8255 now includes a 1Mbyte flash inside the
  chip. So it behaves and performs like an ESP8266, but modules are much smaller. My
  favorite so far has been the ESP-M2 by DOIT (Doctors Of Intelligence and Technology).
  I've been buying ESP-M2 off AliExpress, £1.41 each!!!

ESP32
  This is the very latest offering, not quite mainstream yet, they have gone very much
  upstream. I'm looking forward to playing with it.

The modules are all fabulous, but none of them seem to break out all the pins of the processor, and all of them are non bread board friendly. I've created PCBs where the module mounts to the board.
I have a PCB that connects ESP-M2 with micro SD card and RS485 bus as well as all the components to go from 12V to 5V and 3V3. This PCB is 63 x 26 mm. I had a few problems requiring putting 5V onto module pins and blowing them up, would have been much more advisable to have bread boarded it first.

So, I've fixed that.


I've created 2 small and simple PCBs, I can now plug my ESP-M2 into a bread board. Here's 1 I prepared earlier
Standard FTDI module at one end, supplies 3v3 and allows programming via Arduino.
ESP-M2 module at the other end. See lower photo, push button to reset the ESP, black push switch to switch between flash and run modes. See upper photo, 8 LEDs all attached to ESP GPIO.
Ok, it was just a setup to play, I have 8 useable GPIO, I have them flashing in all sorts of patterns. I didn't go further, I could have had them all controlled from a web page via WIFI, but I didn't.
These days I have ditched Eagle for PCBs, the constant nags to buy and the limitations got too much, I've moved over to using KiCAD and it seems to be a good decision.
I have KiCAD files for all these if anyone is interested?

The ESP8255 chip is much more than the ESP-M2 module, I've got some chips, so I'm currently creating my own module, this is a part of the ESP-M2 module schematic:
I listed the useable GPIO, IO16 isn't included above and IO2 can be used, that is the 8 off GPIO I used on bread board. This is a part of my ESP8255 module schematic:
Ok, bit complex to see clearly! But it has 14 useable GPIO. Though I have focussed on GPIO, they all have alternate functions, SDIO, ADC, PWM, too many to list, you need to look at datasheets for full details.

I've also been playing with other stuff. Got a darling little touch TFT LCD.
The LCD module is 2.4 inch, 320x240 pixels, £3.50 from Ebay. It's attached to an ARDUINO MEGA 2560 running demo paint program (not mine), works very well, has Full LCD, 4 wire touch and micro SD holder on the module. I want to get it running with the ESP8255.

I've also been looking around, I think I can plug an OV2640 camera into an ESP8255 and get it running, Wifi Camera next attempt. I can also buy all these chips at a very nice price from Mouser.

Ok, back to the real world, I've created this ESP8255 module with crystal and PCB arial, but I've not had the guts yet to build the damned thing, writing this has put it off, but time to bite the bullet.

Watch this space.......


Thursday, 11 January 2018

eBike near done



The actual bike:

Pictures of components:

Freewheel side of back wheel pulley, mounts between freewheel and wheel, see how freewheel teeth sink into pulley to hold it.
Wheel side
Both sides of motor bracket and controller (VESC) box.
Close ups of the bike:

Basically, it's mostly done, ready for test ride this week-end. All plastics printed in correct colours and assembled to bike, all wiring loomed with and attached to bike with silver PVC tape.

13/01/2018
Test ride this morning, not too far, about 3 miles. Fine on flat and downhill, made some noise on hills. I think the drive belt needs tightening, I think it was jumping on the main pulley. Even with jumping, it took me uphill. Top speed between 21 and 22 mph according to bike computer.
I might tighten up the drive belt and give it another go tomorrow.
But 3 miles, took around 10 minutes, then 1.5 hours to charge the battery back to full.
On the other hand, as I was dressed at the time, I weight 15 stone 7 lbs which is above average, will probably be OK for my Dad.
So, I think this is a success, tightening belt may make it better. I'm still waiting on the battery level gauge, then I can try it on a bit longer journey.

21/01/2018
This project is now on Thingyverse:
Original didn't have source, I had to re-create all parts myself in OpenSCAD, so I added my sources just in case it was of use for someone else to customize it for a different bike.

Ok, so I don't understand Social Media!
I'm on Google+, not really sure what I'm supposed to do on it.
I joined this group "3D Printing" some time ago, just recently I thought maybe I should actually do something on it, they have a Section/Forum called "ShowNTell", lots of people showing off what they have printed. So, I added a link to the thingyverse item with title "Assisted Bicycle".
I got banned!!!!!! Owner says I was spamming his group.
As I said, I don't understand.
It's also so unjust, I've done nothing wrong, broken no rules, but I've been tried and convicted by some guy I've never met and don't know. Very frustrating.
Ah well, live and learn....