About baldengineer.com

Hi there, my name is James!  For a long time, I used “cmiyc.com” for my blog and personal brand.  It all started back when I was a kid and used BBSes running at the blazing speed of 2400 baud.   I tried starting my own board but didn’t have a dedicated phone line.  So, I called it “Catch Me If You Can” and adopted “CMiYC” as my handle.

The name “baldengineer” should be obvious I hope!

What Can You Find Here?

Electronics has been a passion since I was 12 years old.  Until I went to college, I taught myself.  I even made a small business out of modifying TI-85 calculators and selling TI-LInk to Parallel Port adapters.  As my career has grown, so have I.  Now I find that I like to teach.  So I combine my two passions:  Electronics and Teaching.  The best example is here, a new TutorialCast I created called “AddOhms.”

Bit of an older video talking about AddOhms.

Other Projects

There’s been a couple of other projects I have worked on in the past.

UnitiBlue – Blackchopper

This was the first business I tried with a friend.  We had an awesome product but didn’t really know what to do with it.  We created a universal USB adapter called “UnitiBlue.”  You connected various adapter cables to it, which provided the means to connect old-school video controllers.  The UnitiBlue emulated a USB Keyboard so that you could use NES, SNES, Genesis, and even TurboGrafix 16 controllers with emulators.

I still have a couple of units, but no longer the firmware.  Since these were based on the Cypress EZ-USB 8051 chips, all of the firmware was built into the PC’s driver.  Each time you connected the device, the firmware was downloaded and run.  Sadly, we don’t have the firmware anymore.

MacCaching – Geocaching for the Mac

When I first got into Geocaching, there was an appalling lack of support for the Mac platform.  (At the time, my PPC-G5 iMac was “the beast” machine.)  So I created software that managed Geocaches like iTunes managed songs.  My creativity was at its max because I called it:  MacCaching.  Unfortunately, I hit a point where I lost the source code due to a failed hard drive.  I haven’t had a chance to go back and recreate it from scratch.  (Also, I have since started using multiple backup services.)

45 Comments

  1. Glenn Hailstone Reply

    Hi James, I am just wondering if you can please help me.

    I have four LEDs connected to a 9 volt battery. They have little circuit boards in them. They will run between 9 volts and 15 volts.
    I have them wired up in parallel to a 9 volt battery. They work fine. They are drawing 30mA at 9 volts. So I think that is 0.27 watts. I can’t get the resistor calculators to work because they ask for supply voltage and forward voltage and the forward voltage must be lower than the supply voltage. But I am supplying 9 volts and the led is using 9 volts, but when I type in Vs = 9 and Vf = 9 I get a null answer,

    My question is I want to make them dimmer using a resistor but I don’t know what resistor to put on them. I was thinking just one resistor soldered onto the positive wire just before the battery.
    This is where it gets confusing because I read somewhere that if I decrease the current I will decrease the voltage, but I think these need a minimum of 9 volts to run. Can somebody please tell me if I can use a resistor to do this, and what size resistor I need please.
    I was looking at .25 watt resistors but I don’t know how many ohms, I would just be guessing. They are currently drawing 30mA so I would like to get that down to around 15 – 20mA

    Here they are Little Dot SMD LED Accent Light – 30 Lumens | Super Bright LEDs – https://www.superbrightleds.com/moreinfo/led-wired-bolts/little-dot-smd-led-accent-light/639/1928/

    • The forward voltage of the LED is not 9V. It’s around 2 volts for Red and Green while around 3V for Blue and White. You are damaging both the LEDs and the batteries by not using a current limiting resistor.

  2. I was wondering what is the difference between a Transistor battery and a alkaline battery? We use a Eveready 9V PM9 battery and when I opened a similar “made in China” make 9V battery there are a lot of open space in it compared to the Eveready.

  3. James,
    I just wanted to thank you for your efforts especially with the Apple II GS. I have several rom1 machines and a rom 3. My thoughts have been turning lately as to what can be done to bring these machines into the modern world with things like USB, Ethernet, Wireless, SSD, and many other modern features supported directly on the motherboard. Inaddition what can bring sound and graphics into the age of at least 720 DPI HDMI and get rid of the slow speed processor speed that Jobs used to cripple this machine. Many people have designed and built devices to carry these things out but would be so nice to see some native capability.

  4. Stefan Ludwig Reply

    Hi James
    I want to give a heads up on a DMM with a very good price/value-ratio 30 Euros
    in addition to the standard U,I,R measuring true RMS, frequency, duty-cycle, diodes, capacity, temperature, NCV,
    bluetooth which enables slow-speed monitoring of values and a little flashlight

    It is from a german company. I don’t know how much shipping-cost it will be to other countries

    best regards Stefan

  5. Hey James,

    Found you in my search for Penguin Bot code. Just built a bot with my son and just having fun with the provided code.

    Do you know of any online sources that provide other code projects to upload to the bot?

    Please share if you do.

    • Hi Tom, I’m glad you and your son enjoyed the Penguin Bot. I thought it was a very cute and well designed robot. Unfortuantely, I am not aware of any other code for it. I hope you can find something to keep interest in it.

  6. Christopher Rischard Reply

    Hi James,

    Thank you so much for sharing your experience here. It really is very helpful!

    I am struggling to find a solution to power an electronic device whose power mains and USB interface apparently fried but 6xAA battery bay still works fine. Manufacturer tells me fixing it would require new main board which would exceed the current street value of the device…

    I can’t find any DIY evidence for converting the 6xAA bay into a USB power supply. (USB plugged into powered USB hub -> DIY converter connected to 6xAA serial battery bay). Would such a conversion be possible?

    Any help on this one would be hugely appreciated 🙂

    Kind regards,
    Christopher

  7. HI James,
    Thanks for making and sharing all these wonderful videos. They have really been instrumental in taking my learning and understanding to a new level.

    I do have a question for you. Despite a lot of Googling, I am struggling to find sites that can help me understand the math behind circuit designs, specifically the power needs. I am not referring to Ohms law but how to manage power like you might with a Buck step down. Obviously that is the easy way but I want to understand what is happening. As an example. I recently decided to build a power supply for some Halloween decorations. The box would have 5 ports, each providing 4.5v DC at max 1A. But I am struggling to find places to understand how much power do I need on the input to supply each port? Will too much overheat the circuit? How do you calculate the power in and manage the circuit, heat dissipation, etc.

    I hope that all makes sense. Any pointers to good sources of information in these concepts would be most welcome.

    Cheers,

    mark

    • The box would have 5 ports, each providing 4.5v DC at max 1A. But I am struggling to find places to understand how much power do I need on the input to supply each port?

      If you have 5 ports that output 4.5 volts with up to 1 amp, that means the total output power is 5 x 4.5 x 1 = 22.5 watts. So your input supply needs to be at least 22.5 watts, assuming you use switching converters for the individual outputs.

      The closest thing I can think to recommend is a tutorials on basics like Kirchhoff’s law.

  8. macaxel1964 Reply

    Hi James,

    a please to meet you in Munich.

    I’m digging more and more into KiCAD ( I switched from eagle as they changed their license policy).

    I would stimulate two aspects

    1) get into Simulation in KiCAD 5 ( install and run a simple schematic)

    2) how to get, install and run external autorouters in KiCAD

    Thx
    Axel

  9. Slartibartfast Reply

    Hello James. I’m wondering why you banned my IP today after I posted a few comments on an earlier article? Nothing I wrote was abusive or inflammatory, and I was attempting to share some of my nearly 35 years of C/C++ programming experience. If I broke some rule for commenting on your blog I apologize but I would appreciate knowing what I did wrong. I won’t post after this if you don’t want me to.

    Thanks.

    • Site has been under attack for about a week. I don’t have time to investigate so I put very strict rules in place. You might have tripped them.

  10. What is your advice on the use of different ‘flavours’ of MQTT client libraries and brokers? My RPi Python PAHO broker wont connect to an ESP8266-12 running the PubSubClient library in Arduino, due to the ClientID arguement passed to the client’s connect function not being acceptable (rc = -2 error). I’ve seen examples where randomized clientID’s are used, and some that leave it up to the programmer to think up an appropriate name based on the publish/subscribe micro-controller being used.

  11. Trent Brown Reply

    Hello James,

    Thank you for the great tutorials, especially millis() and mqtt, they are awesome! I was just reading another blog by Phil Bowles where he favors using Ticker over using Millis. So far i’ve I’ve been using millis extensively after working through your tutorial and am curious about your thoughts of millis vs using ticker?

    Again, thanks for you you do!
    -trent

  12. Hi James,
    Thanks to you for providing us valuable information and practical knowledge !
    In one of your video you’ve beautifully explain the myth about using p channel mosfet only need negative voltage on gate. Actually that was the between Gate and Source voltage, which was not clearly mentioned by any professor.
    My question to you is, in N channel mosfet the same concept is followed on both e & d MOSFETs ?

    • In one of your video you’ve beautifully explain the myth about using

      It was a written tutorial, not a video.

      was the between Gate and Source voltage, which was not clearly mentioned by any professor

      I highly doubt this statement. What else would a professor talk about in regards to ANY MOSFET but the relationship between how it activates and the voltage from gate to source? It’s the most fundamental aspect of a FET. I also know it couldn’t be “any professor”, I can name the one that taught me how they operate. He is where I learned their behavior.

      in N channel mosfet the same concept is followed on both e & d MOSFETs

      I don’t know what “e & d” is nor do I understand what you mean by “concept” in this context.

      • Thank for your reply !
        In my comment “e & d” represent enhancement & depletion type of MOSFET respectively. In N channel mosfet data sheet shows positive voltage require to turn ON mosfet, so I just want to know the difference should be higher in order to turn ON N channel mosfet ? Like p channel mosfet does ?
        Please reply, Thanks in Advance. 🙂

  13. Hi James,

    Just want to say THANK YOU for all of your amazing content that you deliver.

    As a small U.S. electronics manufacturer, we have started referring new customers to your website. Particularly those in new product development stages.

    Though we have a small audience for our blog, we posted a blog today showcasing your work:

    “James Lewis: The Bald Engineer Delivers Electrifying Information”
    https://falconerelectronics.com/bald-engineer/

    Thanks again! You are an outstanding resource for the electronics community.

    Keep up the great work and wishing you continued success.
    Sincerest regards,
    The Team at Falconer Electronics

  14. macaxel1964 Reply

    James,

    sitting here on my project 12VDCC-230VAC inverter to drive the Nesspresso machine in VW-Bus. My project is to build this 1.2kW DC-AC Inverter in a automotive battery footprint.

    Investigating in the measurement equipment following question raise about oscilloscppe probe

    1:1, 1:10 and 1:100 what is the difference and probably can I make it DiY
    Active probe versus passive probe
    Differentiell probes

    As work in this area it is probably a post worth

    All the best to west
    Axel

  15. Hi, James
    I’m an old bald bugger and first time user of arduino sketches.
    I have a simple solar hot water sketch that I copied and pasted and it appears to work well.
    I added serial print code to check temperatures of 2 sensors.
    But the serial print stops and it seems to be caused by a WHILE construct.
    I have read a lot of your articles and it appears that the WHILE construct can be substituted a Millis delay.
    I am having a hard time getting my head around how to apply this.
    Is there an example sketch that you could direct me to?.
    Any help much appreciated.
    Regards,
    JohnV

    • Move your check and print code to a function and wrap it with a millis() check. Then sprinkle calls to the function wherever. The code will only run as fast as you set printInterval.

      It would end up looking something like this (unchecked):

      [arduino]
      // global variables
      unsigned long previousPrint;
      unsigned long printInterval = 500; // 500ms.

      void checkTemp() {
      // see if it is time to check the clock
      if (millis() – previousPrint >= printInterval) {
      int temp1 = whatever1();
      Serial.print("Temp1 is "); Serial.println(temp1);

      // Restart the clock
      previousPrint = millis();
      }
      }
      [/arduino]

      And then in your code you could just do:

      [arduino]
      void loop() {
      checkTemp();
      while(1) {
      checkTemp();
      // whatever you are doing in a while loop
      }
      }
      [/arduino]

      • Thanks for the quick response,but I am still having problems deciphering code,
        I have included my untidy code, perhaps you could apply your code suggestions or comments to this:
        Any help much appreciated.

        #include //loads the more advanced math functions
        const int PSENS = 1;
        const int TSENS = 0;
        const int R1HWE = 5; // No code to be done
        const int R2PUMP = 6;
        const int diffON = 8;
        const int diffOFF = 3;
        const int ELCONTROL = 36;//No code to be done
        //int solarPanelTemperatue =0;
        //int hotWaterTankTemperatue =0;
        void setup(){

        Serial.begin(9600);

        pinMode(PSENS, INPUT);
        pinMode(TSENS, INPUT);
        pinMode(R1HWE, OUTPUT);
        pinMode(R2PUMP, OUTPUT);
        digitalWrite(R1HWE, LOW); //?
        digitalWrite(R2PUMP, LOW); //?

        }

        //FOR TEMP
        double Thermister(int RawADC) { //Function to perform the fancy math of the Steinhart-Hart equation
        double Temp;
        Temp = log(((10240000/RawADC) – 10000));
        Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
        Temp = Temp – 273.15; // Convert Kelvin to Celsius
        //Temp = (Temp * 9.0)/ 5.0 + 32.0; // Celsius to Fahrenheit – comment out this line if you need Celsius
        return Temp;
        } //FOR TEMP1:
        double Thermister1(int RawADC) { //Function to perform the fancy math of the Steinhart-Hart equation
        double Temp1;
        Temp1 = log(((10240000/RawADC) – 10000));
        Temp1 = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp1 * Temp1 ))* Temp1 );
        Temp1 = Temp1 – 273.15; // Convert Kelvin to Celsius
        //Temp = (Temp * 9.0)/ 5.0 + 32.0; // Celsius to Fahrenheit – comment out this line if you need Celsius
        return Temp1;

        }

        void loop(){

        float solarPanelTemperature = (analogRead(1));
        float hotWaterTankTemperature = (analogRead(0));
        if(solarPanelTemperature > (hotWaterTankTemperature + diffON))
        {
        digitalWrite(R2PUMP, HIGH);
        do{
        delay(250);

        solarPanelTemperature = (analogRead(1)); //analogRead???
        hotWaterTankTemperature = (analogRead(0));
        }while(solarPanelTemperature > (hotWaterTankTemperature + diffOFF));
        digitalWrite(R2PUMP, LOW);

        }

        { //PRINT TEMP hot water temp
        int val; //Create an integer variable
        double temp; //Variable to hold a temperature value
        val=analogRead(0); //Read the analog port 0 and store the value in val
        temp=Thermister(val);//Runs the fancy math on the raw analog value
        Serial.print(“Hotwatertank: “);
        Serial.print (temp); //Print the value to the serial port
        Serial.println(” C”);
        }
        delay(500);
        { //PRINT TEMP1 solar panel temp
        int val1; //Create an integer variable
        double temp1; //Variable to hold a temperature value
        val1=analogRead(1); //Read the analog port 1 and store the value in val
        temp1=Thermister(val1);//Runs the fancy math on the raw analog value
        Serial.print(“Solarpanel: “);
        Serial.print (temp1); //Print the value to the serial port
        Serial.println(” C”);
        delay( 1000); //Wait one second before we do it again
        }

        }//endcode

      • Hi,James
        Still thinking about that code mod you sent.
        Have I got this right? [Not in code speak]
        Void checkTemp is a loop function to check the serial print ?.
        In the void loop the temperature gets checked via checkTemp() then serialprints?
        In the while condition[where I was having the original problem] the temperature is checked via checkTemp() and serial printed also?
        What does[arduino] represent ?
        Hope this makes sense, sorry if these are dumb questions,but its a learning curve for me.
        Regards,
        JohnV

        • Sorry, but this is the beyond the level of help I can provide. I suggest you post your project on the arduino.cc forums, so you can get more help.

  16. James, I have a problem with Arduino code. I have searched far and wide, just can’t seem to find anything. I am turning on an LED when the switch is open. I want it to flash for about 200 milliseconds then turn off while the switch is still open, then wait for the next cycle. So essentially the LED will act like a camera flash. I have tried the examples in Arduino and searched the Arduino board. I am running the arduino through a Mosfet and turning on the LED with a 12v power source. I know there has to be some code that (1) turns on the LED when the switch is normally open (2) turns off the LED after 200 milliseconds (or whatever I choose) while the switch is still open (3) keeps the LED off until the switch is opened again. The cycle repeats.

      • Thanks. Just what I was looking for. YOU’RE A GENIUS. None of the guys on the other boards could help. I do have a follow up. I would like to run a 12vdc LED 10watt through a transistor which is to be controlled by the Arduino. Do you have a diagram as to how to hook something like that up. I wasn’t sure which pin would be best. I was thinking of using a Mosfet NPN (IRF540N) for the transistor (which needs 2-6vdc to operate) and toggling it off and on. I would hook up the LED to a 12vdc power supply on the collector, the gate to the arduino and the emitter to ground. Any Mosfet that you would recommend. Thanks for reading.

  17. Easy, lucid and really great videos. Wonder if you can help me in making videos for junior science students in my language, Gujarati. What are the software / hardware tools you use to make your videos so neat and direct without any ambiguity ?

    • It isn’t about the tools you use. You need to start with good source material. Each of the AddOhms videos takes about 100 hours of script writing and less than 40 of animation. My software tools include Adobe After Effects, Illustrator, Apple’s Motion, Final Cut Pro X, and a handful of plugins to do various things.

      As for hardware, I have a variety of cameras. The biggest asset there are a good microphone and good lights. I would invest in Microphone, Lights, Camera in that order. If you don’t have a camera already, then put more of your budget into microphone and lights, than the camera. You can upgrade that later.

  18. Hi James,
    I am really new to the Arduino and coding world. I used your tutorial on millis to test out a strobe flasher for off road race trucks. I used a TIP120 on the two outputs to strobe 18 watt LED pods. would it be possible to add in two more strobe channels without the code getting bogged down? Would it be possible to use an interrupt statement that would drive all the outputs to a constant high using a digital read? I’d like to be able to cycle from strobe to continuous on in other words.

    I’ll keep experimenting!

    Thanks for an awesome website,
    Nick

    • 1. To add more lights, you would simply duplicate the appropriate code. For example, you’d need to add new “State” variables, Pin Definitions, and digitalWrite() calls to support the additional lights.

      2. You could use an interrupt, but I’m not sure how important that would really be. You could simply add a digitalRead() in the loop that sets the STATE variables to HIGH. Then the lights would stay on constantly. That’s the way this code works. The loop() sets the I/O pin to the state of variable. Then it checks to see if time has passed, which modifies the state. Add a digitalRead() and an if-statement and you’ve got your “interrupt”.

      I would create a variable called “constant_STATE” then you could something like this in loop, right before the digitalWrite()s.


      constant_STATE = digitalRead(2); // obviously, change to whatever pin you're using
      if (constant_STATE == true) {
      Red_State = true;
      Blue_State = true;
      }
      digitalWrite //...

      Now regardless of what the rest of the “timing code” does, the lights will always be forced to “on”, if the input pin is high…

  19. Charlie Trunck Reply

    Hi James-

    I came across your website when I was looking for forums on LED lights. I am probably an idiot but we are having problems with LED strip lights.

    My brother owns a small grocery store and he just purchased LED strip lights for his freezer cases. We got all of them hooked up with the appropriated drivers and even have them hooked up to a motion sensor. they all seem to work great EXCEPT FOR TWO OF THE STRIPS ARE DIM at each end of the case. we have a total of 16 strip lights hooked up with drivers for every two strip lights. Again, all of them work great, except for two.

    We are completely baffled. we tried different drivers and they are still dim. we tried reversing the polarity and they are still dim. Each strip light is less then 5 feet away, from the driver, so we don’t think voltage drop is an issue.

    The only thing that we can diagnose, is that the problem is occurring when a 5′ strip light is on the same driver as a 4′ strip light (the 4′ strip light is the one that remains dim, which seems weird).

    We tested our theory by unhooking the 4′ strip light and hooking it up to an adjacent 5′ strip light and both 5′ strip lights (hooked to the same driver) worked just fine. Hooked the 4′ strip back up and it was dim again.

    Would there be some kind of compatibility issue with mixing 4′ and 5′ strips together???

    Any help would be greatly appreciated!!! This is driving up to drink!!! 😉

    Thanks- Charlie

    • Sorry Charlie, I don’t have experience with those kind of LED strips. I don’t know how they are setup. Distance could absolutely be the issue since they do draw a relatively large amount of current. I’d expect the wiring used is meant for low voltage, which gives it somewhat high resistance. Run a bunch of current through long wires and you’ll see a voltage drop like you describe. However, I’m making a lot of guesses.

  20. Hello James,

    my Name is fribbe from http//:macherzin.net.

    macherzin.net is a not commercial website concentrating on all aspect of physical computing.for German speaking users.

    We would like to translate and publish some of your project.s. Of course the source – your site – will be credited.

    However: we are asking for your allowance.

    Am am bold, too …

    Best regards

    fibbe (MOD @ macherzin.net)

    .

    • Hi, I think I’d be more comfortable if you selected particular posts for translation.

      Also, I have some native speakers as friends who I’d like to review, if you don’t mind.

      Thanks,
      James

Write A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.