Hedgehog Feeder

Hedgehogs in the UK are classed as an endangered species. For this reason I have chosen my final year project to be a hedgehog feeder.

Public Chat
Similar projects worth following
The aim of this project is to develop a hedgehog feeder that is able to recognise a hedgehog and feeder it automatically.

Using and Arduino UNO, load cell with the HX711.h library, and a stepping motor to control the feeder.

Data will be stored on a SD card.

  • 1 × HSR-2645CR Continuous Rotation Digital Robot Servo Motor will turn the paddle on the cereal dispenser
  • 1 × Load Cell Will weigh the animal and determine whether the animal is a hedgehog
  • 1 × Adafruit microSD card shield
  • 1 × 9V Battery
  • 1 × Tumble Dryer Vent

View all 13 components

  • Testing the feeder with a hedgehog

    Abigail Smith05/07/2019 at 18:03 0 comments

    Will neee to do a back log of logs as I’ve been focusing on my final thesis write (which I will upload soon!)

    But in the mean time, here’s a video of the test with a hedgehog.

  • Working Feeder powered from laptop

    Abigail Smith04/02/2019 at 17:54 0 comments

    Slowly getting there...

    The next stage is to connect some batteries so that hedgehog feeder it portable and does not need to be connected to a laptop.

  • New Build

    Abigail Smith03/31/2019 at 18:48 0 comments

    Spent with lovely sunny weekend, making the second prototype. 

    Will post the build instructions soon and updated picture of the painted feeder!

  • Still jammed...

    Abigail Smith03/27/2019 at 10:56 0 comments

    Looks like even with a four wing paddle, the food is still getting jammed in the paddle wheel. 

    After looking online, no one else seems to have this issue with similarly dense food...

    May try to use a continuous servo motor to turn the paddle? At this point, portion accuracy is not my biggest concern.

  • Jammed food :(

    Abigail Smith03/25/2019 at 13:56 0 comments

    So it seems that the food is getting jammed in the cereal dispenser :(

    Potential solution:  3D print a paddle wheel with fewer paddles (4 paddles instead of the current 6)

    Any other suggestions that doesn't involve changing the entire outlet mechanism, please let me know

  • Struggling with using weight ranges and load cell.

    Abigail Smith03/21/2019 at 18:09 3 comments

    So the idea is that, the hedgehog will be weighed and if it falls within a weight limit it will receive some food, However, at the moment, I am using weights that are below the weight limit (so no food should be dispensed) but in fact, food is being dispensed. 

    I also am struggling to create different weight limits which will determine how much food will be dispensed.  

    if (scale.get_units()>sensorMin){
        Serial.print("Weight: ");
        Serial.print(scale.get_units(), 3);
        Serial.println(" kg");
        //set RPM at which stepper will rotate when called to step
        hedgehogData.println(scale.get_units(), 3);
        Sleepy::loseSomeTime(10000); //instead of delay (10000)

    I have tried using code as shown below but it does not make a difference

    else if ((scale.get_units()>sensorMid)&&(scale.get_units()<sensorMax)){...

  • First Prototype Build

    Abigail Smith03/14/2019 at 12:36 0 comments

    Pretty happy with how the first prototype build has gone.

    Some things to note so far:

    1) Storage box (85L) is too big. I'm glad I went to big rather than too small as it is easier to build, but the next prototype will be in a much smaller storage box.

    2) Paddle in cereal dispenser is not robust enough for Ark Hedgehog food but works fine or finer food, such as meal worms. Manipulation of paddle design is needed. Perhaps a 4 paddle instead of 6.

    3) Need to secure stepper motor to shelf more robustly as it vibrates and make a lot of noise, which would scare the hedgehog away.

    4) Need to cut a hole in the storage box for entrance to feeder.

    5) Need to adapt load cell mount to cater for larger area.

    6) Code is currently not working as it should as food is being dispensed at weights lower than 350g.

    7) Use of an 'if' statement '&&' in code to create weight ranges does not seem to be working as it should.

    8) Need to have a play with delays and how many steps it necessary to give correct portion size.

    // load cell
    #include "HX711.h" 
    #define DOUT  6
    #define CLK  7
    HX711 scale(DOUT, CLK);
    float calibration_factor = 387600;
    // hedgehog weight limits
    int sensorMin = 0.350; // 350g
    int sensorMax = 0.750; // 750g
    int sensorMid = 0.450; // 450g
    const int delayBetweenFeeds = 6e+7; //1 minute
    #include <Stepper.h>
    const int stepsPerRevolution = 200;
    Stepper myStepper(stepsPerRevolution, 12, 11); //dirPin = 12, stepPin = 11
    int previous = 0;
    void setup() {
      //set up load cell
      Serial.println("Press T to tare");
      scale.set_scale(calibration_factor);  //Calibration Factor obtained from first sketch
      scale.tare();             //Reset the scale to 0
    void loop() {
      //use load cell to weigh
      Serial.print("Weight: ");
      Serial.print(scale.get_units(), 3);  //2 decimal points
      Serial.println(" kg");
      //control dispensor with load cell readings and stepper
      if (scale.get_units()>sensorMin){
        Serial.print("Weight: ");
        Serial.print(scale.get_units(), 3);
        Serial.println(" kg");
        myStepper.setSpeed(30); //set RPM at which stepper will rotate when called to step
      else {

    This is my code so far. 

  • Load Cell Accuracy

    Abigail Smith03/12/2019 at 16:14 0 comments

    In order to gain a better understanding how accurate my load cell was at measuring weights. Firstly, I found the weight of various items (one example was a can of chickpeas) on a commercial weighing scales as seen below.

    I then measured the same item on the load cell and recorded the weight that was displayed on the serial monitor of the Arduino IDE.

    Using this data and data I collected using other items of various weights, I was able to calculate an average standard deviation which I used to create the normal distribution curve as shown below. Apologies, for the low quality images of the serial monitor and graph as I just took a photo of the computer screen.

    This graph will be used in my final report to allow me to comment on the accuracy of the load cells and whether the errors would affect my device.

  • Finally getting the stepper motor to work

    Abigail Smith03/05/2019 at 15:15 0 comments

    I have been having some issues with getting the stepper motor to turn, turns out a capacitor was the answer on the motor 12V source.

    Now I’m flying through it.

  • Load Cell

    Abigail Smith02/26/2019 at 19:16 0 comments

    In order to be able to calibrate my load cell, I needed to make a basic structure that would enable the cell to be loaded and a weight to be taken.

View all 15 project logs

  • 1
    Build attachment of paddle to motor

    First, saw off the handle of the cereal dispenser so that there is a flat base.

    Laser cut a circle out of wood (I did 80mm, but this was slightly too larger) and mark the centre of the circle. 

    Drill two holes into the servo attachment to fit two bolts.

    Mark the two drilled hole position on the circular wood and drill two holes the same place so that a bolt can be attached through the servo attachment and the circular wooden piece. 

    Bolt the servo attachment and piece of wood together. 

    Using a hot glue gun, glue the paddle wheel axis on the opposite side of the servo attachment in the centre. 

  • 2
    Build cereal dispenser support
  • 3
    Make base supports for feeder

    One of the more simple parts of the build.

    Cut to longer lengths of wood and shorter lengths of wood and mark the middle of the longer wood sections.

    Using the four shorter lengths of wood, create a slot for the back on the feeder to slot into. This can be achieved by measuring the diameter of the back piece and securing the pieces of wood with a gap of the measured diameter between. The gap should lie at the marked middle of the longer piece of wood. 

    Secure the smaller pieces of wood to the longer piece with screws.

View all 5 instructions

Enjoy this project?



Name goes here wrote 03/25/2019 at 01:47 point

I found the bug!!  You are setting integer variables to a floating point value.  These are truncated to 0.  Just change 'int' to 'float'.

  Are you sure? yes | no

Jarrett wrote 03/16/2019 at 04:39 point

But why would you want to feed hedgehogs to things? They're all spikey!

  Are you sure? yes | no

Alexander wrote 03/09/2019 at 17:11 point

Paddington is so super duper cute!!! Eeeee!

Otherwise, awesome work so far! Microcontrollers can seem daunting at first, but persistence is key. If you ever get stuck on something and need help, feel free to message me! I'd be more than happy to help.

I'm glad you found a load cell calibration routine -- they do require a bit of calibration, and compensation for temperature,etc. However, if all you are trying to answer is "Is this hedgehog weight?" then what you have is more than accurate enough.

Cheers and good luck!

  Are you sure? yes | no

David Polson wrote 03/08/2019 at 10:31 point

Paddington is so cute :-)

  Are you sure? yes | no

Abigail Smith wrote 02/25/2019 at 09:11 point

That's looks really interesting, thank you!

  Are you sure? yes | no

Sophi Kravitz wrote 02/19/2019 at 16:18 point

Hi Abigail! Have you seen this automated feeder project?

It may help in your research :)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates