About Me

I am an engineer, an electronics hobbyist, and generally have an interest in anything tech related.

I graduated from the University of Western Australia with a bachelor degree in Electrical & Electronic Engineering and a bachelor degree in Commerce. Currently, I work as a building services engineering consultant. My main area of expertise is within the electrical discipline (HV/LV Power Systems, Lighting Design, UPS/Generator Systems), but have gained experience across all of the various consulting disciplines (Communications/Mechanical/Fire Services/Hydraulics).

The purpose of this blog is simply to catalogue and share what I learn. I am a firm believer in publishing any information, tips, tricks, or other discoveries online for all to see. No matter how small, trivial, or insignificant it may seem, share it. For every engineering problem you face, there is always a high probability it has been faced before (or will be in the future). For the rare occasion you encounter something new, there are thousands of other like-minded individuals to help out and contribute. We live in a globally connected digital age – make damn good use of it!

 

— David Ogilvy

14 Comments

  1. Hi David,

    I am following your SPI activities. I already wrote over the ESP8266 Community Forum. I am very interested in making the nRF24L01+ work with the ESP8266. I try to make bit banging BLRE work on the ESP8266 (http://dmitry.gr/index.php?r=05.Projects&proj=11.%20Bluetooth%20LE%20fakery). It’s already working on Arduino. So the first step was to use the Port of the Arduino IDE to the ESP8266. But without success.

    I want to use your SPI Library as next step. If you look at the source-code you will notice that I only need to write bytes over SPI, nothing more. I hope it will work.

    My ESP8266 SDK is installed and working. Do you have a standalone project, with Makefiles etc. which I can use to test the code ?

    Regards,
    Hakan

    • I just have a quick project setup that runs everything in user_init() without ever releasing back to the Espressif codebase (so no wifi etc). This is just so I can test hardware functions without interruption. I am planning on releasing a skeleton project to Github soon which has the 3 levels of system_os_task setup.

  2. Hi David,

    I read a couple of your posts** mentioning your sunbeam BT2600 reflow oven, in 2011 and 2012. I am looking for a suitable oven (in Australia), to build one of these http://whizoo.com/reflowoven , and I identified the BT2600 as a plausible candidate. But I am a bit worried after reading some negative reviews (e.g. the handle melting). I could replace the handle (maybe some Al extrusion), but I don’t want the elements to fail quickly.

    How have you found it over the long term ? Would you still use this model ?

    Tim

    **http://www.eevblog.com/forum/projects/diy-smd-reflow/
    **http://www.eevblog.com/forum/projects/yet-another-oven-controller/

  3. Hi david,
    i’m interested in controlllng esp8266 with AUDUINO Mega by using SPI interface. It is possible? Could I go on web? Could you suggest me some project or libraries that implement these capabilities?

    Thanks,
    Vincenzo

  4. Hi David,
    I recently bought a 6040 CNC and would love to get it running, i would love to get in contact to find out any hints and tricks as I’m yet to get it running g 🙁 ,
    Thanks,
    Max

  5. hi
    i want to reaad mac address’s of beacon who nearby of module. it may be saved in ram of esp8266 but the at command from uart can not give me client mac address. can you communicate with module with spi interface and read the mac address?

  6. Hi David,
    I’d like permission to do a write up of using the SPI ESP8266 library in a publication. I’d also like to ensure that we can use the code within another Open Source project with proper attribution.

    Can you email me at [Email Removed to avoid Spam]
    Neil

  7. Hi David
    Would you consider doing paid work on an esp8266 project. If so an we discuss directly on email?
    Thanx

  8. Hai David,
    You wrote that you were writing a Python program for your Maynuo M9712C. Have you made progress on that and can you share this with me?
    Hope to hear form you
    Best regards,

    Michel

  9. Hi David,
    I need to have the SPI working in full duplex, but your driver was not working in this way, after
    searching I’ve found the following post from another blog , I tested it and works. Hope this would be useful for the other users.

    I’ve been working with the esp8266 spi driver by MetalPhreak . One of the issues I’ve found is that duplex transfers (where you want to both send and receive at the same time) don’t work correctly. If you attempt to call spi_transaction specifying 8 dout_bits and 8 din_bits 16 clocks will be sent (IIRC a receive followed by a transmit).

    The misunderstanding is likely down to the fact that the esp8266 has very little documentation. And the SPI registers aren’t documented at all. However the Arduino guys seem to have figured it out and it works correctly in the Arduino IDE board pack for the esp8266.

    The trick is to set the SPI_USER register just so. There are 3 bits which control the direction of transfer SPI_USR_MOSI, SPI_USR_MISO and SPI_DOUTDIN (bits 27,28 and 0). In order to send and receive you need to set SPI_DOUTDIN and SPI_USR_MOSI but NOT SPI_USR_MISO. At least that’s what’s worked for me.

    I made the following modification to spi_transaction to fix this. Change the line reading:

    if(din_bits) {SET_PERI_REG_MASK(SPI_USER(spi_no), SPI_USR_MISO);}

    to

    if((din_bits) && (dout_bits)) {
    SET_PERI_REG_MASK(SPI_USER(spi_no), SPI_DOUTDIN);
    } else {
    if(din_bits) {SET_PERI_REG_MASK(SPI_USER(spi_no), SPI_USR_MISO);}
    }

    I’ll probably submit a pull request once I’ve made all the changes required for my project. But in this meantime this should work.

  10. Hi,

    Are you available for freelancing work? THis includes integrating your ESP8266 SPI driver library with NodeMCU and making ESP8266 as a WiFi adapter to STM32F429Discovery board.

Leave a Reply

Your email address will not be published. Required fields are marked *